From 320ff39885880dc66fd5001cbf866a21a02391bb Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sat, 4 Jul 2020 21:44:00 +0200 Subject: [PATCH] added option to disable autoscan --- bt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bt b/bt index 0b8ac8b..e8f66c5 100755 --- a/bt +++ b/bt @@ -1,7 +1,7 @@ #!/bin/sh - SCAN_PERIOD=5 AUTOTRUST=false +AUTOSCAN=true #immediately start scanning when started to speed up pairing process #locations of blacklist and hard coded list of paired devices (watch out, need to modify Makefile as well if you want to change these values and still use make install) BLACKLIST=${XDG_DATA_HOME:-$HOME/.local/share}/bt/blacklist PAIRLIST=${XDG_DATA_HOME:-$HOME/.local/share}/bt/paired @@ -54,8 +54,11 @@ update_pair_list(){ #start scanning as early as possible to speed up pairing process #=> maybe use an option to do this? Otherwise ever invocation of bt powers on the controller. -power on -scan on +if $AUTOSCAN +then + power on + scan on +fi update_pair_list & # shellcheck disable=SC1091