aboutsummaryrefslogtreecommitdiff
path: root/selectAudioSink.sh
diff options
context:
space:
mode:
Diffstat (limited to 'selectAudioSink.sh')
-rwxr-xr-xselectAudioSink.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/selectAudioSink.sh b/selectAudioSink.sh
new file mode 100755
index 0000000..58bf9f6
--- /dev/null
+++ b/selectAudioSink.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# selectAudioSink.sh
+#
+# Sets an audio sink.
+
+port="$(pactl list sinks |
+ sed -n '/Ports/,/Active Port/p' |
+ sed '/Ports/d;/Active/d;s/:.*$//;s/^\s*//' |
+ dmenu -c -bw 3 -i -l 10)"
+
+pactl set-sink-port alsa_output.pci-0000_00_1f.3.analog-stereo "$port"