Added power button to top right

This commit is contained in:
2025-09-26 17:00:51 -04:00
parent 782b320b67
commit 78d96977f3
2 changed files with 39 additions and 0 deletions

View File

@@ -88,6 +88,10 @@ Scope {
Layout.fillHeight: true
Layout.fillWidth: false
}
PowerButton {
Layout.fillWidth: false
Layout.fillHeight: true
}
}
}
}

35
bar/PowerButton.qml Normal file
View 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
}
}