From 6bcedda326ce8ada0af8189bd5c18d905e5d4400 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 6 Jun 2023 15:51:30 +0200 Subject: [PATCH] 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) --- .config/sway/config | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.config/sway/config b/.config/sway/config index 60df227..903eb5f 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -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" }