mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-22 12:20:07 +00:00
use fancier battery icons with nerd fonts
This commit is contained in:
parent
fd96e92df6
commit
1ad0e713a4
3 changed files with 15 additions and 19 deletions
|
@ -692,16 +692,12 @@ fi
|
||||||
# Show battery in red when it's below this level and not connected to power supply.
|
# Show battery in red when it's below this level and not connected to power supply.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
|
typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
|
||||||
typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160
|
typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160
|
||||||
# Show battery in green when it's charging.
|
# Show battery in green when it's charging or fully charged.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND=70
|
typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70
|
||||||
# Show battery in yellow when not connected to power supply.
|
# Show battery in yellow when it's discharging.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
|
typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
|
||||||
# Battery pictograms going from low to high level of charge.
|
# Battery pictograms going from low to high level of charge.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_STAGES='▁▂▃▄▅▆▇'
|
typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█')
|
||||||
# Display battery pictogram without background.
|
|
||||||
typeset -g POWERLEVEL9K_BATTERY_VISUAL_IDENTIFIER_EXPANSION='%k${P9K_VISUAL_IDENTIFIER}'
|
|
||||||
# Don't show battery when it's fully charged and connected to power supply.
|
|
||||||
typeset -g POWERLEVEL9K_BATTERY_CHARGED_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
|
|
||||||
# Don't show the remaining time to charge/discharge.
|
# Don't show the remaining time to charge/discharge.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
|
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
|
||||||
|
|
||||||
|
|
|
@ -672,16 +672,12 @@ fi
|
||||||
# Show battery in red when it's below this level and not connected to power supply.
|
# Show battery in red when it's below this level and not connected to power supply.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
|
typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
|
||||||
typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160
|
typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160
|
||||||
# Show battery in green when it's charging.
|
# Show battery in green when it's charging or fully charged.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND=70
|
typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70
|
||||||
# Show battery in yellow when not connected to power supply.
|
# Show battery in yellow when it's discharging.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
|
typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
|
||||||
# Battery pictograms going from low to high level of charge.
|
# Battery pictograms going from low to high level of charge.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_STAGES='▁▂▃▄▅▆▇'
|
typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█')
|
||||||
# Display battery pictogram on black background.
|
|
||||||
typeset -g POWERLEVEL9K_BATTERY_VISUAL_IDENTIFIER_EXPANSION='%K{232}${P9K_VISUAL_IDENTIFIER}%k'
|
|
||||||
# Don't show battery when it's fully charged and connected to power supply.
|
|
||||||
typeset -g POWERLEVEL9K_BATTERY_CHARGED_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
|
|
||||||
# Don't show the remaining time to charge/discharge.
|
# Don't show the remaining time to charge/discharge.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
|
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
|
||||||
|
|
||||||
|
|
|
@ -1227,9 +1227,13 @@ function generate_config() {
|
||||||
uncomment 'typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION'
|
uncomment 'typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION'
|
||||||
uncomment 'typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION'
|
uncomment 'typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION'
|
||||||
uncomment 'typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION'
|
uncomment 'typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION'
|
||||||
sub VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION '🐍'
|
sub VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION "'🐍'"
|
||||||
sub ANACONDA_VISUAL_IDENTIFIER_EXPANSION '🐍'
|
sub ANACONDA_VISUAL_IDENTIFIER_EXPANSION "'🐍'"
|
||||||
sub PYENV_VISUAL_IDENTIFIER_EXPANSION '🐍'
|
sub PYENV_VISUAL_IDENTIFIER_EXPANSION "'🐍'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $POWERLEVEL9K_MODE == nerdfont-complete ]]; then
|
||||||
|
sub BATTERY_STAGES "\$'\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $style == classic ]]; then
|
if [[ $style == classic ]]; then
|
||||||
|
|
Loading…
Reference in a new issue