diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-08-27 19:24:27 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-08-27 19:24:27 +0300 |
commit | 69fc4d295ce9927e3e401d2442bcefc867cf821c (patch) | |
tree | be9d8f8b91dc5ef36b2cb06e6f6ad75c1a873b64 /powerlevel9k.zsh-theme | |
parent | 61daa647f11019be316f51c4ade4b2e76c450de1 (diff) |
Bugfix: load segment changes the color reliably and is customizable.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 3142253b..2fedede0 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -583,15 +583,18 @@ prompt_load() { base=K fi - if [[ "$5min_load_avg" -gt 10 ]]; then - BACKGROUND_COLOR="001" - elif [[ "$5min_load_avg" -gt 3 ]]; then - BACKGROUND_COLOR="003" + if [[ "$load_avg_5min" -gt 10 ]]; then + BACKGROUND_COLOR="red" + FUNCTION_SUFFIX="_CRITICAL" + elif [[ "$load_avg_5min" -gt 3 ]]; then + BACKGROUND_COLOR="yellow" + FUNCTION_SUFFIX="_WARNING" else - BACKGROUND_COLOR="002" + BACKGROUND_COLOR="green" + FUNCTION_SUFFIX="_NORMAL" fi - $1_prompt_segment "$0" $BACKGROUND_COLOR "$DEFAULT_COLOR" "$(print_icon 'LOAD_ICON') $load_avg_5min $(print_icon 'RAM_ICON') $(printSizeHumanReadable $ramfree $base)" + $1_prompt_segment "$0$FUNCTION_SUFFIX" $BACKGROUND_COLOR "$DEFAULT_COLOR" "$(print_icon 'LOAD_ICON') $load_avg_5min $(print_icon 'RAM_ICON') $(printSizeHumanReadable $ramfree $base)" } # Right Status: (return code, root status, background jobs) |