Skip to content

Instantly share code, notes, and snippets.

View alete89's full-sized avatar
:octocat:
Focusing

Alejandro Dini alete89

:octocat:
Focusing
  • Mural
  • Argentina
View GitHub Profile
@alete89
alete89 / switch_output.sh
Created February 20, 2019 22:52
Switch sound output device
#!/bin/bash
new_sink=$(pacmd list-sinks | grep index | tee /dev/stdout | grep -m1 -A1 "* index" | tail -1 | cut -c12-)
echo "Setting default sink to: $new_sink";
pacmd set-default-sink $new_sink
pacmd list-sink-inputs | grep index | while read line
do
echo "Moving input: ";
echo $line | cut -f2 -d' ';

Keybase proof

I hereby claim:

  • I am alete89 on github.
  • I am alete (https://keybase.io/alete) on keybase.
  • I have a public key ASAVMSE0MBLJTBCN4JYeC46UsaLYCA0nwkXucRMSBQQ1Wwo

To claim this, I am signing this object: