aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2015-11-25 02:21:20 +0300
committerDominik Ritter <dritter03@googlemail.com>2015-11-25 02:21:20 +0300
commit23e2a5406718dfd9117de8b63825cf63ee195ff2 (patch)
tree789fcc356e409d54f59c61dc7186b1899434fc6b /powerlevel9k.zsh-theme
parent323610cebf133ba998e5e5c964d2d41a547ba4b6 (diff)
Added a verbose mode.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme8
1 files changed, 7 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index ec447a47..76e75441 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -289,8 +289,14 @@ prompt_battery() {
[[ -n $tstring ]] && local remain=" ($tstring)"
fi
+ # prepare string
+ local message="$(print_icon 'BATTERY_ICON')"
+ if [[ "$POWERLEVEL9K_BATTERY_VERBOSE" == true ]]; then
+ message="$message $bat_percent%%$remain"
+ fi
+
# display prompt_segment
- [[ -n $bat_percent ]] && "$1_prompt_segment" "${0}_${current_state}" "$DEFAULT_COLOR" "${battery_states[$current_state]}" "$(print_icon 'BATTERY_ICON') $bat_percent%%$remain"
+ [[ -n $bat_percent ]] && "$1_prompt_segment" "${0}_${current_state}" "$DEFAULT_COLOR" "${battery_states[$current_state]}" "$message"
}
# Context: user@hostname (who am I and where am I)