Move from hypridle to QS

This commit is contained in:
David Heinemeier Hansson
2026-05-19 12:02:28 +02:00
parent 48dacca6ea
commit 0f5044167c
25 changed files with 326 additions and 99 deletions
+9 -3
View File
@@ -33,11 +33,17 @@ Item {
Process {
id: statusProc
command: ["bash", "-lc", "pgrep -x hypridle >/dev/null 2>&1 && echo running || echo stopped"]
command: ["bash", "-lc", "omarchy-shell idle status 2>/dev/null"]
stdout: StdioCollector {
waitForEnd: true
onStreamFinished: {
root.active = String(text || "").trim() === "stopped"
var raw = String(text || "").trim()
try {
var parsed = JSON.parse(raw)
root.active = parsed && parsed.enabled === false
} catch (e) {
root.active = false
}
}
}
}
@@ -65,7 +71,7 @@ Item {
bar: root.bar
text: root.icon
active: false
tooltipText: root.active ? "No sleep, lock, or screensaver" : ""
tooltipText: root.active ? "No lock or screensaver" : ""
onPressed: function() { root.toggle() }
}
}