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

Used the new "visual identifier" concept for the battery segment.

This commit is contained in:
Dominik Ritter 2015-12-15 00:55:55 +01:00
parent 0c528461fb
commit 1194826ef4

View file

@ -346,15 +346,15 @@ prompt_battery() {
fi
# prepare string
local message="$(print_icon 'BATTERY_ICON')"
local message
# Default behavior: Be verbose!
set_default POWERLEVEL9K_BATTERY_VERBOSE true
if [[ "$POWERLEVEL9K_BATTERY_VERBOSE" == true ]]; then
message="$message $bat_percent%%$remain"
message="$bat_percent%%$remain"
fi
# display prompt_segment
[[ -n $bat_percent ]] && "$1_prompt_segment" "${0}_${current_state}" "$DEFAULT_COLOR" "${battery_states[$current_state]}" "$message"
[[ -n $bat_percent ]] && "$1_prompt_segment" "${0}_${current_state}" "$DEFAULT_COLOR" "${battery_states[$current_state]}" "$message" 'BATTERY_ICON'
}
# Context: user@hostname (who am I and where am I)