blob: 5bad30b43bd0beb8865bc9add79245dc1355ebb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
pragma Singleton
import Quickshell
import Quickshell.Io
Singleton {
id: root
property bool enabled: false
Process {
id: idleInhibitProc
running: root.enabled
command: [Quickshell.env("CAELESTIA_II_PATH") || "/usr/lib/caelestia/inhibit_idle"]
}
IpcHandler {
target: "idleInhibitor"
function isEnabled(): bool {
return root.enabled;
}
function toggle(): void {
root.enabled = !root.enabled;
}
function enable(): void {
root.enabled = true;
}
function disable(): void {
root.enabled = false;
}
}
}
|