From 67944d7e73a49f6542e4f133018dd38da3c09555 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sun, 20 Aug 2023 17:31:14 -0500 Subject: [PATCH] feat(systemd): make polkit dependent on compositor target --- dots/.config/systemd/user/compositor.target | 4 ++++ dots/.config/systemd/user/polkit.service | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 dots/.config/systemd/user/compositor.target diff --git a/dots/.config/systemd/user/compositor.target b/dots/.config/systemd/user/compositor.target new file mode 100644 index 00000000..183d285c --- /dev/null +++ b/dots/.config/systemd/user/compositor.target @@ -0,0 +1,4 @@ +[Unit] +Description=Compositor target for WM to be launched manually +Requires=graphical-session.target +After=graphical-session.target diff --git a/dots/.config/systemd/user/polkit.service b/dots/.config/systemd/user/polkit.service index 26d37b37..ab2b96c8 100644 --- a/dots/.config/systemd/user/polkit.service +++ b/dots/.config/systemd/user/polkit.service @@ -1,14 +1,16 @@ [Unit] Description=KDE PolicyKit Authentication Agent -PartOf=graphical-session.target +PartOf=compositor.target +After=compositor.target [Service] ExecStart=/usr/lib/polkit-kde-authentication-agent-1 ExecStop=kill -HUP $MAINPID -BusName=org.kde.polkit-kde-authentication-agent-1 +ExecCondition=/bin/sh -c "[ -n $WAYLAND_DISPLAY ]" Slice=background.slice +BusName=org.kde.polkit-kde-authentication-agent-1 TimeoutSec=5sec Restart=on-failure [Install] -WantedBy=graphical-session.target +WantedBy=compositor.target