diff --git a/trb.sh b/trb.sh index 924f9bb..37e6b52 100755 --- a/trb.sh +++ b/trb.sh @@ -6,15 +6,11 @@ if [ ! -f /usr/bin/zenity ];then fi -distro=$(lsb_release -a | grep -o "VoidLinux") - -auth_prompt_path=$(which pkexec) - -if [ -f ${auth_prompt_path} ];then - su_prompt="pkexec" -else - su_prompt="gksudo" +if ! command -v pkexec >/dev/null 2>&1;then + echo "pkexec not installed (install polkit)..." + exit 1 fi +su_prompt="pkexec" zenity --question --text "Do you want to trim?" if [[ $? == 1 ]];then