Added power button to top right
This commit is contained in:
@@ -88,6 +88,10 @@ Scope {
|
|||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: false
|
||||||
}
|
}
|
||||||
|
PowerButton {
|
||||||
|
Layout.fillWidth: false
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
35
bar/PowerButton.qml
Normal file
35
bar/PowerButton.qml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import qs
|
||||||
|
import qs.common
|
||||||
|
import qs.common.widgets
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import Quickshell.Io
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
height: parent.height
|
||||||
|
implicitWidth: parent.height
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.LeftButton
|
||||||
|
onPressed: (event) => {
|
||||||
|
powermenu.exec({});
|
||||||
|
}
|
||||||
|
Process {
|
||||||
|
id: powermenu
|
||||||
|
running: false
|
||||||
|
command: [ "wlogout" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MaterialSymbol {
|
||||||
|
anchors.fill: parent
|
||||||
|
visible: true
|
||||||
|
fill: 1
|
||||||
|
text: "mode_off_on"
|
||||||
|
iconSize: Appearance.font.pixelSize.larger
|
||||||
|
color: Appearance.m3colors.m3onSecondaryContainer
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user