diff --git a/scripts/tdp b/scripts/tdp index 0e18dbf..7ddead9 100755 --- a/scripts/tdp +++ b/scripts/tdp @@ -147,7 +147,7 @@ set_pl () { fi if [ "$EUID" -eq 0 ]; then echo $(w_to_uw $2) > $pl_path - elif [ $gui_used == 1 ]; then + elif ! [ -z $gui_used ]; then sudo -A bash -c "echo $(w_to_uw $2) > ${pl_path}" else sudo bash -c "echo $(w_to_uw $2) > ${pl_path}"