blob: f3a0745bc40e09f444a99bd429c8d2f185688f47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/bin/bash
case $BLOCK_BUTTON in
1) i3-msg "exec urxvt -e alsamixer" >/dev/null ;;
3) pgrep -x dunst >/dev/null && notify-send -h string:x-canonical-private-synchronous:i3volHint -t 2000 "Click for alsamixer" ;;
esac
vol=$(pactl list sinks | grep "Volume:" | sed 1q | awk '{print $5}')
mute=$(pactl list sinks | grep "Mute:" | cut -d' ' -f2)
if [ $mute = "no" ]; then
echo "🔊 $vol"
else
echo "🔇($vol)"
fi
|