cleanup: simplify case statement in audio-notify

regroup "criticity" cases
This commit is contained in:
swytch 2020-06-14 16:41:18 +02:00
parent da4e53bd27
commit 953041c4f8

View File

@ -17,13 +17,9 @@ if [ "$muted" = "true" ]; then
dunstify -r 100002 "Sound muted" "$level%"
else
case "$level" in
[0-9]) criticity="low" ;;
1[0-9]|2[0-9]) criticity="low" ;;
3[0-9]|4[0-9]) criticity="low" ;;
5[0-9]|6[0-9]) criticity="normal" ;;
7[0-9]) criticity="normal" ;;
8[0-9]|9[0-9]) criticity="critical" ;;
10[0-9]) criticity="critical" ;;
[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]) criticity="low" ;;
6[0-9]|7[0-9]) criticity="normal" ;;
8[0-9]|9[0-9]|10[0-9]) criticity="critical" ;;
esac
dunstify -r 100002 -u "$criticity" "Current pamixer value :" "$level%"