use quickshell idle inhib

This commit is contained in:
Benjamin Palko 2025-09-09 23:16:20 -04:00
parent a10c2f0254
commit fbc2a10b69

View file

@ -1,7 +1,7 @@
pragma Singleton pragma Singleton
import Quickshell import Quickshell
import Quickshell.Io import Quickshell.Wayland
Singleton { Singleton {
@ -16,16 +16,14 @@ Singleton {
function toggle() { function toggle() {
if (properties.enabled) { if (properties.enabled) {
process.signal(888);
properties.enabled = false; properties.enabled = false;
} else { } else {
properties.enabled = true; properties.enabled = true;
} }
} }
Process { IdleInhibitor {
id: process id: inhibitor
running: properties.enabled enabled: properties.enabled
command: ["sh", "-c", "systemd-inhibit --what=idle --who=Caffeine --why='Caffeine module is active' --mode=block sleep inf"]
} }
} }