diff --git a/.config/sway/config b/.config/sway/config index 30740c6..f5ab4f8 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -71,7 +71,10 @@ exec systemctl --user start xdg-desktop-portal-wlr.service exec_always --no-startup-id "pkill -x waybar; waybar -c ~/.config/sway/waybar/config.jsonc -s ~/.config/sway/waybar/style.css" exec nm-applet exec blueman-applet -exec hypridle +# Guarded with pkill because `exec`/`exec_always` re-runs on every sway config +# reload: a second hypridle instance would double-fire every listener (two +# suspend timers, two lock screens) and fight over the sleep inhibitor. +exec_always --no-startup-id "pkill -x hypridle; sleep 0.3; hypridle >/dev/null 2>&1 &" # hyprlock can outlive a sway session; a stale instance then makes hypridle's # "pidof hyprlock || hyprlock" guard a permanent no-op. Clear leftovers at login. exec --no-startup-id pkill -x hyprlock