1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/sh # selectAudioSink.sh # # Sets an audio sink. LANG='en_US.UTF-8' port="$(pactl list sinks | sed -n '/Ports/,/Active Port/p' | sed '/Ports/d;/Active/d;s/:.*$//;s/^\s*//' | dmenu -l 10)" pactl set-sink-port alsa_output.pci-0000_00_1f.3.analog-stereo "$port"