Fix some things

This commit is contained in:
Jacob 2023-08-06 16:15:46 +02:00
parent cca701c551
commit 0c6ccfff22

View file

@ -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 &