{ inputs, ... }: { services.hypridle = { enable = true; package = inputs.hypridle.packages.x86_64-linux.default; settings = { general = { lock_cmd = "pidof hyprlock || hyprlock"; before_sleep_cmd = "loginctl lock-session"; after_sleep_cmd = "shikanectl reload && brillo -e -u 150000 -I"; ignore_dbus_inhibit = false; ignore_systemd_inhibit = false; }; # TODO add screen dimming and test configurations with different monitors listener = [ # battery timers { timeout = "60"; on-timeout = "systemd-ac-power || dim-all-monitors"; } { timeout = "120"; on-timeout = "systemd-ac-power || lock-power-off-monitors"; } { timeout = "300"; on-timeout = "systemd-ac-power || lock-suspend"; } # ac power timers { timeout = "90"; on-timeout = "systemd-ac-power && dim-all-monitors"; } { timeout = "180"; on-timeout = "systemd-ac-power && loginctl lock-session"; } { timeout = "200"; on-timeout = "systemd-ac-power && lock-power-off-monitors"; } { timeout = "600"; on-timeout = "systemd-ac-power && lock-suspend"; } ]; }; }; }