diff --git a/.scripts/set-sound-card b/.scripts/set-sound-card index 1dd2a1a..e55b7d1 100755 --- a/.scripts/set-sound-card +++ b/.scripts/set-sound-card @@ -2,6 +2,10 @@ 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 \ No newline at end of file