From bbad7146b3419fe89b3331b4839aa4d63b3e0a56 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sun, 5 Jul 2020 15:24:19 +0200 Subject: [PATCH] fixed bug where power option is not displayed --- bt | 1 + 1 file changed, 1 insertion(+) diff --git a/bt b/bt index df3671e..87182a5 100755 --- a/bt +++ b/bt @@ -80,6 +80,7 @@ paired_devices="$( ( bluetoothctl paired-devices && cat "$PAIRLIST" ) | sort -u disp_devices="$( echo "$paired_devices" | grep -vf "$BLACKLIST" )" #detects current power mode of controller and adjusts options accordingly +powerstatus="$( bluetoothctl show | grep Powered | awk '{print $2}' )" poweroption="$( echo "$powerstatus" | sed 's/yes/power off/; s/no/power on/' )" #Don't print empty device list, removes unnecessary empty choice in dmenu [ "$disp_devices" = "" ] && choice=$( printf "%s\n%s" "$actions" "$poweroption" | dmenu -i -p 'What BT action would you like to perform:' )