From cd6e96d56ed4b2a779ac73a1227e0bb1519b3509 Mon Sep 17 00:00:00 2001 From: Lena Fuhrimann <6780471+cloudlena@users.noreply.github.com> Date: Tue, 6 Jan 2026 16:27:52 +0100 Subject: [PATCH] hyprland: import `XDG_SESSION_TYPE` for systemd --- modules/services/window-managers/hyprland.nix | 2 ++ tests/modules/services/hyprland/multiple-devices-config.conf | 2 +- tests/modules/services/hyprland/null-package-config.conf | 2 +- tests/modules/services/hyprland/simple-config.conf | 2 +- tests/modules/services/hyprland/sourceFirst-false-config.conf | 2 +- tests/modules/services/hyprland/submaps-config.conf | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index f813ae7fa..88691e7d6 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -130,6 +130,7 @@ in - `HYPRLAND_INSTANCE_SIGNATURE` - `WAYLAND_DISPLAY` - `XDG_CURRENT_DESKTOP` + - `XDG_SESSION_TYPE` ''; }; @@ -140,6 +141,7 @@ in "HYPRLAND_INSTANCE_SIGNATURE" "WAYLAND_DISPLAY" "XDG_CURRENT_DESKTOP" + "XDG_SESSION_TYPE" ]; example = [ "--all" ]; description = '' diff --git a/tests/modules/services/hyprland/multiple-devices-config.conf b/tests/modules/services/hyprland/multiple-devices-config.conf index 823ffa3b5..00921e4d6 100644 --- a/tests/modules/services/hyprland/multiple-devices-config.conf +++ b/tests/modules/services/hyprland/multiple-devices-config.conf @@ -1,4 +1,4 @@ -exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target +exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target exec-once=hyprctl plugin load /path/to/plugin1 exec-once=hyprctl plugin load /nix/store/00000000000000000000000000000000-foo/lib/libfoo.so $mod=SUPER diff --git a/tests/modules/services/hyprland/null-package-config.conf b/tests/modules/services/hyprland/null-package-config.conf index 39f00c778..c56e46322 100644 --- a/tests/modules/services/hyprland/null-package-config.conf +++ b/tests/modules/services/hyprland/null-package-config.conf @@ -1,4 +1,4 @@ -exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target +exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target exec-once=hyprctl plugin load /path/to/plugin1 exec-once=hyprctl plugin load /nix/store/00000000000000000000000000000000-foo/lib/libfoo.so cursor { diff --git a/tests/modules/services/hyprland/simple-config.conf b/tests/modules/services/hyprland/simple-config.conf index 1e0f240a6..d69794e5e 100644 --- a/tests/modules/services/hyprland/simple-config.conf +++ b/tests/modules/services/hyprland/simple-config.conf @@ -1,4 +1,4 @@ -exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target +exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target exec-once=hyprctl plugin load /path/to/plugin1 exec-once=hyprctl plugin load /nix/store/00000000000000000000000000000000-foo/lib/libfoo.so $mod=SUPER diff --git a/tests/modules/services/hyprland/sourceFirst-false-config.conf b/tests/modules/services/hyprland/sourceFirst-false-config.conf index 173ed83b9..70b94c805 100644 --- a/tests/modules/services/hyprland/sourceFirst-false-config.conf +++ b/tests/modules/services/hyprland/sourceFirst-false-config.conf @@ -1,4 +1,4 @@ -exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target +exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target bezier=smoothOut, 0.36, 0, 0.66, -0.56 bezier=smoothIn, 0.25, 1, 0.5, 1 bezier=overshot, 0.4,0.8,0.2,1.2 diff --git a/tests/modules/services/hyprland/submaps-config.conf b/tests/modules/services/hyprland/submaps-config.conf index ec4329cf1..6bd01c926 100644 --- a/tests/modules/services/hyprland/submaps-config.conf +++ b/tests/modules/services/hyprland/submaps-config.conf @@ -1,4 +1,4 @@ -exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target +exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target $mod=SUPER bind=$mod, S, submap, resize bind=$mod, M, submap, move_focus