wayland: Add automatic dimming and suspend
Added automatic: a) screen locking after 5 minutes b) screen dimming after 10 minutes c) suspending after 20 minutes to riverwm. Makes use of swayidle to detect idle times and wlopm to detect and toggle displays.
This commit is contained in:
parent
b4ec0b9e0a
commit
261935c27a
1 changed files with 14 additions and 0 deletions
|
@ -3,6 +3,9 @@
|
||||||
mod="Mod4"
|
mod="Mod4"
|
||||||
modemod="Mod1"
|
modemod="Mod1"
|
||||||
term=${TERMINAL:-foot}
|
term=${TERMINAL:-foot}
|
||||||
|
time_to_lockscreen=300
|
||||||
|
time_to_screendim=600
|
||||||
|
time_to_suspend=1200
|
||||||
|
|
||||||
## 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"
|
||||||
|
@ -241,8 +244,19 @@ killall waybar
|
||||||
exec waybar &
|
exec waybar &
|
||||||
|
|
||||||
# start dynamic display configuration
|
# start dynamic display configuration
|
||||||
|
killall kanshi
|
||||||
exec kanshi &
|
exec kanshi &
|
||||||
|
|
||||||
|
# start screen idle locking/dimming/sleep tool
|
||||||
|
killall swayidle
|
||||||
|
exec swayidle -w \
|
||||||
|
timeout "${time_to_lockscreen}" 'lockscreen' \
|
||||||
|
timeout "${time_to_screendim}" 'wlopm --off "*"' \
|
||||||
|
timeout "${time_to_suspend}" 'systemctl suspend-then-hibernate' \
|
||||||
|
resume 'wlopm --on "*"' \
|
||||||
|
after-resume 'wlopm --on "*"' \
|
||||||
|
before-sleep 'lockscreen' &
|
||||||
|
|
||||||
killall clipman
|
killall clipman
|
||||||
exec wl-paste -t text --watch clipman store &
|
exec 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