wayland: Fix automatic system suspend

Previously, swayidle would wait for each command to be finished before
executing the next which, with lockscreen running in the foreground,
would not happen until it was unlocked again. The results were a working
lockscreen after the timeout, but nothing else happening and suspend
mode only being engaged *as soon as* the lockscreen was disabled (i.e.
when you want to use the PC again).

This removes swayidle's waiting for commands to finish and instead
simply go on to the next timeout when the time is right and should thus
fix the issue.
This commit is contained in:
Marty Oehme 2022-12-21 10:34:30 +01:00
parent 201c482f2b
commit fd20fb2576
Signed by: Marty
GPG key ID: 73BA40D5AFAF49C9

View file

@ -249,7 +249,7 @@ exec kanshi &
# start screen idle locking/dimming/sleep tool
killall swayidle
exec swayidle -w \
exec swayidle \
timeout "${time_to_lockscreen}" 'lockscreen' \
timeout "${time_to_screendim}" 'wlopm --off "*"' \
timeout "${time_to_suspend}" 'systemctl suspend-then-hibernate' \