2021-11-20 17:12:07 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# Tint2 volume executor with ttf icons
|
|
|
|
|
2022-04-15 19:02:01 +02:00
|
|
|
muted=$(LANG=C pactl list sinks | awk '/Mute/ { print $2 }')
|
2021-11-20 17:12:07 +01:00
|
|
|
vol=$(LANG=C pactl list sinks | awk '/Volume:/ {printf "%s ",$5}' | cut -f1 -d ' ' | cut -f1 -d '%')
|
|
|
|
|
|
|
|
if [[ $muted = "no" ]]; then
|
|
|
|
if [[ $vol -ge 80 ]]; then
|
2022-09-20 13:58:30 +02:00
|
|
|
echo "墳<sup><span size='xx-small'> $vol%</span></sup>"
|
2021-11-20 17:12:07 +01:00
|
|
|
elif [[ $vol -ge 70 ]]; then
|
2022-09-20 13:58:30 +02:00
|
|
|
echo "墳<sup><span size='xx-small'> $vol%</span></sup>"
|
2021-11-20 17:12:07 +01:00
|
|
|
elif [[ $vol -ge 60 ]]; then
|
2022-09-20 13:58:30 +02:00
|
|
|
echo "奔<sup><span size='xx-small'> $vol%</span></sup>"
|
2021-11-20 17:12:07 +01:00
|
|
|
elif [[ $vol -ge 50 ]]; then
|
2022-09-20 13:58:30 +02:00
|
|
|
echo "奔<sup><span size='xx-small'> $vol%</span></sup>"
|
2021-11-20 17:12:07 +01:00
|
|
|
elif [[ $vol -ge 30 ]]; then
|
2022-09-20 13:58:30 +02:00
|
|
|
echo "奔<sup><span size='xx-small'> $vol%</span></sup>"
|
2021-11-20 17:12:07 +01:00
|
|
|
elif [[ $vol -ge 10 ]]; then
|
2022-09-20 13:58:30 +02:00
|
|
|
echo "奄<sup><span size='xx-small'> $vol%</span></sup>"
|
2021-11-20 17:12:07 +01:00
|
|
|
elif [[ $vol -ge 0 ]]; then
|
2022-09-20 13:58:30 +02:00
|
|
|
echo "奄<sup><span size='xx-small'> $vol%</span></sup>"
|
2021-11-20 17:12:07 +01:00
|
|
|
fi
|
|
|
|
else
|
2022-09-20 13:58:30 +02:00
|
|
|
echo "婢<sup><span size='xx-small'> $vol%</span></sup>"
|
2021-11-20 17:12:07 +01:00
|
|
|
fi
|