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.

21 lines
606 B

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