mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
add syl20bnr.zsh-theme aimed to vi-mode users
This commit is contained in:
parent
cf03ee6d88
commit
e6f7f8ead1
1 changed files with 58 additions and 0 deletions
58
themes/syl20bnr.zsh-theme
Normal file
58
themes/syl20bnr.zsh-theme
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# ------------------------------------------------------------------------
|
||||
# Sylvain Benner oh-my-zsh theme
|
||||
# Original theme by Juan G. Hurtado
|
||||
# Needs the following plug ins:
|
||||
# - git for current_branch method
|
||||
# - vi-mode for mode display
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Color shortcuts
|
||||
RED=$fg[red]
|
||||
YELLOW=$fg[yellow]
|
||||
GREEN=$fg[green]
|
||||
WHITE=$fg[white]
|
||||
BLUE=$fg[blue]
|
||||
RED_BOLD=$fg_bold[red]
|
||||
YELLOW_BOLD=$fg_bold[yellow]
|
||||
GREEN_BOLD=$fg_bold[green]
|
||||
WHITE_BOLD=$fg_bold[white]
|
||||
BLUE_BOLD=$fg_bold[blue]
|
||||
RESET_COLOR=$reset_color
|
||||
|
||||
# Format for git_prompt_info()
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
|
||||
# Format for parse_git_dirty()
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RED%}(*)"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# Format for git_prompt_status()
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$RED%}unmerged"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED=" %{$RED%}deleted"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED=" %{$YELLOW%}renamed"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$YELLOW%}modified"
|
||||
ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN%}added"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$WHITE%}untracked"
|
||||
|
||||
# Format for git_prompt_ahead()
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED%}(!)"
|
||||
|
||||
# Format for git_prompt_long_sha() and git_prompt_short_sha()
|
||||
ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$WHITE%}[%{$YELLOW%}"
|
||||
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]"
|
||||
|
||||
# Format for VI mode
|
||||
INSERT_MODE="-- INSERT --"
|
||||
NORMAL_MODE="-- NORMAL --"
|
||||
VI_PROMPT=%{$GREEN%}"${INSERT_MODE}"
|
||||
function zle-keymap-select {
|
||||
VI_PROMPT="${${KEYMAP/vicmd/${RED}"${NORMAL_MODE}"}/(main|viins)/${GREEN}"${INSERT_MODE}"}"
|
||||
zle reset-prompt
|
||||
}
|
||||
|
||||
# Prompt format
|
||||
PROMPT='
|
||||
%{$BLUE_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
|
||||
${VI_PROMPT} ➤ %{$RESET_COLOR%}'
|
||||
RPROMPT='%{$GREEN_BOLD%}$(current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'
|
||||
Loading…
Add table
Add a link
Reference in a new issue