fixed bug where power option is not displayed
This commit is contained in:
parent
b061212d81
commit
bbad7146b3
1
bt
1
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:' )
|
||||
|
Loading…
Reference in New Issue
Block a user