fix: swayidle 'command not found' and screen not
switching off after swaylock locks the screen
This commit is contained in:
parent
98988d0268
commit
e15f6ad4ea
|
@ -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 = {
|
||||||
|
|
|
@ -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
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue