Fixed reloading config with disabled/enabled hypidle

This commit is contained in:
Hannes
2026-03-22 23:21:51 +01:00
parent 8a8c38be67
commit 9b9ec07f25
2 changed files with 31 additions and 5 deletions
+19 -2
View File
@@ -11,6 +11,10 @@ MouseArea {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
Component.onCompleted: {
idleStatusScript.running = true
}
property int idle: 0
Rectangle {
@@ -46,10 +50,23 @@ MouseArea {
Text {
id: idleText
anchors.centerIn: parent
text: idleButton.idle ? "" : ""
text: idleButton.idle ? "" : ""
font.pixelSize: 26
font.family: "Nerd Font"
color: idleButton.containsMouse ? Colors.tertiary_fg : Colors.primary
color: idleButton.containsMouse ? Colors.tertiary_fg : idleText.text == "" ? Colors.primary : Colors.tertiary
}
}
Process {
id: idleStatusScript
command: ["sh", "-c", Quickshell.env("HOME") + "/.config/quickshell/modules/bar/scripts/Idle.sh" + " --status"]
stdout: StdioCollector {
onStreamFinished: {
this.text.trim() === "0" ? idle = 1 : idle = 0
console.log("networkScript networkText:", this.text.trim())
console.log("networkScript")
}
}
}
}