Last active
January 8, 2024 17:00
-
-
Save aVolpe/a47737f1e3427f37669a16ea2643fe48 to your computer and use it in GitHub Desktop.
fzf SwitchAudioSource
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
foutput() { | |
# usage: | |
# foutput # to open picker | |
# foutput speakers # to select speakers | |
device="$(SwitchAudioSource -a -t output |\ | |
fzf-tmux --height=8 --cycle --no-mouse --no-multi --query=$1 -1 |\ | |
cut -f1 -d'(' | xargs)" | |
SwitchAudioSource -s "$device" | |
} | |
finput() { | |
# usage: | |
# finput # to open picker | |
# finput speakers # to select speakers | |
device="$(SwitchAudioSource -a -t input |\ | |
fzf-tmux --height=8 --cycle --no-mouse --no-multi --query=$1 -1 |\ | |
cut -f1 -d'(' | xargs)" | |
SwitchAudioSource -t input -s "$device" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment