diff --git a/home/programs/hypridle.nix b/home/programs/hypridle.nix index f500aae..d2ca42e 100644 --- a/home/programs/hypridle.nix +++ b/home/programs/hypridle.nix @@ -63,11 +63,11 @@ in onTimeout = cfg.commands.dpms-off; onResume = cfg.commands.dpms-on; } - { - timeout = cfg.timeouts.locked-dpms; - onTimeout = "${lock-dpms}"; - onResume = cfg.commands.dpms-on; - } + # { + # timeout = cfg.timeouts.locked-dpms; + # onTimeout = "${lock-dpms}"; + # onResume = cfg.commands.dpms-on; + # } { timeout = cfg.timeouts.lock; onTimeout = "${lock}"; diff --git a/home/sessions/hyprland/default.nix b/home/sessions/hyprland/default.nix index d1e0bcd..fd66e1a 100644 --- a/home/sessions/hyprland/default.nix +++ b/home/sessions/hyprland/default.nix @@ -33,7 +33,11 @@ let # idle-cmd = "${swayidle} -w timeout 315 '${lock-cmd}' timeout 300 '${hyprctl} dispatch dpms off' resume '${hyprctl} dispatch dpms on' before-sleep '${lock-cmd}' lock '${lock-cmd}' unlock '${pkill} -USR1 -x swaylock'"; # idle-cmd = "${swayidle} -w timeout 300 '${hyprctl} dispatch dpms off' resume '${hyprctl} dispatch dpms on'"; # idle-cmd = "${hypridle}"; - idle-cmd = "${pkgs.coreutils}/bin/true"; + # idle-cmd = "${pkgs.coreutils}/bin/true"; + idle-cmd = pkgs.writeShellScript "idle-dpms-lock" '' + ${swayidle} timeout 10 'pgrep -x swaylock > /dev/null && hyprctl dispatch dpms off' \ + resume 'hyprctl dispatch dpms on' + ''; hypr-dispatcher-package = pkgs.callPackage ./dispatcher { hyprland = hyprland-pkg; }; hypr-dispatcher = "${hypr-dispatcher-package}/bin/hypr-dispatcher";