Skip to content

Instantly share code, notes, and snippets.

@rettichschnidi
Created June 25, 2017 19:32
Show Gist options
  • Save rettichschnidi/f7a6e1179ccf5caa3b6291df4e7f73be to your computer and use it in GitHub Desktop.
Save rettichschnidi/f7a6e1179ccf5caa3b6291df4e7f73be to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
readonly filename="/tmp/$(whoami)-usb-sound"
if [ -f ${filename} ]; then
rm "${filename}"
pacmd set-card-profile 0 output:analog-stereo+input:analog-stereo && pacmd set-card-profile 1 off
else
touch "${filename}"
pacmd set-card-profile 1 output:analog-stereo+input:analog-stereo && pacmd set-card-profile 0 off
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment