Update sound-control.sh
This commit is contained in:
parent
0c1a9e1697
commit
c331844f0d
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user