#!/bin/bash if [ ! -f /usr/bin/zenity ];then echo "Zenity not installed..." exit 0; fi distro=$(lsb_release -a | grep -o "VoidLinux") if [ $distro = "VoidLinux" ];then su_prompt="gksudo" else su_prompt="pkexec" fi zenity --question --text "Do you want to trim?" if [[ $? == 1 ]];then exit else results=$($su_prompt "/sbin/fstrim -va") notify-send "${results}" fi