summaryrefslogtreecommitdiff
path: root/.config/swayidle/config
blob: 5176407a3bd831db75c7f8610c98943161aa6810 (plain)
1
2
3
4
5
6
7
8
9
10
# Ideally we wouldn't try to call swaylock if the screen is already locked,
# but discovering whether swaylock is already running in a way that avoids
# races is difficult or impossible because swaylock doesn't have a mechanism
# to report that it's successfully locked the screen other than daemonising.
# So, until it does, the following means a lot of "failed to lock; already
# locked?"  messages on stderr.
lock 'swaylock -f'
before-sleep 'swaylock -f'
timeout 300 'swaylock -f'
timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'