13 lines
363 B
Bash
Executable File
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 |