diff --git a/sound-control.sh b/sound-control.sh index 76bfa51..af7545f 100755 --- a/sound-control.sh +++ b/sound-control.sh @@ -38,12 +38,12 @@ function notify_vol { -u normal \ -a "Volume" \ -h int:value:"${vol}" \ - "${icon}" + "${icon} ${vol}%" } function check_number { - if ! [[ -z "${1}" ]] && ! [[ "${1}" =~ '^-?[0-9]+%?$' ]]; then - echo "error: not a valid number: \"${1}\"" + if ! [[ -z "${1}" ]] && ! [[ "${1}" =~ '^[0-9]+%?$' ]]; then + echo "error: not a valid value: \"${1}\"" exit 1 fi }