From c1c6311c10524cb45c994c434dd1d7dd9cd5a1f2 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Sat, 25 Apr 2020 22:05:14 -0400 Subject: [PATCH] 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. --- sway/config.d/autostart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sway/config.d/autostart b/sway/config.d/autostart index b259d62..33f7bee 100644 --- a/sway/config.d/autostart +++ b/sway/config.d/autostart @@ -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"' \