summaryrefslogtreecommitdiff
path: root/services/IdleInhibitor.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-26 23:13:33 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-26 23:13:33 +1000
commit4f819c855714268978f368dbe667439e3de9ca39 (patch)
tree9158fd20cf479b5aa66cc22edafb32cb473c4f3c /services/IdleInhibitor.qml
parentnix: refactor (diff)
downloadcaelestia-shell-4f819c855714268978f368dbe667439e3de9ca39.tar.gz
caelestia-shell-4f819c855714268978f368dbe667439e3de9ca39.tar.bz2
caelestia-shell-4f819c855714268978f368dbe667439e3de9ca39.zip
internal: use systemd-inhibit
No need for custom inhibit script (it didn't even work anyways 💀)
Diffstat (limited to 'services/IdleInhibitor.qml')
-rw-r--r--services/IdleInhibitor.qml7
1 files changed, 3 insertions, 4 deletions
diff --git a/services/IdleInhibitor.qml b/services/IdleInhibitor.qml
index 5bad30b..d975dab 100644
--- a/services/IdleInhibitor.qml
+++ b/services/IdleInhibitor.qml
@@ -9,14 +9,13 @@ Singleton {
property bool enabled: false
Process {
- id: idleInhibitProc
running: root.enabled
- command: [Quickshell.env("CAELESTIA_II_PATH") || "/usr/lib/caelestia/inhibit_idle"]
+ command: ["systemd-inhibit", "--what=idle", "--mode=block", "sleep", "inf"]
}
IpcHandler {
target: "idleInhibitor"
-
+
function isEnabled(): bool {
return root.enabled;
}
@@ -24,7 +23,7 @@ Singleton {
function toggle(): void {
root.enabled = !root.enabled;
}
-
+
function enable(): void {
root.enabled = true;
}