2022-04-19 16:57:19 +03:00
|
|
|
# Copied from `man swayidle`, except the $ScreenLockCmd that I don't
|
|
|
|
# want to repeat.
|
2023-02-21 19:08:54 +02:00
|
|
|
# This will lock your screen after 300 seconds of inactivity, then turn off
|
|
|
|
# your displays after another 300 seconds, and turn your screens back on
|
|
|
|
# when resumed. It will also lock your screen before your computer goes to
|
|
|
|
# sleep.
|
2022-04-19 16:57:19 +03:00
|
|
|
exec swayidle -w \
|
2023-02-21 19:08:54 +02:00
|
|
|
timeout 300 "\"$ScreenLockCmd\"" \
|
|
|
|
timeout 600 'swaymsg "output * dpms off"' \
|
2023-02-14 14:23:27 +02:00
|
|
|
resume 'swaymsg "output * dpms on"' \
|
2023-02-21 19:08:54 +02:00
|
|
|
before-sleep "\"$ScreenLockCmd\""
|