diff options
author | Dean Fenster <dean.fenster@gmail.com> | 2016-12-03 21:02:52 +0300 |
---|---|---|
committer | Dean Fenster <dean.fenster@gmail.com> | 2016-12-03 21:02:52 +0300 |
commit | a637321d58935d4dc4ee25e97c7a2ee02f7c8387 (patch) | |
tree | e17a37fc2bfd89b9c14fd3902c6d500ffc655bc8 /powerlevel9k.zsh-theme | |
parent | 4bee6dc93db4ca411ac267431c9777cbc72eb60f (diff) |
Fixed syntax issue
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 8ada453d..c21d0b43 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -401,10 +401,11 @@ prompt_battery() { local battery_status=$(cat $bat/status) [[ $capacity -gt 100 ]] && local bat_percent=100 || local bat_percent=$capacity [[ $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 [[ $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 if [[ -f /usr/bin/acpi ]]; then local time_remaining=$(acpi | awk '{ print $5 }') |