diff --git a/dotfiles/lib/bin/set_volume.sh b/dotfiles/lib/bin/set_volume.sh index a7371c00..b2771cc6 100755 --- a/dotfiles/lib/bin/set_volume.sh +++ b/dotfiles/lib/bin/set_volume.sh @@ -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 diff --git a/dotfiles/lib/shellenv.sh b/dotfiles/lib/shellenv.sh index 73958245..8a1c7a6f 100644 --- a/dotfiles/lib/shellenv.sh +++ b/dotfiles/lib/shellenv.sh @@ -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 diff --git a/dotfiles/zshenv b/dotfiles/zshenv index 81189f23..391cdeb5 100644 --- a/dotfiles/zshenv +++ b/dotfiles/zshenv @@ -1,3 +1 @@ source ~/.lib/shellenv.sh -test -r ~/.customenv.sh && source ~/.customenv.sh -source_if_exists ~/.this-machine-env.sh