Fix some functions

This commit is contained in:
Ivan Malison 2021-08-02 05:56:09 -06:00
parent 5720048067
commit 1ef2ad407e
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
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//" 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 ] [ ! -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_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 esac
} }
pahelper pahelper "$@"

View File

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

View File

@ -1,14 +1,5 @@
#!/usr/bin/env sh #!/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 { function set_volume {
current_default=$(pahelper list | grep '*' | all_after_char ":" | xargs) current_default=$(pahelper list | grep '*' | all_after_char ":" | xargs)
environment_variable_exists USE_ONLY_O_PASINK && pahelper "$current_default" environment_variable_exists USE_ONLY_O_PASINK && pahelper "$current_default"
@ -17,3 +8,5 @@ function set_volume {
pulsemixer "$@" pulsemixer "$@"
pashowvolume pashowvolume
} }
set_volume "$@"

View File

@ -294,7 +294,7 @@
"nixpkgs_10": { "nixpkgs_10": {
"locked": { "locked": {
"narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=",
"path": "./nixpkgs", "path": "/nix/store/j2f79wqwpx91rrbn3hpajxnhg76bgwsz-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
@ -305,7 +305,7 @@
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=",
"path": "./nixpkgs", "path": "/nix/store/j2f79wqwpx91rrbn3hpajxnhg76bgwsz-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
@ -316,7 +316,7 @@
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=",
"path": "./nixpkgs", "path": "/nix/store/j2f79wqwpx91rrbn3hpajxnhg76bgwsz-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
@ -327,7 +327,7 @@
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=",
"path": "./nixpkgs", "path": "/nix/store/j2f79wqwpx91rrbn3hpajxnhg76bgwsz-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
@ -338,7 +338,7 @@
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=",
"path": "./nixpkgs", "path": "/nix/store/j2f79wqwpx91rrbn3hpajxnhg76bgwsz-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
@ -349,7 +349,7 @@
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=",
"path": "./nixpkgs", "path": "/nix/store/j2f79wqwpx91rrbn3hpajxnhg76bgwsz-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
@ -360,7 +360,7 @@
"nixpkgs_7": { "nixpkgs_7": {
"locked": { "locked": {
"narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=",
"path": "./nixpkgs", "path": "/nix/store/j2f79wqwpx91rrbn3hpajxnhg76bgwsz-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
@ -371,7 +371,7 @@
"nixpkgs_8": { "nixpkgs_8": {
"locked": { "locked": {
"narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=",
"path": "./nixpkgs", "path": "/nix/store/j2f79wqwpx91rrbn3hpajxnhg76bgwsz-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
@ -382,7 +382,7 @@
"nixpkgs_9": { "nixpkgs_9": {
"locked": { "locked": {
"narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=",
"path": "./nixpkgs", "path": "/nix/store/j2f79wqwpx91rrbn3hpajxnhg76bgwsz-source",
"type": "path" "type": "path"
}, },
"original": { "original": {