From 0c6ccfff22e911e9bc8b28aaa3a5fc8e569e94ae Mon Sep 17 00:00:00 2001 From: speedie Date: Sun, 6 Aug 2023 16:15:46 +0200 Subject: [PATCH] Fix some things --- bluetooth-spmenu | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 &