13 lines
245 B
Bash
Executable File
13 lines
245 B
Bash
Executable File
#!/usr/bin/sh
|
|
|
|
scan_first=$(echo -e "yes\nno" | dmenu -l 2)
|
|
|
|
if [[ ${scan_first} = 'yes' ]]; then
|
|
bluetoothctl scan on &
|
|
sleep 10 && kill $!
|
|
fi
|
|
|
|
device=$(bluetoothctl devices | dmenu -i -l 15 | cut -d ' ' -f 2)
|
|
|
|
bluetoothctl connect ${device}
|