2022-08-24 18:17:29 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
per="$(pamixer --get-volume)"
|
|
|
|
|
2022-09-26 17:17:27 +02:00
|
|
|
if pamixer --get-mute | rg -q true; then
|
2022-08-24 18:17:29 +02:00
|
|
|
icon="婢"
|
|
|
|
elif [ "$per" -gt 66 ]; then
|
|
|
|
icon="墳" # high
|
|
|
|
elif [ "$per" -gt 33 ]; then
|
|
|
|
icon="奔" # med
|
|
|
|
else
|
|
|
|
icon="奄" #low
|
|
|
|
fi
|
|
|
|
|
|
|
|
printf "{\"icon\": \"${icon}\", \"percent\": \"${per}\"}"
|