#!/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 default_loc="$HOME/.cache/pactl-default-source" rm "$default_loc" --force # to ignore if it isn't there touch "$default_loc" echo "$choice" > "$default_loc" pactl set-default-source "$choice" # make sure that the chosen sink is the