Set IMALISON_SESSION_TYPE env var for reliable X11/Wayland detection

systemd user environment persists across login sessions, so
XDG_SESSION_TYPE can be stale. Proactively set a custom variable
on each session start so ConditionEnvironment checks are reliable.

Use it for xsettingsd and random-background (X11-only services).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 01:05:48 -08:00
committed by Kat Huang
parent 63392614b1
commit feaca43946
3 changed files with 6 additions and 1 deletions

View File

@@ -570,6 +570,7 @@ bind = $mainMod, mouse_up, exec, ~/.config/hypr/scripts/workspace-scroll.sh -1
# =============================================================================
# Start Hyprland session target for systemd user services (e.g., waybar)
exec-once = systemctl --user set-environment IMALISON_SESSION_TYPE=wayland
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE
exec-once = systemctl --user start hyprland-session.target
exec-once = ~/.config/hypr/scripts/workspace-history.sh