fix: swayidle 'command not found' and screen not

switching off after swaylock locks the screen
This commit is contained in:
teutat3s 2023-11-11 15:43:09 +01:00
parent 98988d0268
commit e15f6ad4ea
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
2 changed files with 6 additions and 7 deletions

View file

@ -12,13 +12,12 @@
};
Service = {
Type = "simple";
Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin:${pkgs.swaylock-bg}/bin:${pkgs.swayidle}/bin";
ExecStart = ''
swayidle -w \
after-resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock-bg' \
timeout 300 'swaylock-bg' \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
${pkgs.swayidle}/bin/swayidle -w \
timeout 300 '${pkgs.swaylock-bg}/bin/swaylock-bg' \
timeout 600 '${pkgs.sway}/bin/swaymsg "output * dpms off"' \
resume '${pkgs.sway}/bin/swaymsg "output * dpms on"' \
before-sleep '${pkgs.swaylock-bg}/bin/swaylock-bg'
'';
};
Install = {

View file

@ -16,5 +16,5 @@ with self; ''
do
LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}"
done
exec ${swaylock}/bin/swaylock $LOCKARGS
exec ${swaylock}/bin/swaylock --daemonize $LOCKARGS
''