diff --git a/bluetooth-spmenu b/bluetooth-spmenu index 4c3597d..34113f2 100755 --- a/bluetooth-spmenu +++ b/bluetooth-spmenu @@ -22,10 +22,15 @@ list_dev() { list_dev } +scan_dev() { + bluetoothctl power on + bluetoothctl scan on +} + # Enable bluetooth and scan for devices enable_bt() { - bluetoothctl power on > /dev/null && printf "Power: On\n" - bluetoothctl scan on # Start scanning for devices + scan_dev & + bluetoothctl devices | grep -q "No default controller" && printf "No Bluetooth controller was found.\n" && exit 1 list_dev &