executable_volume-switch.sh 281 B

12345678910111213141516
  1. #!/bin/sh
  2. # Switch Pulseaudio sink between two of them.
  3. default_sink=$(ponymix defaults | awk '/^sink/ {gsub(":",""); print $2}');
  4. set_default_sink()
  5. {
  6. ponymix set-default --device "$1"
  7. }
  8. case "$default_sink" in
  9. 1) set_default_sink 0;;
  10. 0) set_default_sink 1;;
  11. esac