From 47c401383552350e704d33afeb168fdf06e015ae Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sat, 18 Apr 2020 21:50:24 +0200 Subject: [PATCH] removed unnecessary outputs to console that were used for debugging --- bthandler | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bthandler b/bthandler index 4934d87..1cda360 100755 --- a/bthandler +++ b/bthandler @@ -5,9 +5,9 @@ IDS=$(bluetoothctl paired-devices | awk '{print $2}') echo $IDS > /tmp/bt_IDS Devices=$(bluetoothctl paired-devices | awk '{for (i=3; i /tmp/bt_devices + actions="\nturn off\nturn on\nscan on\npair" choice=$( echo $Devices$actions | dmenu -p 'BT:' ) -echo choice: $choice"test" cleanup(){ rm -f /tmp/bt_devices @@ -37,11 +37,9 @@ case $choice in choice=$( echo $new_devices | dmenu -l 10 -p 'pair with which device?:' ) if [ -n "$choice" ]; then bluetoothctl devices | awk '{print $2}' > /tmp/bt_IDS - choice=$( echo $choice | sed 's/ $//') dev_no=$(echo $all_devices | cat -n | grep "$choice" | awk '{print $1}') - echo device_no: $dev_no"neger" dev_id=$(cat -n /tmp/bt_IDS | grep -E $dev_no"[[:space:]]" | awk '{print $2}' ) - echo dev_id: $dev_id"test" + bluetoothctl pair $dev_id && sleep 2 bluetoothctl connect $dev_id bluetoothctl scan off @@ -53,9 +51,7 @@ esac if [ -n "$choice" ]; then choice=$( echo $choice | sed 's/ $//') dev_no=$(cat -n /tmp/bt_devices | grep "$choice" | awk '{print $1}') - echo device_no: $dev_no dev_id=$(cat -n /tmp/bt_IDS | grep $dev_no | awk '{print $2}') - echo dev_id: $dev_id"test" bluetoothctl power on bluetoothctl connect $dev_id fi