Created
August 11, 2021 13:38
-
-
Save thenriquedb/3ed11b8c036f60a319f6dcc84750d016 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://unix.stackexchange.com/questions/62818/how-can-i-switch-between-different-audio-output-hardware-using-the-shell | |
CURRENT_PROFILE=$(pacmd list-cards | grep "active profile" | cut -d ' ' -f 3-) | |
if [ "$CURRENT_PROFILE" = "<output:hdmi-stereo>" ]; then | |
pacmd set-card-profile 0 "output:analog-stereo+input:analog-stereo" | |
else | |
pacmd set-card-profile 0 "output:hdmi-stereo" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment