iso-profiles/mabox-linux/desktop-overlay/etc/skel/.config/tint2/scripts/volumettf

26 lines
1.0 KiB
Plaintext
Raw Normal View History

2021-12-10 23:52:16 +01:00
#!/bin/bash
# Tint2 volume executor with ttf icons
2022-12-08 15:15:05 +01:00
muted=$(LANG=C pactl list sinks | awk '/Mute/ { print $2 }')
2021-12-10 23:52:16 +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-12-08 15:15:05 +01:00
echo "墳<sup><span size='xx-small'> $vol%</span></sup>"
2021-12-10 23:52:16 +01:00
elif [[ $vol -ge 70 ]]; then
2022-12-08 15:15:05 +01:00
echo "墳<sup><span size='xx-small'> $vol%</span></sup>"
2021-12-10 23:52:16 +01:00
elif [[ $vol -ge 60 ]]; then
2022-12-08 15:15:05 +01:00
echo "奔<sup><span size='xx-small'> $vol%</span></sup>"
2021-12-10 23:52:16 +01:00
elif [[ $vol -ge 50 ]]; then
2022-12-08 15:15:05 +01:00
echo "奔<sup><span size='xx-small'> $vol%</span></sup>"
2021-12-10 23:52:16 +01:00
elif [[ $vol -ge 30 ]]; then
2022-12-08 15:15:05 +01:00
echo "奔<sup><span size='xx-small'> $vol%</span></sup>"
2021-12-10 23:52:16 +01:00
elif [[ $vol -ge 10 ]]; then
2022-12-08 15:15:05 +01:00
echo "奄<sup><span size='xx-small'> $vol%</span></sup>"
2021-12-10 23:52:16 +01:00
elif [[ $vol -ge 0 ]]; then
2022-12-08 15:15:05 +01:00
echo "奄<sup><span size='xx-small'> $vol%</span></sup>"
2021-12-10 23:52:16 +01:00
fi
else
2022-12-08 15:15:05 +01:00
echo "婢<sup><span size='xx-small'> $vol%</span></sup>"
2021-12-10 23:52:16 +01:00
fi