aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr
diff options
context:
space:
mode:
authorJa.KooLit <85185940+JaKooLit@users.noreply.github.com>2025-06-06 11:41:19 +0900
committerGitHub <noreply@github.com>2025-06-06 11:41:19 +0900
commitb825de86ee20f11cfb87de3ceab5ca6d9679347b (patch)
tree9fd853b58922f4214695b39caace681447cdbd90 /config/hypr
parent33017970d8cdf235cffd20b88336390e87cbf579 (diff)
parent1258a04a46d27cc1bc48fc57b4a68e1169fd7399 (diff)
Merge pull request #730 from JaKooLit/main
Update Polkit.sh
Diffstat (limited to 'config/hypr')
-rwxr-xr-xconfig/hypr/scripts/Polkit.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/config/hypr/scripts/Polkit.sh b/config/hypr/scripts/Polkit.sh
index d009ecc8..dcea7653 100755
--- a/config/hypr/scripts/Polkit.sh
+++ b/config/hypr/scripts/Polkit.sh
@@ -1,8 +1,8 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
-# This is for polkits, it will start from top and will stop if the top is executed
+# This script starts the first available Polkit agent from a list of possible locations
-# Polkit possible paths files to check
+# List of potential Polkit agent file paths
polkit=(
"/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
"/usr/libexec/hyprpolkitagent"
@@ -16,19 +16,19 @@ polkit=(
"/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1"
)
-executed=false # Flag to track if a file has been executed
+executed=false
-# Loop through the list of files
+# Loop through the list of paths
for file in "${polkit[@]}"; do
- if [ -e "$file" ]; then
- echo "File $file found, executing command..."
- exec "$file"
+ if [ -e "$file" ] && [ ! -d "$file" ]; then
+ echo "Found: $file — executing..."
+ exec "$file"
executed=true
break
fi
done
-# If none of the files were found, you can add a fallback command here
+# Fallback message if nothing executed
if [ "$executed" == false ]; then
- echo "None of the specified files were found. Install a Polkit"
+ echo "No valid Polkit agent found. Please install one."
fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage