idleinhibitor: persist state across reloads
Also set who and why
This commit is contained in:
parent
9030634bc1
commit
9960cfa059
1 changed files with 10 additions and 2 deletions
|
|
@ -6,11 +6,19 @@ import Quickshell.Io
|
||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property bool enabled: false
|
property alias enabled: props.enabled
|
||||||
|
|
||||||
|
PersistentProperties {
|
||||||
|
id: props
|
||||||
|
|
||||||
|
property bool enabled
|
||||||
|
|
||||||
|
reloadableId: "idleInhibitor"
|
||||||
|
}
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
running: root.enabled
|
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 {
|
IpcHandler {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue