mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Updated color variables.
This commit is contained in:
parent
5d9fda81e0
commit
0fcbfbda18
1 changed files with 20 additions and 8 deletions
|
|
@ -7,40 +7,52 @@
|
|||
# Linux (Gnome Terminal): export TERM="xterm-256color"
|
||||
# Mac OS X (iTerm2): Preferences > Profiles > Terminal > Report Terminal Type
|
||||
# xterm-256color
|
||||
# More colors:
|
||||
# for code in {000..255}; do print -P -- "$code: %F{$code}Test%f"; done
|
||||
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
|
||||
white="%F{15}"
|
||||
red="%F{1}"
|
||||
turquoise="%F{81}"
|
||||
orange="%F{166}"
|
||||
darkorange="%F{166}"
|
||||
orange="%F{214}"
|
||||
purple="%F{135}"
|
||||
hotpink="%F{161}"
|
||||
limegreen="%F{118}"
|
||||
else
|
||||
white="$fg[white]"
|
||||
red="$fg[red]"
|
||||
turquoise="$fg[cyan]"
|
||||
darkorange="$fg[red]"
|
||||
orange="$fg[yellow]"
|
||||
purple="$fg[magenta]"
|
||||
hotpink="$fg[red]"
|
||||
limegreen="$fg[green]"
|
||||
fi
|
||||
|
||||
# Bold
|
||||
boldwhite="$fg_bold[white]"
|
||||
boldred="$fg_bold[red]"
|
||||
|
||||
# Get the current ruby version in use with RVM:
|
||||
if [ -e ~/.rvm/bin/rvm-prompt ]; then
|
||||
RUBY_PROMPT_="%{$fg_bold[white]%}[%{$orange%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[white]%}]%{$reset_color%}"
|
||||
RUBY_PROMPT_="%{$boldwhite%}[%{$darkorange%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$boldwhite%}]%{$reset_color%}"
|
||||
else
|
||||
if which rbenv &> /dev/null; then
|
||||
RUBY_PROMPT_="%{$fg_bold[white]%}[%{$orange%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[white]%}]%{$reset_color%}"
|
||||
RUBY_PROMPT_="%{$boldwhite%}[%{$darkorange%}\$(rbenv version | sed -e 's/ (set.*$//')%{$boldwhite%}]%{$reset_color%}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Promp
|
||||
USR_DIR_PROMPT_="%{$hotpink%}%n: %{$turquoise%}%c "
|
||||
GIT_PROMPT_="%{$fg_bold[white]%}\$(git_prompt_info)%{$fg_bold[white]%} % %{$reset_color%}"
|
||||
GIT_PROMPT_="%{$boldwhite%}\$(git_prompt_info)%{$boldwhite%} % %{$reset_color%}"
|
||||
ICON_PROMPT="
|
||||
%{$fg_bold[red]%} ♣ %{$reset_color%}"
|
||||
%{$red%} ♣ %{$reset_color%}"
|
||||
PROMPT="$USR_DIR_PROMPT_$RUBY_PROMPT_$GIT_PROMPT_$ICON_PROMPT"
|
||||
|
||||
# Right Promp
|
||||
RPROMPT="%{$fg[magenta]%}%c%{$reset_color%}"
|
||||
RPROMPT="%{$purple%}%c%{$reset_color%}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="[%{$limegreen%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✹%{$fg[white]%}]%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[white]%}]"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$red%}✹%{$boldwhite%}]%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$boldwhite%}]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue