Fix some functions

This commit is contained in:
2021-08-02 05:56:09 -06:00
parent 5720048067
commit 1ef2ad407e
7 changed files with 16 additions and 26 deletions

View File

@@ -9,4 +9,4 @@ function dbus-introspect {
org.freedesktop.DBus.Introspectable.Introspect | tail -n +2 | sed -e "s/^ *string//"
}
dbus-introspect
dbus-introspect "$@"

View File

@@ -5,5 +5,5 @@ function environment_variable_exists {
[ ! -z $value ]
}
environment_variable_exists
environment_variable_exists "$@"

View File

@@ -4,5 +4,5 @@ function get_sink_input_by_pid {
get_sink_input_info.hs | jq 'select(.application_process_id == "'"$thePID"'")'
}
get_sink_input_by_pid
get_sink_input_by_pid "$@"

View File

@@ -99,4 +99,4 @@ function pahelper {
esac
}
pahelper
pahelper "$@"

View File

@@ -1,10 +1,7 @@
#!/usr/bin/env sh
function path_lines {
IFS=':' read -A ADDR <<< "$PATH"
for one_path in "${ADDR[@]}"; do
echo $one_path
done
split_by_char ":" "$PATH"
}
path_lines

View File

@@ -1,14 +1,5 @@
#!/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"
@@ -17,3 +8,5 @@ function set_volume {
pulsemixer "$@"
pashowvolume
}
set_volume "$@"