idleinhibitor: persist state across reloads

Also set who and why
This commit is contained in:
2 * r + 2 * t 2025-08-27 14:49:37 +10:00
parent 9030634bc1
commit 9960cfa059

View file

@ -6,11 +6,19 @@ import Quickshell.Io
Singleton {
id: root
property bool enabled: false
property alias enabled: props.enabled
PersistentProperties {
id: props
property bool enabled
reloadableId: "idleInhibitor"
}
Process {
running: root.enabled
command: ["systemd-inhibit", "--what=idle", "--mode=block", "sleep", "inf"]
command: ["systemd-inhibit", "--what=idle", "--who=caelestia-shell", "--why=Idle inhibitor active", "--mode=block", "sleep", "inf"]
}
IpcHandler {