1
0
Fork 0
ryzowanie/config/i3blocks/blocklets/pasink

19 lines
405 B
Text
Raw Permalink Normal View History

2024-06-11 21:55:28 +02:00
#!/bin/sh
SINK=$(pamixer --get-default-sink | tail -n 1 | cut -d" " -f1)
case $BLOCK_BUTTON in
1) pamixer --sink $SINK -t ;;
3) pavucontrol ;;
4) pamixer --sink $SINK -i 5 ;;
5) pamixer --sink $SINK -d 5 ;;
esac
vol=$(pamixer --sink $SINK --get-volume)%
if [[ $(pamixer --sink $SINK --get-mute) = "true" ]]
then
echo '<span foreground="#FF0000"> '$vol'</span>'
else
echo "" $vol
fi