Fix some things
This commit is contained in:
parent
cca701c551
commit
0c6ccfff22
|
@ -22,10 +22,15 @@ list_dev() {
|
||||||
list_dev
|
list_dev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scan_dev() {
|
||||||
|
bluetoothctl power on
|
||||||
|
bluetoothctl scan on
|
||||||
|
}
|
||||||
|
|
||||||
# Enable bluetooth and scan for devices
|
# Enable bluetooth and scan for devices
|
||||||
enable_bt() {
|
enable_bt() {
|
||||||
bluetoothctl power on > /dev/null && printf "Power: On\n"
|
scan_dev &
|
||||||
bluetoothctl scan on # Start scanning for devices
|
|
||||||
bluetoothctl devices | grep -q "No default controller" && printf "No Bluetooth controller was found.\n" && exit 1
|
bluetoothctl devices | grep -q "No default controller" && printf "No Bluetooth controller was found.\n" && exit 1
|
||||||
|
|
||||||
list_dev &
|
list_dev &
|
||||||
|
|
Loading…
Reference in a new issue