From 0a561b3b027f9ea75530ec5a23c8850e32d3afd7 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sun, 19 Apr 2020 10:38:08 +0200 Subject: [PATCH] Removed scan option from selection since pair does most of it, can still be selected by typing it --- bthandler | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bthandler b/bthandler index c6a9d54..bd27242 100755 --- a/bthandler +++ b/bthandler @@ -2,7 +2,7 @@ #wait time to discover new devices in seconds SCAN_PERIOD=5 BLACKLIST=$HOME/.local/bin/tools/bt_blacklist -actions="turn off\nturn on\nscan on\npair" +actions="turn off\nturn on\npair" bluetoothctl paired-devices | awk '{print $2}' > /tmp/bt_IDS bluetoothctl paired-devices | awk '{for (i=3; i /tmp/paired_devices @@ -30,7 +30,7 @@ case $choice in "turn off") bluetoothctl power off cleanup;; "scan on") bluetoothctl power on && echo power on && sleep 2 - st -e bluetoothctl scan on + [ -n $TERMINAL ] && ($TERMINAL -e bluetoothctl scan on ) || st bluetoothctl scan on cleanup;; "pair") bluetoothctl power on bluetoothctl scan on & disown