From 57d4590b2b3024ce564ccc869d6369ea78dc1f33 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sat, 23 May 2020 15:42:33 +0200 Subject: [PATCH] cleaned up error codes --- bthandler | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bthandler b/bthandler index 3aa2699..0daa463 100755 --- a/bthandler +++ b/bthandler @@ -19,8 +19,8 @@ grep -vf "$BLACKLIST" /tmp/paired_devices > /tmp/disp_devices #Don't print empty device list, removes unnecessary empty choice in dmenu len=$(cat /tmp/disp_devices | wc -l) -[ $len -gt 0 ] && choice=$( printf "$(< /tmp/disp_devices)\n$actions" | dmenu -i -p 'What BT action would you like to perform:' ) [ $len -eq 0 ] && choice=$( printf "$actions" | dmenu -i -p 'What BT action would you like to perform:' ) +[ $len -gt 0 ] && choice=$( printf "$(< /tmp/disp_devices)\n$actions" | dmenu -i -p 'What BT action would you like to perform:' ) cleanup(){ rm -f /tmp/bt_devices @@ -29,10 +29,9 @@ cleanup(){ rm -f /tmp/new_devices rm -f /tmp/disp_devices bluetoothctl scan off > /dev/null - exit + exit 0 } - case $choice in "turn on") bluetoothctl power on cleanup;;