diff --git a/modules/services/window-managers/i3-sway/sway.nix b/modules/services/window-managers/i3-sway/sway.nix index a3f119ad3..178ceacd6 100644 --- a/modules/services/window-managers/i3-sway/sway.nix +++ b/modules/services/window-managers/i3-sway/sway.nix @@ -434,8 +434,8 @@ in { xdg.configFile."sway/config" = { source = configFile; onChange = '' - swaySocket=''${XDG_RUNTIME_DIR:-/run/user/$UID}/sway-ipc.$UID.$(${pkgs.procps}/bin/pgrep -x sway || true).sock - if [ -S $swaySocket ]; then + swaySocket="''${XDG_RUNTIME_DIR:-/run/user/$UID}/sway-ipc.$UID.$(${pkgs.procps}/bin/pgrep --uid $UID -x sway || true).sock" + if [ -S "$swaySocket" ]; then ${pkgs.sway}/bin/swaymsg -s $swaySocket reload fi '';