added option to disable autoscan
This commit is contained in:
parent
26d0f11fd0
commit
320ff39885
5
bt
5
bt
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
SCAN_PERIOD=5
|
SCAN_PERIOD=5
|
||||||
AUTOTRUST=false
|
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)
|
#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
|
BLACKLIST=${XDG_DATA_HOME:-$HOME/.local/share}/bt/blacklist
|
||||||
PAIRLIST=${XDG_DATA_HOME:-$HOME/.local/share}/bt/paired
|
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
|
#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.
|
#=> maybe use an option to do this? Otherwise ever invocation of bt powers on the controller.
|
||||||
|
if $AUTOSCAN
|
||||||
|
then
|
||||||
power on
|
power on
|
||||||
scan on
|
scan on
|
||||||
|
fi
|
||||||
update_pair_list &
|
update_pair_list &
|
||||||
|
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
|
Loading…
Reference in New Issue
Block a user