diff --git a/rofi-bluetooth b/rofi-bluetooth index c7916f2..e1ba11a 100755 --- a/rofi-bluetooth +++ b/rofi-bluetooth @@ -57,13 +57,12 @@ scan_on() { # Toggles scanning state toggle_scan() { if scan_on; then - kill $(pgrep -f "bluetoothctl scan on") + kill $(pgrep -f "bluetoothctl --timeout 5 scan on") bluetoothctl scan off show_menu else - bluetoothctl scan on & + bluetoothctl --timeout 5 scan on echo "Scanning..." - sleep 5 show_menu fi }