1
0
Fork 0

modified theme

pull/789/head
Yuya Minami 10 years ago
parent d020d34e59
commit 764632bfca

@ -15,9 +15,9 @@
function prompt_steeef_precmd { function prompt_steeef_precmd {
# Check for untracked files or updated submodules since vcs_info does not. # Check for untracked files or updated submodules since vcs_info does not.
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
branch_format="(${_prompt_steeef_colors[1]}%b%f%u%c${_prompt_steeef_colors[4]}●%f)" branch_format="${_prompt_steeef_colors[7]}(%f${_prompt_steeef_colors[1]}%b%f%u%c${_prompt_steeef_colors[4]}*%f${_prompt_steeef_colors[7]})%f"
else else
branch_format="(${_prompt_steeef_colors[1]}%b%f%u%c)" branch_format="${_prompt_steeef_colors[7]}(%f${_prompt_steeef_colors[1]}%b%f%u%c${_prompt_steeef_colors[7]})%f"
fi fi
zstyle ':vcs_info:*:prompt:*' formats "${branch_format}" zstyle ':vcs_info:*:prompt:*' formats "${branch_format}"
@ -44,19 +44,41 @@ function prompt_steeef_setup {
# Use extended color pallete if available. # Use extended color pallete if available.
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
_prompt_steeef_colors=( _prompt_steeef_colors=(
"%F{81}" # Turquoise "%F{37}" # Turquoise
"%F{166}" # Orange "%F{136}" # Orange
"%F{135}" # Purple "%F{125}" # Purple
"%F{161}" # Hotpink "%F{160}" # Hotpink
"%F{118}" # Limegreen "%F{64}" # Limegreen
"%F{254}"
"%F{230}"
"%F{166}"
"%F{160}"
"%F{33}"
"%F{234}"
"%F{235}"
"%F{240}"
"%F{241}"
"%F{244}"
"%F{245}"
) )
else else
_prompt_steeef_colors=( _prompt_steeef_colors=(
"%F{cyan}" "%F{cyan}" # 1
"%F{yellow}" "%F{yellow}" # 2
"%F{magenta}" "%F{magenta}" # 3
"%F{red}" "%F{red}" # 4
"%F{green}" "%F{green}" # 5
"%F{white}" # 6
"%F{brwhite}" # 7
"%F{brred}" # 8
"%F{red}" # 9
"%F{blue}" # 10
"%F{brblack}" # 11
"%F{black}" # 12
"%F{brgreen}" # 13
"%F{bryellow}" # 14
"%F{brblue}" # 15
"%F{brcyan}" # 16
) )
fi fi
@ -67,10 +89,10 @@ function prompt_steeef_setup {
# %a - action (e.g. rebase-i) # %a - action (e.g. rebase-i)
# %R - repository path # %R - repository path
# %S - path in the repository # %S - path in the repository
local branch_format="(${_prompt_steeef_colors[1]}%b%f%u%c)" local branch_format="${_prompt_steeef_colors[7]}(%f${_prompt_steeef_colors[1]}%b%f%u%c${_prompt_steeef_colors[7]})%f"
local action_format="(${_prompt_steeef_colors[5]}%a%f)" local action_format="${_prompt_steeef_colors[7]}(%f${_prompt_steeef_colors[5]}%a%f${_prompt_steeef_colors[7]})%f"
local unstaged_format="${_prompt_steeef_colors[2]}%f" local unstaged_format="${_prompt_steeef_colors[2]}*%f"
local staged_format="${_prompt_steeef_colors[5]}%f" local staged_format="${_prompt_steeef_colors[5]}*%f"
# Set vcs_info parameters. # Set vcs_info parameters.
zstyle ':vcs_info:*' enable bzr git hg svn zstyle ':vcs_info:*' enable bzr git hg svn
@ -86,8 +108,8 @@ function prompt_steeef_setup {
# Define prompts. # Define prompts.
PROMPT=" PROMPT="
${_prompt_steeef_colors[3]}%n%f at ${_prompt_steeef_colors[2]}%m%f in ${_prompt_steeef_colors[5]}%~%f "'${vcs_info_msg_0_}'" ${_prompt_steeef_colors[1]}%n%f ${_prompt_steeef_colors[7]}at%f ${_prompt_steeef_colors[5]}%m%f ${_prompt_steeef_colors[7]}in%f ${_prompt_steeef_colors[2]}%~%f "'${vcs_info_msg_0_}'"
"'$python_info[virtualenv]'"$ " "'$python_info[virtualenv]'"${_prompt_steeef_colors[6]}$%f "
RPROMPT='' RPROMPT=''
} }

Loading…
Cancel
Save