From 7ac529c22129ee9fb024744ede18f73e6b148ede Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Wed, 22 May 2024 21:39:43 -0300 Subject: [PATCH] hyprland: onChange: check XDG_RUNTIME_DIR as well The previous check false negatives in Hyprland >= 0.40.0 --- modules/services/window-managers/hyprland.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index ff162fb30..ef41d85e6 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -237,7 +237,8 @@ in { onChange = lib.mkIf (cfg.package != null) '' ( # Execute in subshell so we don't poision environment with vars - if [[ -d "/tmp/hypr" ]]; then + XDG_RUNTIME_DIR=''${XDG_RUNTIME_DIR:-/run/user/$(id -u)} + if [[ -d "/tmp/hypr" || -d "$XDG_RUNTIME_DIR/hypr" ]]; then for i in $(${cfg.finalPackage}/bin/hyprctl instances -j | jq ".[].instance" -r); do ${cfg.finalPackage}/bin/hyprctl -i "$i" reload config-only done