Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
509 B

4 years ago
  1. #!/bin/bash
  2. SINK=$(pactl list short sinks | grep -n RUNNING | cut -d":" -f1)
  3. NOW=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $SINK | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
  4. MUTE=$(pactl list sinks | grep '^[[:space:]]Mute:'| head -n $SINK | tail -n 1 | awk -F ":" '{print $2}'| xargs)
  5. if [ "$MUTE" = "yes" ]; then
  6. echo "^c#a3be8c^婢 ^d^ $NOW%"
  7. else
  8. echo "^c#a3be8c^墳 ^d^ $NOW%"
  9. fi
  10. case $BLOCK_BUTTON in
  11. 1) setsid -f st -c stpulse -n stpulse -e ncpamixer ;;
  12. esac