From fbc693674db87dd52e0e12c0e601bf841dfc0ac6 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 24 Feb 2025 23:05:50 +0100 Subject: [PATCH] Adjust systemd services to work better with UWSM --- home/.config/systemd/user/battery-notification.service | 1 - home/.config/systemd/user/clipman.service | 1 - home/.config/systemd/user/eww-window@.service | 3 +++ home/.config/systemd/user/eww.service | 5 ++++- home/.config/systemd/user/gh-notification.service | 1 - home/.config/systemd/user/hyprland-monitord.service | 3 ++- home/.config/systemd/user/policykit-agent.service | 1 - home/.config/systemd/user/wl-gammarelay.service | 1 - 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/home/.config/systemd/user/battery-notification.service b/home/.config/systemd/user/battery-notification.service index c9dfbd8..bb03ae7 100644 --- a/home/.config/systemd/user/battery-notification.service +++ b/home/.config/systemd/user/battery-notification.service @@ -1,7 +1,6 @@ [Unit] Description=Show a notification when the battery is low Requires=graphical-session.target -PartOf=graphical-session.target [Service] Type=oneshot diff --git a/home/.config/systemd/user/clipman.service b/home/.config/systemd/user/clipman.service index 03ed28f..a0815bb 100644 --- a/home/.config/systemd/user/clipman.service +++ b/home/.config/systemd/user/clipman.service @@ -2,7 +2,6 @@ Description=Clipman clipboard manager After=graphical-session.target Requires=graphical-session.target -PartOf=graphical-session.target [Service] ExecStart=/usr/bin/wl-paste -t text --watch /usr/bin/clipman store --no-persist diff --git a/home/.config/systemd/user/eww-window@.service b/home/.config/systemd/user/eww-window@.service index 341cf31..158eb1f 100644 --- a/home/.config/systemd/user/eww-window@.service +++ b/home/.config/systemd/user/eww-window@.service @@ -1,6 +1,8 @@ [Unit] Description=Open %I eww window +After=graphical-session.target After=eww.service +PartOf=eww.service [Service] Type=oneshot @@ -10,6 +12,7 @@ ExecStop=/usr/bin/eww close %i RemainAfterExit=true Restart=on-failure RestartSec=3s +Slice=background-graphical.slice [Install] WantedBy=graphical-session.target diff --git a/home/.config/systemd/user/eww.service b/home/.config/systemd/user/eww.service index 56fe6c3..c4038f2 100644 --- a/home/.config/systemd/user/eww.service +++ b/home/.config/systemd/user/eww.service @@ -1,6 +1,9 @@ [Unit] Description=Eww daemon -PartOf=graphical-session.target +After=graphical-session.target +After=pipewire.service +Requires=graphical-session.target +Requires=pipewire.service [Service] ExecStart=/usr/bin/eww daemon --no-daemonize diff --git a/home/.config/systemd/user/gh-notification.service b/home/.config/systemd/user/gh-notification.service index c72e9fe..c4cabf0 100644 --- a/home/.config/systemd/user/gh-notification.service +++ b/home/.config/systemd/user/gh-notification.service @@ -1,7 +1,6 @@ [Unit] Description=Show unread GitHub notifications Requires=graphical-session.target -PartOf=graphical-session.target [Service] Type=oneshot diff --git a/home/.config/systemd/user/hyprland-monitord.service b/home/.config/systemd/user/hyprland-monitord.service index 90bcdfc..b954eaf 100644 --- a/home/.config/systemd/user/hyprland-monitord.service +++ b/home/.config/systemd/user/hyprland-monitord.service @@ -1,8 +1,9 @@ [Unit] Description=Daemon watching for Hyprland monitor updates After=wayland-session@hyprland.desktop.target +After=eww.service +Requires=eww.service Requires=wayland-session@hyprland.desktop.target -PartOf=wayland-session@hyprland.desktop.target [Service] ExecStart=%h/.local/bin/scripts/gui/hyprland/hyprland-monitord diff --git a/home/.config/systemd/user/policykit-agent.service b/home/.config/systemd/user/policykit-agent.service index 5f7d9c7..a41b847 100644 --- a/home/.config/systemd/user/policykit-agent.service +++ b/home/.config/systemd/user/policykit-agent.service @@ -2,7 +2,6 @@ Description="PolicyKit authentication agent" After=graphical-session.target Requires=graphical-session.target -PartOf=graphical-session.target [Service] ExecStart=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 diff --git a/home/.config/systemd/user/wl-gammarelay.service b/home/.config/systemd/user/wl-gammarelay.service index 2a026fb..3ce392a 100644 --- a/home/.config/systemd/user/wl-gammarelay.service +++ b/home/.config/systemd/user/wl-gammarelay.service @@ -2,7 +2,6 @@ Description=Redshift and brightness control for Wayland After=graphical-session.target Requires=graphical-session.target -PartOf=graphical-session.target [Service] ExecStart=/usr/bin/wl-gammarelay-rs run