diff options
| author | JaKooLit <jimmielovejay@gmail.com> | 2023-10-22 15:55:57 +0900 |
|---|---|---|
| committer | JaKooLit <jimmielovejay@gmail.com> | 2023-10-22 15:55:57 +0900 |
| commit | c222e1bad2ba5e779c3af5b956906c82ead43271 (patch) | |
| tree | a5253e0861c200ff90354169e1f67ef42ebf0ef9 /config/hypr/scripts/Polkit.sh | |
| parent | bb0be21dba7980fc1c047eaba24eda1712bd7f31 (diff) | |
Initial upload
Diffstat (limited to 'config/hypr/scripts/Polkit.sh')
| -rwxr-xr-x | config/hypr/scripts/Polkit.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/config/hypr/scripts/Polkit.sh b/config/hypr/scripts/Polkit.sh new file mode 100755 index 00000000..1ac68f82 --- /dev/null +++ b/config/hypr/scripts/Polkit.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Polkit possible paths files to check +polkit=( + "/usr/lib/polkit-kde-authentication-agent-1" + "/usr/lib/polkit-gnome-authentication-agent-1" + "/usr/libexec/polkit-gnome-authentication-agent-1" + "/usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1" + "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1" +) + +executed=false # Flag to track if a file has been executed + +# Loop through the list of files +for file in "${polkit[@]}"; do + if [ -e "$file" ]; then + echo "File $file found, executing command..." + exec "$file" + executed=true + break + fi +done + +# If none of the files were found, you can add a fallback command here +if [ "$executed" == false ]; then + echo "None of the specified files were found. Install a Polkit" +fi |
