make my bluetooth connector generic

This commit is contained in:
Felix Van der Jeugt 2015-10-08 15:31:23 +02:00
parent 5b273f9322
commit ff3318744f
2 changed files with 15 additions and 5 deletions

15
local/bin/bluetooth.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# choose MAC address
mac="$(dmenu <<HERE
headset 00:11:67:11:18:9B
zeusplay 60:E3:27:09:12:DE
HERE
)"
command="connect ${mac#* }"
if ! pgrep pulseaudio; then pulseaudio --start 2> /dev/null ; fi
cat "$command" <(echo "quit") \
| bluetoothctl > /dev/null 2>&1

View File

@ -1,5 +0,0 @@
#!/bin/bash
if ! pgrep pulseaudio; then pulseaudio --start 2> /dev/null ; fi
cat <(echo "connect 00:11:67:11:18:9B") <(echo "quit") \
| bluetoothctl > /dev/null 2>&1