From b555b5045143d7f0d264609efbdc45aa0081ecf9 Mon Sep 17 00:00:00 2001 From: shibao Date: Fri, 28 Jun 2024 15:17:56 -0400 Subject: [PATCH] improve sway locking --- home/default/.config/sway/config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/home/default/.config/sway/config b/home/default/.config/sway/config index 6b32415..b603801 100644 --- a/home/default/.config/sway/config +++ b/home/default/.config/sway/config @@ -43,8 +43,10 @@ exec_always { # timeout exec swayidle -w \ - timeout 300 'playerctl -a pause && swaylock' \ + timeout 300 'playerctl -a pause' \ + timeout 300 'swaylock' \ timeout 600 'swaymsg "output * dpms off"' \ + timeout 15 'if pgrep -x swaylock; then swaymsg "output * dpms off"; fi' \ before-sleep 'playerctl -a pause' \ lock 'swaylock' \ resume 'swaymsg "output * dpms on"'