config/.scripts/set-sound-card

11 lines
332 B
Bash
Executable File

#!/bin/bash
choice=$(pactl list short sinks | awk '{print $2}' | dmenu -i -p "which sink should be default?")
if [ $choice=="" ] ; then
exit 0;
fi
rm /tmp/pactl-default-sink --force # to ignore if it isn't there
echo "$choice" >> /tmp/pactl-default-sink
pactl set-default-sink $choice # make sure that the chosen sink is the