mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-16 09:50:06 +00:00
replace POWERLEVEL9K_BATTERY_STAGES hack with proper code
This commit is contained in:
parent
38da6a3c9b
commit
e986f0a96c
1 changed files with 1 additions and 2 deletions
|
@ -792,8 +792,7 @@ prompt_battery() {
|
|||
if (( $#POWERLEVEL9K_BATTERY_STAGES )); then
|
||||
local -i idx=$#POWERLEVEL9K_BATTERY_STAGES
|
||||
(( bat_percent < 100 )) && idx=$((bat_percent * $#POWERLEVEL9K_BATTERY_STAGES / 100 + 1))
|
||||
icon+=_$idx
|
||||
typeset -g POWERLEVEL9K_$icon=$POWERLEVEL9K_BATTERY_STAGES[idx]
|
||||
icon=$'\1'${(g::)POWERLEVEL9K_BATTERY_STAGES[idx]}
|
||||
fi
|
||||
|
||||
local bg=$DEFAULT_COLOR
|
||||
|
|
Loading…
Reference in a new issue