made PowerButton working
This commit is contained in:
@@ -3,7 +3,7 @@ import Quickshell
|
|||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: bar_root
|
||||||
Repeater { // Bars
|
Repeater { // Bars
|
||||||
model: Quickshell.screens
|
model: Quickshell.screens
|
||||||
delegate: Loader {
|
delegate: Loader {
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ MouseArea {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Process {
|
// Process {
|
||||||
id: powerOff
|
// id: powerOff
|
||||||
command: ["wlogout", "-b", "2"]
|
// command: ["wlogout", "-b", "2"]
|
||||||
stdout: StdioCollector {
|
// stdout: StdioCollector {
|
||||||
onStreamFinished: console.log(`line read: ${this.text}`)
|
// onStreamFinished: console.log(`line read: ${this.text}`)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@@ -32,7 +32,7 @@ MouseArea {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Running PowerOff Menu")
|
console.log("Running PowerOff Menu")
|
||||||
powerOff.startDetached()
|
root.openWlogout()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ Item { // container, invisible
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openWlogout() {
|
||||||
|
wlogoutLoader.active = true
|
||||||
|
}
|
||||||
|
|
||||||
function closeWlogout() {
|
function closeWlogout() {
|
||||||
wlogoutLoader.active = false
|
wlogoutLoader.active = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user