From c331844f0d1bb0ad45be7b6bac773c647fd5f9cf Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Sat, 24 Aug 2024 16:21:12 -0700 Subject: [PATCH] Update sound-control.sh --- sound-control.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 }