made PowerButton working

This commit is contained in:
Honney
2026-05-31 15:15:25 +02:00
parent 5802736724
commit f93370a466
4 changed files with 20 additions and 11 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import Quickshell
Item {
id: root
id: bar_root
Repeater { // Bars
model: Quickshell.screens
delegate: Loader {
+8 -8
View File
@@ -18,13 +18,13 @@ MouseArea {
Item {
anchors.fill: parent
Process {
id: powerOff
command: ["wlogout", "-b", "2"]
stdout: StdioCollector {
onStreamFinished: console.log(`line read: ${this.text}`)
}
}
// Process {
// id: powerOff
// command: ["wlogout", "-b", "2"]
// stdout: StdioCollector {
// onStreamFinished: console.log(`line read: ${this.text}`)
// }
// }
MouseArea {
hoverEnabled: true
@@ -32,7 +32,7 @@ MouseArea {
anchors.fill: parent
onClicked: {
console.log("Running PowerOff Menu")
powerOff.startDetached()
root.openWlogout()
}
}
}
+4
View File
@@ -23,6 +23,10 @@ Item { // container, invisible
}
}
function openWlogout() {
wlogoutLoader.active = true
}
function closeWlogout() {
wlogoutLoader.active = false
}
+7 -2
View File
@@ -21,6 +21,11 @@ ShellRoot {
JLearnerLoader {}
//Wlogout
WlogoutLoader {}
WlogoutLoader {
id : wlLoader
}
function openWlogout() {
wlLoader.openWlogout()
}
}