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.

18 lines
545 B

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