Update sound-control.sh
This commit is contained in:
parent
0c1a9e1697
commit
c331844f0d
@ -38,12 +38,12 @@ function notify_vol {
|
|||||||
-u normal \
|
-u normal \
|
||||||
-a "Volume" \
|
-a "Volume" \
|
||||||
-h int:value:"${vol}" \
|
-h int:value:"${vol}" \
|
||||||
"${icon}"
|
"${icon} ${vol}%"
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_number {
|
function check_number {
|
||||||
if ! [[ -z "${1}" ]] && ! [[ "${1}" =~ '^-?[0-9]+%?$' ]]; then
|
if ! [[ -z "${1}" ]] && ! [[ "${1}" =~ '^[0-9]+%?$' ]]; then
|
||||||
echo "error: not a valid number: \"${1}\""
|
echo "error: not a valid value: \"${1}\""
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user