diff options
author | Ryan Kavanagh <rak@rak.ac> | 2025-08-21 13:21:45 -0400 |
---|---|---|
committer | Ryan Kavanagh <rak@rak.ac> | 2025-08-21 13:21:45 -0400 |
commit | f19f5df73ac0fdc3efa14649c4b646bcc4de84f4 (patch) | |
tree | c323a796deb32800dd3dc054fe778f1787d3f953 /dot_local/bin/executable_do_speakers.sh | |
parent | Adopt straight.el (diff) |
Move ~/bin to ~/.local/bin
Diffstat (limited to 'dot_local/bin/executable_do_speakers.sh')
-rwxr-xr-x | dot_local/bin/executable_do_speakers.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dot_local/bin/executable_do_speakers.sh b/dot_local/bin/executable_do_speakers.sh new file mode 100755 index 0000000..84b82e1 --- /dev/null +++ b/dot_local/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 |