aboutsummaryrefslogtreecommitdiff
path: root/bin/executable_do_speakers.sh
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2021-12-13 17:23:42 -0500
committerRyan Kavanagh <rak@rak.ac>2021-12-13 17:23:42 -0500
commite1096db47d332f2e4bfb4f38d262bb94e69d9ad5 (patch)
tree1b26b1fedacd307a115cb3a963c8cc8a60a18e96 /bin/executable_do_speakers.sh
parenttypo (diff)
set exec and stuff
Diffstat (limited to 'bin/executable_do_speakers.sh')
-rwxr-xr-xbin/executable_do_speakers.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/executable_do_speakers.sh b/bin/executable_do_speakers.sh
new file mode 100755
index 0000000..84b82e1
--- /dev/null
+++ b/bin/executable_do_speakers.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+USB_CARD="alsa_card.usb-FiiO_DigiHug_USB_Audio-01"
+USB_SINK="alsa_output.usb-FiiO_DigiHug_USB_Audio-01.iec958-stereo"
+SPEAKERS="alsa_output.pci-0000_00_1b.0.analog-stereo"
+
+pacmd set-sink-mute "${USB_SINK}" 1
+pacmd set-sink-mute "${SPEAKERS}" 0
+
+for s in $(pacmd list-sink-inputs | awk '$1 == "index:" {print $2}')
+do
+ pacmd move-sink-input $s "${SPEAKERS}" >/dev/null 2>&1
+done