diff --git a/config/default.nix b/config/default.nix index b9fd27c5..b6d700a8 100644 --- a/config/default.nix +++ b/config/default.nix @@ -185,9 +185,41 @@ in { systemd.user = { sessionVariables = config.home.sessionVariables; + targets.compositor = { + Unit = { + Description = "Unit for DE to launch"; + ConditionEnvironment = [ "WAYLAND_DISPLAY" "DISPLAY" ]; + }; + }; services = { - opensnitch-ui.Unit.ConditionEnvironment = [ "WAYLAND_DISPLAY" ]; - easyeffects.Unit.ConditionEnvironment = [ "WAYLAND_DISPLAY" ]; + waybar = { + Install.WantedBy = [ "compositor.target" ]; + Unit = { + PartOf = [ "compositor.target" ]; + After = [ "compositor.target" ]; + }; + }; + opensnitch-ui = { + Install.WantedBy = [ "compositor.target" ]; + Unit = { + PartOf = [ "compositor.target" ]; + After = [ "compositor.target" ]; + }; + }; + easyeffects = { + Install.WantedBy = [ "compositor.target" ]; + Unit = { + PartOf = [ "compositor.target" ]; + After = [ "compositor.target" ]; + }; + }; + cliphist = { + Install.WantedBy = [ "compositor.target" ]; + Unit = { + PartOf = [ "compositor.target" ]; + After = [ "compositor.target" ]; + }; + }; }; }; } diff --git a/dots/.config/hypr/hyprland.conf b/dots/.config/hypr/hyprland.conf index c7799e0a..e6025805 100644 --- a/dots/.config/hypr/hyprland.conf +++ b/dots/.config/hypr/hyprland.conf @@ -12,8 +12,8 @@ exec-once = blueman-applet exec-once = slimbookbattery --minimize exec = clight-gui --tray exec = systemd-run --user -u wallpaper-manager ~/.config/hypr/scripts/init-wallpapers.bash || systemctl --user restart wallpaper-manager -exec-once = systemctl --user start compositor.target exec-once = xwaylandvideobridge exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME GTK_THEME exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME GTK_THEME exec-once = /usr/lib/polkit-kde-authentication-agent-1 +exec-once = systemctl --user start compositor.target