# Sway Config: Idle and Lockscreen
#
# Thurstylark

set $lock-time 900
set $dispsleep-time 600

set $dispsleep 'swaymsg "output * dpms off"'
set $dispwake 'swaymsg "output * dpms on"'

set $locker "swaylock -e -f -F -l -c 000000"
set $unlocker "killall swaylock"

exec swayidle -w \
	timeout $lock-time $locker \
	timeout $dispsleep-time $dispsleep \
	resume $dispwake \
	after-resume $dispwake \
	before-sleep $locker \
	lock $locker \
	unlock $unlocker
