aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.scripts/menuoutput
blob: e71430595d83ad49702059ae0e5e8c7b5656f9ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# Change audio output for all streams and set as default using dmenu

# Source settings from .dmenurc
if ! [ -f "$HOME/.dmenurc" ]; then
	cp /usr/share/dmenu/dmenurc $HOME/.dmenurc
fi
. $HOME/.dmenurc

output=$(listsinks | dmenu -i $DMENU_OPTIONS)

[ "$output" != "" ] || exit

changeoutput $output

notify-send "🔉 Audio output switched" "Audio output switched to '$output'"