diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2022-01-10 14:21:20 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-01-10 14:21:20 -0700 |
| commit | 8f4949e51a5b4c563d4e5fc9ddf7123561cdf234 (patch) | |
| tree | 642e7e75595d33f5d02ceb142de34eaf4fd673a8 | |
| parent | 8ff5dec689c3f4577960c25e284add5a5e9a9fcf (diff) | |
| download | rde-8f4949e51a5b4c563d4e5fc9ddf7123561cdf234.tar.gz rde-8f4949e51a5b4c563d4e5fc9ddf7123561cdf234.tar.bz2 rde-8f4949e51a5b4c563d4e5fc9ddf7123561cdf234.zip | |
Change the Prompt for setting the sink.
| -rwxr-xr-x | extras/HOME/.local/bin/set-sink.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/extras/HOME/.local/bin/set-sink.sh b/extras/HOME/.local/bin/set-sink.sh index aa0b91c..bbbdc8d 100755 --- a/extras/HOME/.local/bin/set-sink.sh +++ b/extras/HOME/.local/bin/set-sink.sh @@ -1,6 +1,6 @@ #!/bin/bash -DMENU=(dmenu -i -nf "#88ff88" -sb "#88ff88" -p "Move Audio To" -l 12 -dim 0.4) +DMENU=(dmenu -i -nf "#88ff88" -sb "#88ff88" -l 12 -dim 0.4) sinks="$( pactl list sinks | while read line ; do @@ -40,9 +40,14 @@ if [[ "$(wc -l <<< "$client_input")" -gt 1 ]] ; then client_input="$("${DMENU[@]}" -p "Move Audio From" <<< "$client_input")" fi +if [[ "$client_input" == "" ]] ; then + exit 1 +fi + input_sink=${client_input//*#} +input_sink_name=${client_input%% #*} -selected_sink=$("${DMENU[@]}" <<< "$sinks") +selected_sink=$("${DMENU[@]}" -p "Move '$input_sink_name' To" <<< "$sinks") sink_num=${selected_sink//*#} echo "Sinks: $sinks" |