sway: adjust batsignal and swayidle

* notify on greater battery reserves left to provide more time to find a
  power plug
* set shorter timeout for checking whether swaylock is enabled,
  resulting in earlier "dpms off"
This commit is contained in:
surtur 2021-06-14 11:38:55 +02:00
parent 1194f487ba
commit b078fc14b4
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -50,9 +50,9 @@ exec_always --no-startup-id
# TODO add ~/.asdf/shims to PATH # TODO add ~/.asdf/shims to PATH
pkill fusuma; ~/.asdf/shims/fusuma -d -c ~/.config/fusuma/config-wl.yml pkill fusuma; ~/.asdf/shims/fusuma -d -c ~/.config/fusuma/config-wl.yml
pkill autotiling; autotiling pkill autotiling; autotiling
pkill batsignal; batsignal '-d -w 15 -c 9 -d 5' pkill batsignal; batsignal '-d -w 25 -c 15 -d 10'
pkill swayidle; swayidle -w timeout 3600 "$lock" \ pkill swayidle; swayidle -w timeout 3600 "$lock" \
timeout 60 'pgrep swaylock && swaymsg "output * dpms off"' \ timeout 15 'pgrep swaylock && swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \ resume 'swaymsg "output * dpms on"' \
before-sleep "pgrep swaylock || $lockt" before-sleep "pgrep swaylock || $lockt"
} }
@ -66,7 +66,11 @@ exec --no-startup-id {
# TODO add ~/.asdf/shims to PATH # TODO add ~/.asdf/shims to PATH
~/.asdf/shims/fusuma -d -c ~/.config/fusuma/config-wl.yml ~/.asdf/shims/fusuma -d -c ~/.config/fusuma/config-wl.yml
autotiling autotiling
batsignal '-d -w 15 -c 9 -d 5' batsignal '-d -w 25 -c 15 -d 10'
swayidle -w timeout 3600 "$lock" \
timeout 15 'pgrep swaylock && swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep "pgrep swaylock || $lockt"
} }
bindsym ctrl+alt+l exec --no-startup-id $lock bindsym ctrl+alt+l exec --no-startup-id $lock