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