forked from BreadOnPenguins/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdmenu_audioswitch
More file actions
29 lines (24 loc) · 739 Bytes
/
dmenu_audioswitch
File metadata and controls
29 lines (24 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/env/bin bash
# Set audio sinks before using!
# `pactl list sinks` if on pulseaudio.
headphones () { \
pacmd set-default-sink "SET SINK NAME" &
notify-send -h string:bgcolor:#a3be8c "Audio switched to headphones!"
}
speakers () { \
pacmd set-default-sink "SET SINK NAME" &
notify-send -h string:bgcolor:#bf616a "Audio switched to speakers!"
}
bluetooth () { \
pacmd set-default-sink "SET SINK NAME" &
notify-send -h string:bgcolor:#88c0d0 "Audio switched to bluetooth!"
}
choosespeakers() { \
choice=$(printf "Headphones\\nSpeakers\\nBluetooth" | dmenu -c -l 3 -i -p "Choose output: ")
case "$choice" in
Headphones) headphones;;
Speakers) speakers;;
Bluetooth) bluetooth;;
esac
}
choosespeakers