|
#!/bin/bash
|
|
|
|
SINK=$( pactl list short sinks | grep RUNNING | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | head -n 1 )
|
|
NOW=$( 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:' | awk -F ":" '{print $2}'| xargs)
|
|
|
|
if [ "$MUTE" = "yes" ]; then
|
|
echo "^c#a3be8c^婢 ^d^ $NOW%"
|
|
else
|
|
echo "^c#a3be8c^墳 ^d^ $NOW%"
|
|
fi
|
|
|
|
case $BLOCK_BUTTON in
|
|
1) setsid -f st -c stpulse -n stpulse -e ncpamixer ;;
|
|
esac
|