aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2016-07-13 03:44:30 +0300
committerBen Hilburn <bhilburn@gmail.com>2016-07-13 03:44:30 +0300
commit96731951be63a6cc392e017bb147b39f89ec22c3 (patch)
treea4978a16a4f16f94977919bb8aeaf05a18056517
parent3291b4d476fdd43a2a111f811f99f1ee088843e4 (diff)
parentd39e57f4d73b0c7c8bd4d7363e3bf98fdbde5dd2 (diff)
Merge branch 'noverbose-battery' of https://github.com/dnmiller/powerlevel9k into nonverbose-battery
-rw-r--r--README.md1
-rwxr-xr-xpowerlevel9k.zsh-theme2
2 files changed, 3 insertions, 0 deletions
diff --git a/README.md b/README.md
index 164b484f..6583624c 100644
--- a/README.md
+++ b/README.md
@@ -178,6 +178,7 @@ requires `acpi` on Linux).
|`POWERLEVEL9K_BATTERY_DISCONNECTED`|`$DEFAULT_COLOR`|Color to indicate absence of battery.|
|`POWERLEVEL9K_BATTERY_LOW_THRESHOLD`|`10`|Threshold to consider battery level critical.|
|`POWERLEVEL9K_BATTERY_LOW_COLOR`|`"red"`|Color to indicate critically low charge level.|
+|`POWERLEVEL9K_BATTERY_VERBOSE`|`true`|Display time remaining next to battery level.|
Note that you can [modify the `_FOREGROUND`
color](https://github.com/bhilburn/powerlevel9k/wiki/Stylizing-Your-Prompt#segment-color-customization)
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 2b4f0dbd..2a875f34 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -420,6 +420,8 @@ prompt_battery() {
set_default POWERLEVEL9K_BATTERY_VERBOSE true
if [[ "$POWERLEVEL9K_BATTERY_VERBOSE" == true ]]; then
message="$bat_percent%%$remain"
+ else
+ message="$bat_percent%%"
fi
# Draw the prompt_segment