From cb6f7e60c4b794b3b519b18b1c3d49001ac75aa1 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Wed, 25 Jan 2023 10:27:54 +0100 Subject: [PATCH] Run polkit agent with systemd --- home/.config/hypr/hyprland.conf | 1 - home/.config/systemd/user/policykit-agent.service | 10 ++++++++++ .../user/wm-ready.target.wants/policykit-agent.service | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 home/.config/systemd/user/policykit-agent.service create mode 120000 home/.config/systemd/user/wm-ready.target.wants/policykit-agent.service diff --git a/home/.config/hypr/hyprland.conf b/home/.config/hypr/hyprland.conf index 5f8c34e..d7b9f1b 100644 --- a/home/.config/hypr/hyprland.conf +++ b/home/.config/hypr/hyprland.conf @@ -15,7 +15,6 @@ exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CUR exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = systemctl --user start xdg-desktop-portal-hyprland exec-once = systemctl --user start wm-ready.target -exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec-once = setbg exec-once = sleep 2 && eww open bar0 diff --git a/home/.config/systemd/user/policykit-agent.service b/home/.config/systemd/user/policykit-agent.service new file mode 100644 index 0000000..2523617 --- /dev/null +++ b/home/.config/systemd/user/policykit-agent.service @@ -0,0 +1,10 @@ +[Unit] +Description="PolicyKit authentication agent" +PartOf=graphical-session.target + +[Service] +ExecStart=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +Restart=on-failure + +[Install] +WantedBy=wm-ready.target diff --git a/home/.config/systemd/user/wm-ready.target.wants/policykit-agent.service b/home/.config/systemd/user/wm-ready.target.wants/policykit-agent.service new file mode 120000 index 0000000..d9ab5b8 --- /dev/null +++ b/home/.config/systemd/user/wm-ready.target.wants/policykit-agent.service @@ -0,0 +1 @@ +/home/itsdrike/.config/systemd/user/policykit-agent.service \ No newline at end of file