20 lines
486 B
Plaintext
Raw Normal View History

2021-08-02 05:18:07 -06:00
#!/usr/bin/env sh
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
}
function set_volume {
current_default=$(pahelper list | grep '*' | all_after_char ":" | xargs)
environment_variable_exists USE_ONLY_O_PASINK && pahelper "$current_default"
# XXX: this does not prevent volumes higher than 100
pulsemixer "$@"
pashowvolume
}