sway: update swayidle cmd
* use 'output * power ...' instead of 'output * dpms ...' * rm the command instructing outputs to sleep 10s after screen locking * maintain the periodic (every 15s) check for swaylock that turns of outputs if swaylock is running (saves energy)
This commit is contained in:
parent
08fbf762f2
commit
6bcedda326
@ -94,9 +94,8 @@ exec_always --no-startup-id
|
||||
swayidle -w \
|
||||
timeout 545 'pgrep -u $(id -u) swaylock || notify-send -t 15000 -u critical -i "Idle timeout" "Screen is locking soon"' \
|
||||
timeout 600 "$lock" \
|
||||
timeout 610 'swaymsg "output * dpms off"' \
|
||||
timeout 15 'pgrep -u $(id -u) swaylock && swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
timeout 15 'pgrep -u $(id -u) swaylock && swaymsg "output * power off"' \
|
||||
resume 'swaymsg "output * power on"' \
|
||||
before-sleep "pgrep -u $(id -u) swaylock || $lockt"
|
||||
}
|
||||
|
||||
@ -123,9 +122,8 @@ exec --no-startup-id {
|
||||
pgrep -u $(id -u) swayidle || swayidle -w \
|
||||
timeout 545 'pgrep -u $(id -u) swaylock || notify-send -t 15000 -u critical -i "Idle timeout" "Screen is locking soon"' \
|
||||
timeout 600 "$lock" \
|
||||
timeout 610 'swaymsg "output * dpms off"' \
|
||||
timeout 15 'pgrep -u $(id -u) swaylock && swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
timeout 15 'pgrep -u $(id -u) swaylock && swaymsg "output * power off"' \
|
||||
resume 'swaymsg "output * power on"' \
|
||||
before-sleep "pgrep -u $(id -u) swaylock || $lockt"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user