This repository has been archived on 2025-12-28. You can view files and clone it, but cannot push or open issues or pull requests.
inks-scripts/scripts/set-default-sink

13 lines
363 B
Bash
Executable File

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