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//"
}
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 "$@"

View File

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