river: Fix idle management
Another go at improving the screen dimming and suspending setup: Lockscreen invocation after 5 minutes, dimming at 10, sleep after 15 - but only when not on AC. It tries to also fix the screen being stuck off by reordering the timeout and resume options of swayidle.
This commit is contained in:
parent
beb2c7531a
commit
5f4037b5ef
1 changed files with 8 additions and 8 deletions
|
@ -5,7 +5,7 @@ modemod="Mod1"
|
||||||
term=${TERMINAL:-foot}
|
term=${TERMINAL:-foot}
|
||||||
time_to_lockscreen=300
|
time_to_lockscreen=300
|
||||||
time_to_screendim=600
|
time_to_screendim=600
|
||||||
time_to_suspend=1200
|
time_to_suspend=900
|
||||||
|
|
||||||
## OPTIONS
|
## OPTIONS
|
||||||
riverctl spawn "dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
|
riverctl spawn "dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
|
||||||
|
@ -268,13 +268,13 @@ unset loc
|
||||||
# start screen idle locking/dimming/sleep tool
|
# start screen idle locking/dimming/sleep tool
|
||||||
killall swayidle
|
killall swayidle
|
||||||
riverctl spawn "swayidle \
|
riverctl spawn "swayidle \
|
||||||
timeout ${time_to_lockscreen} 'pidof waylock || lockscreen' \
|
timeout ${time_to_suspend} \"systemctl suspend-then-hibernate\" \
|
||||||
timeout ${time_to_screendim} 'wlopm --off \"*\"' \
|
timeout ${time_to_suspend} \"[ $(cat /sys/class/power_supply/AC/online) -eq 0 ] && systemctl suspend-then-hibernate\"
|
||||||
timeout ${time_to_suspend} 'systemctl suspend-then-hibernate' \
|
timeout ${time_to_screendim} \"wlopm --off '*'\" \
|
||||||
resume 'wlopm --on \"*\"' \
|
resume \"wlopm --on '*'\" \
|
||||||
after-resume 'wlopm --on \"*\"' \
|
timeout ${time_to_lockscreen} \"pidof waylock || lockscreen\" \
|
||||||
before-sleep 'pidof waylock || lockscreen' &"
|
after-resume \"wlopm --on '*'\" \
|
||||||
|
before-sleep \"pidof waylock || lockscreen\" &"
|
||||||
killall clipman
|
killall clipman
|
||||||
riverctl spawn "wl-paste -t text --watch clipman store"
|
riverctl spawn "wl-paste -t text --watch clipman store"
|
||||||
# bash ~/.config/bin/gtktheme # setting our gtk variables
|
# bash ~/.config/bin/gtktheme # setting our gtk variables
|
||||||
|
|
Loading…
Reference in a new issue