Andrew's git
/
scripts.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
pactl-switch fixes
author
Andrew Lorimer
<andrew@lorimer.id.au>
Mon, 24 Nov 2025 09:30:10 +0000
(20:30 +1100)
committer
Andrew Lorimer
<andrew@lorimer.id.au>
Mon, 24 Nov 2025 09:30:10 +0000
(20:30 +1100)
pactl-switch.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
5d1cc9f
)
diff --git
a/pactl-switch.sh
b/pactl-switch.sh
index 49ef175777cd515be8be98b8eecf70bcb383e2d3..2231660cd2148a4ae3b6a0a062dd81a7e057c7a3 100755
(executable)
--- a/
pactl-switch.sh
+++ b/
pactl-switch.sh
@@
-8,11
+8,14
@@
fi
declare -i active_sink_index=`pacmd list-sinks | sed -n -e 's/\*[[:space:]]index:[[:space:]]\([[:digit:]]\)/\1/p'`
+echo "Active sink: $active_sink_index"
+
active_index_position_found=0
let next_sink_index=-1
while read index ;
do
declare -i ind=($(echo $index | tr -dc '[0-9]+'))
+ echo "ind: $ind"
if [ $next_sink_index -lt 0 ] ; then
export next_sink_index=$ind
fi