Fixed syntax issue

pull/22/head
Dean Fenster 8 years ago
parent 4bee6dc93d
commit a637321d58

@ -401,10 +401,11 @@ prompt_battery() {
local battery_status=$(cat $bat/status) local battery_status=$(cat $bat/status)
[[ $capacity -gt 100 ]] && local bat_percent=100 || local bat_percent=$capacity [[ $capacity -gt 100 ]] && local bat_percent=100 || local bat_percent=$capacity
[[ $battery_status =~ Charging || $battery_status =~ Full ]] && local connected=true [[ $battery_status =~ Charging || $battery_status =~ Full ]] && local connected=true
[[ $connected && $bat_percent =~ 100 ]] && current_state="charged"
[[ $connected && $bat_percent -lt 100 ]] && current_state="charging"
if [[ -z $connected ]]; then if [[ -z $connected ]]; then
[[ $bat_percent -lt $POWERLEVEL9K_BATTERY_LOW_THRESHOLD ]] && current_state="low" || current_state="disconnected" [[ $bat_percent -lt $POWERLEVEL9K_BATTERY_LOW_THRESHOLD ]] && current_state="low" || current_state="disconnected"
else
[[ $bat_percent =~ 100 ]] && current_state="charged"
[[ $bat_percent -lt 100 ]] && current_state="charging"
fi fi
if [[ -f /usr/bin/acpi ]]; then if [[ -f /usr/bin/acpi ]]; then
local time_remaining=$(acpi | awk '{ print $5 }') local time_remaining=$(acpi | awk '{ print $5 }')

Loading…
Cancel
Save