Новая тема

This commit is contained in:
eKa
2019-10-17 14:30:04 +05:00
parent 1556ee0394
commit ab63e47075
5 changed files with 83 additions and 47 deletions

View File

@@ -1,24 +1,38 @@
# Depends on the git plugin for work_in_progress()
# Depends on the git-prompt plugin
# Colors: black red green yellow blue magenta cyan white
# Symbols: … ● ✔ ✖ ↓ ↑ ➜ ☀ ♻ ⚒
# git-prompt customization
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[green]%}]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SEPARATOR=" "
ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[green]%}"
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[white]%}%{⚒%G%}"
ZSH_THEME_GIT_PROMPT_CONFLICTS="%{$fg[red]%}%{✖%G%}"
ZSH_THEME_GIT_PROMPT_CHANGED="%{$fg[yellow]%}%{☀%G%}"
ZSH_THEME_GIT_PROMPT_BEHIND="%{↓%G%}"
ZSH_THEME_GIT_PROMPT_AHEAD="%{↑%G%}"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[blue]%}%{?%G%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}%{✔%G%}"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}♻"
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
git_custom_status() {
local cb=$(git_current_branch)
if [ -n "$cb" ]; then
echo "$(parse_git_dirty)%{$fg_bold[yellow]%}$(work_in_progress)%{$reset_color%}$ZSH_THEME_GIT_PROMPT_PREFIX$(git_current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
fi
}
# Default mode (Small)
#ZSH_THEME_EOF_NAMES="${USER%%@*}@%m"
# RVM component of prompt
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}["
ZSH_THEME_RUBY_PROMPT_SUFFIX="]%{$reset_color%}"
case $ZSH_THEME_EOF_MODE in
mega)
ZSH_THEME_EOF_NAMES="%n@%M "
;;
big)
ZSH_THEME_EOF_NAMES="%n@%m "
;;
small)
ZSH_THEME_EOF_NAMES="${USER%%@*}@%m "
;;
tiny|*)
ZSH_THEME_EOF_NAMES=""
;;
esac
# Combine it all into a final right-side prompt
RPS1='$(git_custom_status)$(ruby_prompt_info) $EPS1'
#PROMPT='%B%{$fg[green]%}%n@%m%b %{$fg[cyan]%}%~% %(?.%{$fg[green]%}.%{$fg[red]%})%B%#%b '
PROMPT='%{$fg[green]%}[%B%{$fg[green]%}%n@%m%b %{$fg[cyan]%}%~% %{$fg[green]%}]%(?.%{$fg[green]%}.%{$fg[red]%})%B%#%b '
PROMPT='%{$fg[green]%}[%B%{$fg[green]%}$ZSH_THEME_EOF_NAMES%b%{$fg[cyan]%}%~% %{$fg[green]%}]%(?.%{$fg[green]%}.%{$fg[red]%})%B%#%b '