{pkgs, ...}: { imports = [ ../xscreensaver ]; wayland.windowManager.hyprland.settings = { exec-once = [ "uwsm app -- hypridle" "uwsm app -- xscreensaver -no-splash" ]; }; services.hypridle = { enable = true; settings = { general = { after_sleep_cmd = "hyprctl dispatch dpms on"; ignore_dbus_inhibit = false; lock_cmd = "hakase-hyprlock"; before_sleep_cmd = "hakase-hyprlock"; # lock before suspend }; listener = [ { timeout = 180; # 3min on-timeout = "${pkgs.xscreensaver}/bin/xscreensaver-command -activate"; on-resume = "${pkgs.xscreensaver}/bin/xscreensaver-command -deactivate"; } { timeout = 300; # 5min on-timeout = "hakase-hyprlock"; # lock screen when timeout has passed } { timeout = 330; # 5.5min on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has passed } { timeout = 660; on-timeout = "systemctl suspend"; # suspend pc } ]; }; }; }