make my bluetooth connector generic
This commit is contained in:
parent
5b273f9322
commit
ff3318744f
15
local/bin/bluetooth.sh
Executable file
15
local/bin/bluetooth.sh
Executable 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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user