removed unnecessary outputs to console that were used for debugging

This commit is contained in:
Alexander Bocken 2020-04-18 21:50:24 +02:00
parent c9762f7f34
commit 47c4013835

View File

@ -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<NF; i++) printf $i " "; print $NF}' | sed 's/ $//')
echo $Devices > /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