1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-16 17:50:09 +00:00

Merge branch 'noverbose-battery' of https://github.com/dnmiller/powerlevel9k into nonverbose-battery

This commit is contained in:
Ben Hilburn 2016-07-12 20:44:30 -04:00
commit 96731951be
2 changed files with 3 additions and 0 deletions

View file

@ -178,6 +178,7 @@ requires `acpi` on Linux).
|`POWERLEVEL9K_BATTERY_DISCONNECTED`|`$DEFAULT_COLOR`|Color to indicate absence of battery.| |`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_THRESHOLD`|`10`|Threshold to consider battery level critical.|
|`POWERLEVEL9K_BATTERY_LOW_COLOR`|`"red"`|Color to indicate critically low charge level.| |`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` Note that you can [modify the `_FOREGROUND`
color](https://github.com/bhilburn/powerlevel9k/wiki/Stylizing-Your-Prompt#segment-color-customization) color](https://github.com/bhilburn/powerlevel9k/wiki/Stylizing-Your-Prompt#segment-color-customization)

View file

@ -420,6 +420,8 @@ prompt_battery() {
set_default POWERLEVEL9K_BATTERY_VERBOSE true set_default POWERLEVEL9K_BATTERY_VERBOSE true
if [[ "$POWERLEVEL9K_BATTERY_VERBOSE" == true ]]; then if [[ "$POWERLEVEL9K_BATTERY_VERBOSE" == true ]]; then
message="$bat_percent%%$remain" message="$bat_percent%%$remain"
else
message="$bat_percent%%"
fi fi
# Draw the prompt_segment # Draw the prompt_segment