agsdotfilesdotshyprlandhyprland-configricerofirofi-configshell-scriptsswwwwallustwaybarwaybar-modulewaybar-themes
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
785 B
27 lines
785 B
#!/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
|
|
|