2020-05-09 21:26:23 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-01-18 17:48:00 +01:00
|
|
|
# Actually PulseAudio
|
|
|
|
|
|
|
|
[ "$(pamixer --get-mute)" = "true" ] && {
|
2020-05-25 13:08:43 +02:00
|
|
|
echo " mut" && exit 1
|
2020-05-09 21:26:23 +02:00
|
|
|
}
|
2020-05-25 13:08:43 +02:00
|
|
|
|
2021-01-18 17:48:00 +01:00
|
|
|
level="$(pamixer --get-volume)"
|
2020-05-09 21:26:23 +02:00
|
|
|
|
|
|
|
v1=""
|
|
|
|
v2=""
|
|
|
|
v3=""
|
|
|
|
|
2021-01-18 17:48:00 +01:00
|
|
|
if [ "$level" -lt 35 ]; then
|
2021-01-18 15:22:42 +01:00
|
|
|
printf "$v1 "
|
2021-01-18 17:48:00 +01:00
|
|
|
elif [ "$level" -lt 60 ]; then
|
2021-01-18 15:22:42 +01:00
|
|
|
printf "$v2 "
|
2021-01-18 17:48:00 +01:00
|
|
|
elif [ "$level" -lt 100 ]; then
|
2021-01-18 15:22:42 +01:00
|
|
|
printf "$v3 "
|
2020-05-09 21:26:23 +02:00
|
|
|
fi
|
|
|
|
|
2021-01-18 17:48:00 +01:00
|
|
|
echo "$level%"
|