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 = { Service = {
Type = "simple"; Type = "simple";
Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin:${pkgs.swaylock-bg}/bin:${pkgs.swayidle}/bin";
ExecStart = '' ExecStart = ''
swayidle -w \ ${pkgs.swayidle}/bin/swayidle -w \
after-resume 'swaymsg "output * dpms on"' \ timeout 300 '${pkgs.swaylock-bg}/bin/swaylock-bg' \
before-sleep 'swaylock-bg' \ timeout 600 '${pkgs.sway}/bin/swaymsg "output * dpms off"' \
timeout 300 'swaylock-bg' \ resume '${pkgs.sway}/bin/swaymsg "output * dpms on"' \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep '${pkgs.swaylock-bg}/bin/swaylock-bg'
''; '';
}; };
Install = { Install = {

View file

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