From 26efcdc6ae8c7265bae9feaf98e89e43b862996f Mon Sep 17 00:00:00 2001 From: Josue Zamudio Date: Thu, 29 Oct 2026 08:45:08 -0700 Subject: [PATCH] fix(sway): pkill-guard hypridle under exec_always `exec` re-runs on every config reload, so each `swaymsg reload` leaked a second hypridle: duplicate suspend/lock timers and two processes fighting over the logind sleep inhibitor. Same pattern already used for waybar and wl-paste. --- .config/sway/config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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