diff --git a/dotfiles/.config/hypr/conf/autostart.conf b/dotfiles/.config/hypr/conf/autostart.conf index 9ae693756..4f78b3ae5 100644 --- a/dotfiles/.config/hypr/conf/autostart.conf +++ b/dotfiles/.config/hypr/conf/autostart.conf @@ -8,7 +8,7 @@ exec-once=~/.config/ml4w/listeners.sh --startall # Start Polkit -exec-once=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +exec-once = ~/.config/hypr/scripts/polkit-agent.sh # Load Wallpaper exec-once = ~/.config/hypr/scripts/wallpaper-restore.sh diff --git a/dotfiles/.config/hypr/scripts/polkit-agent.sh b/dotfiles/.config/hypr/scripts/polkit-agent.sh new file mode 100644 index 000000000..67ac51f10 --- /dev/null +++ b/dotfiles/.config/hypr/scripts/polkit-agent.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + + +agents=( + # In PATH + polkit-gnome-authentication-agent-1 + + # Absolute paths (lib, libexec, lib64) + /usr/lib/polkit-gnome-authentication-agent-1 + /usr/libexec/polkit-gnome-authentication-agent-1 + /usr/lib64/polkit-gnome-authentication-agent-1 +) + +for agent in "${agents[@]}"; do + if [[ "$agent" == /* ]]; then + if [ -x "$agent" ]; then + echo ":: Starting polkit agent: $agent" + "$agent" & + exit 0 + fi + else + if command -v "$agent" >/dev/null 2>&1; then + echo ":: Starting polkit agent from PATH: $agent" + "$agent" & + exit 0 + fi + fi +done + +echo ":: No polkit authentication agent found" diff --git a/setup/setup-opensuse.sh b/setup/setup-opensuse.sh index d0f8c407e..d33a90aed 100755 --- a/setup/setup-opensuse.sh +++ b/setup/setup-opensuse.sh @@ -22,6 +22,7 @@ packages=( # Hyprland "hyprland-devel" "hyprland-qtutils" + "polkit-gnome" # Tools "eza" "libnotify-tools"