improve sway locking

This commit is contained in:
shibao 2024-06-28 15:17:56 -04:00
parent 257b4060c0
commit dc1e46e4a7

View File

@ -43,8 +43,10 @@ exec_always {
# timeout # timeout
exec swayidle -w \ exec swayidle -w \
timeout 300 'playerctl -a pause && swaylock' \ timeout 300 'playerctl -a pause' \
timeout 300 'swaylock' \
timeout 600 'swaymsg "output * dpms off"' \ timeout 600 'swaymsg "output * dpms off"' \
timeout 15 'if pgrep -x swaylock; then swaymsg "output * dpms off"; fi' \
before-sleep 'playerctl -a pause' \ before-sleep 'playerctl -a pause' \
lock 'swaylock' \ lock 'swaylock' \
resume 'swaymsg "output * dpms on"' resume 'swaymsg "output * dpms on"'