2022-12-10 17:09:35 -08:00
|
|
|
|
2023-05-07 16:51:37 -07:00
|
|
|
sink=$( pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | head -n 1 )
|
|
|
|
volume=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
|
|
|
|
mute=$(pactl list sinks | grep '^[[:space:]]Mute:' | head -n $(( $SINK + 1 )) | tail -n 1 | awk '{print $2}')
|
|
|
|
|
2022-12-10 17:09:35 -08:00
|
|
|
if [ "$mute" == "yes" ]; then
|
2023-05-07 16:51:37 -07:00
|
|
|
color="#f92672"
|
2022-12-10 17:09:35 -08:00
|
|
|
else
|
2023-05-07 16:51:37 -07:00
|
|
|
color="#a6e22e"
|
2022-12-10 17:09:35 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "<fc=$color> $volume%</fc>"
|