made PowerButton working
This commit is contained in:
@@ -3,7 +3,7 @@ import Quickshell
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
id: bar_root
|
||||
Repeater { // Bars
|
||||
model: Quickshell.screens
|
||||
delegate: Loader {
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@ Item { // container, invisible
|
||||
}
|
||||
}
|
||||
|
||||
function openWlogout() {
|
||||
wlogoutLoader.active = true
|
||||
}
|
||||
|
||||
function closeWlogout() {
|
||||
wlogoutLoader.active = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user