[shell] Make set volume move output to particular sink

This commit is contained in:
Ivan Malison 2017-07-17 12:33:12 -07:00
parent 31d3f9fe4a
commit 19bf41d9cd
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
3 changed files with 15 additions and 2 deletions

View File

@ -1,4 +1,16 @@
#!/usr/bin/env zsh
function switch_sink_applications()
{
echo switching applications
pacmd list-sink-inputs |
awk '/index:/{print $2}' |
xargs -r -I{} pacmd move-sink-input {} $1 ||
echo failed
}
current_default=$(pahelper.sh list | grep '*' | all_after_char ":" | xargs)
environment_variable_exists USE_ONLY_ONE_PASINK && pahelper.sh "$current_default"
pulseaudio-ctl "$@"
pashowvolume

View File

@ -1,5 +1,8 @@
source "$HOME/.lib/shellpath.sh"
test -r ~/.customenv.sh && source ~/.customenv.sh
source_if_exists ~/.this-machine-env.sh
environment_variable_exists ENVIRONMENT_SETUP_DONE || _setup_env
# TODO(imalison): These need to run every time because of how their

View File

@ -1,3 +1 @@
source ~/.lib/shellenv.sh
test -r ~/.customenv.sh && source ~/.customenv.sh
source_if_exists ~/.this-machine-env.sh