forked from colonelpanic/dotfiles
20 lines
486 B
Plaintext
20 lines
486 B
Plaintext
|
#!/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
|
||
|
}
|