1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 03:29:45 +01:00

hyprland: fix hyprctl crash

`/tmp/hypr` must be present so `hyprctl` doesn't crash.
This commit is contained in:
Juraj Hlista 2024-01-31 17:01:18 +01:00 committed by Robert Helgesson
parent 1ca210648a
commit 230836bb7c
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED

View file

@ -246,11 +246,13 @@ in {
onChange = lib.mkIf (cfg.package != null) ''
( # Execute in subshell so we don't poision environment with vars
# This var must be set for hyprctl to function, but the value doesn't matter.
export HYPRLAND_INSTANCE_SIGNATURE="bogus"
for i in $(${cfg.finalPackage}/bin/hyprctl instances -j | jq ".[].instance" -r); do
HYPRLAND_INSTANCE_SIGNATURE=$i ${cfg.finalPackage}/bin/hyprctl reload config-only
done
if [[ -d "/tmp/hypr" ]]; then
# This var must be set for hyprctl to function, but the value doesn't matter.
export HYPRLAND_INSTANCE_SIGNATURE="bogus"
for i in $(${cfg.finalPackage}/bin/hyprctl instances -j | jq ".[].instance" -r); do
HYPRLAND_INSTANCE_SIGNATURE=$i ${cfg.finalPackage}/bin/hyprctl reload config-only
done
fi
)
'';
};