added failsafe to choice script so that no error occurs when closing dmenu without a choice
This commit is contained in:
parent
cfd82b29cf
commit
654d7cf14f
@ -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
|
||||
Loading…
Reference in New Issue
Block a user