rework of IdleButton

This commit is contained in:
Hannes
2026-08-22 21:35:43 +02:00
parent 896264c062
commit 9f8d774efd
6 changed files with 24 additions and 47 deletions
+2 -20
View File
@@ -5,24 +5,6 @@ import Quickshell.Io
import "../../../../config"
Item {
property int idle: 0
Process {
id: statusScript
command: ["sh", "-c", Config.configDir + "/modules/bar/scripts/Idle.sh --status"]
running: true
stdout: StdioCollector {
onStreamFinished: {
idle = this.text.trim() === "0" ? 1 : 0
}
}
}
Timer {
interval: 5000
running: true
repeat: true
triggeredOnStart: true
onTriggered: statusScript.running = true
}
// true = inhibit idle (prevent hypridle/lock/dpms), false = allow idle
property bool idle: false
}