diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index f10675fb..685d0f1d 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -12,11 +12,11 @@ Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin"; ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ after-resume 'swaymsg "output * dpms on"' \ - before-sleep 'swaylock-bg' '' + (if psCfg.paranoia.enable then '' \ + before-sleep '${pkgs.swaylock-bg}/bin/swaylock-bg' '' + (if psCfg.paranoia.enable then '' \ timeout 120 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ timeout 150 'systemctl hibernate' '' else '' \ - timeout 600 'swaylock-bg' + timeout 600 '${pkgs.swaylock-bg}/bin/swaylock-bg' \ timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' ''); };