Added improved logic for sleep.

- adds a notification before sleep
- fixes storing and reverting the brightness changing
- sets brightness half of current rather than a discrete number.
This commit is contained in:
James Patrick 2020-04-25 22:05:14 -04:00
parent d2b60a2fd2
commit c1c6311c10

View File

@ -14,8 +14,9 @@ exec --no-startup-id autotiling
### Idle configuration
exec swayidle -w \
timeout 285 'light -I && light -S 5' \
resume 'light -O' \
timeout 280 notify-send "鈴 sleeping in 20 seconds" -t 5000 -c 'sleep' \
timeout 285 'light -O && let "a = $(light -G) / 2" && light -S $a '\
resume 'light -I' \
timeout 300 'swaylock-fancy' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \