diff options
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 75020860..ef6d487d 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -138,8 +138,8 @@ case $POWERLEVEL9K_MODE in FREEBSD_ICON $'\U1F608 ' # 😈 LINUX_ICON $'\UE271' # SUNOS_ICON $'\U1F31E ' # 🌞 - HOME_ICON $'\UE12C' # - NETWORK_ICON $'\UE1AD' # + HOME_ICON $'\UE12C ' # + NETWORK_ICON $'\UE1AD ' # LOAD_ICON $'\UE190 ' # #RAM_ICON $'\UE87D' # RAM_ICON $'\UE1E2 ' # @@ -307,7 +307,7 @@ VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%F{$POWERLEVEL9K_VCS_FOREGROUND}%b%c%u% zstyle ':vcs_info:git*:*' formats "%F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_GIT_ICON')%f$VCS_DEFAULT_FORMAT" zstyle ':vcs_info:hg*:*' formats "%F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_HG_ICON')%f$VCS_DEFAULT_FORMAT" -zstyle ':vcs_info:*' actionformats " %b %F{red}| %a%f" +zstyle ':vcs_info:*' actionformats "%b %F{red}| %a%f" zstyle ':vcs_info:*' stagedstr " %F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_STAGED_ICON')%f" zstyle ':vcs_info:*' unstagedstr " %F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_UNSTAGED_ICON')%f" @@ -426,7 +426,7 @@ prompt_vcs() { $1_prompt_segment "$0" "green" "$DEFAULT_COLOR" fi - echo -n "%F{$POWERLEVEL9K_VCS_FOREGROUND}%f$vcs_prompt " + echo -n "$vcs_prompt " fi } @@ -559,7 +559,7 @@ prompt_dir() { fi - $1_prompt_segment "$0" "blue" "$DEFAULT_COLOR" "$(print_icon 'HOME_ICON') $current_path" + $1_prompt_segment "$0" "blue" "$DEFAULT_COLOR" "$(print_icon 'HOME_ICON')$current_path" } # Command number (in local history) @@ -800,6 +800,14 @@ build_right_prompt() { } powerlevel9k_init() { + # Display a warning if the terminal does not support 256 colors + local term_colors + term_colors=$(tput colors) + if (( $term_colors < 256 )); then + print -P "%F{red}WARNING!%f Your terminal supports less than 256 colors!" + print "You should set TERM=xterm-256colors in your ~/.zshrc" + fi + setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS prompt_opts=(cr percent subst) |