mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Added vitaminD theme
This commit is contained in:
parent
1120f97305
commit
b7aae4af0b
1 changed files with 40 additions and 0 deletions
40
themes/vitaminD.zsh-theme
Normal file
40
themes/vitaminD.zsh-theme
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
function zle-line-init zle-keymap-select {
|
||||||
|
zle reset-prompt
|
||||||
|
}
|
||||||
|
zle -N zle-line-init
|
||||||
|
zle -N zle-keymap-select
|
||||||
|
|
||||||
|
bindkey -v
|
||||||
|
|
||||||
|
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg_bold[yellow]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg_bold[magenta]%}•"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[magenta]%}∆"
|
||||||
|
|
||||||
|
ZSH_THEME_VI_MODE_COMMAND="%{$fg[yellow]%}#%{$reset_color%}"
|
||||||
|
ZSH_THEME_VI_MODE_INSERT="%{$fg_bold[yellow]%}$%{$reset_color%}"
|
||||||
|
|
||||||
|
vi_mode_prompt_info () {
|
||||||
|
if [[ ${KEYMAP} = 'vicmd' ]]
|
||||||
|
then
|
||||||
|
echo $ZSH_THEME_VI_MODE_COMMAND
|
||||||
|
else
|
||||||
|
echo $ZSH_THEME_VI_MODE_INSERT
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
PROMPT='$(git_prompt_info)$(vi_mode_prompt_info) '
|
||||||
|
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||||
|
|
||||||
|
function directory_list() {
|
||||||
|
if [[ $PWD = $HOME ]]
|
||||||
|
then
|
||||||
|
echo "%{$fg[green]%}~%{$reset_color%} ${return_code} "
|
||||||
|
else
|
||||||
|
echo "%{$fg_bold[green]%}${PWD%/*}/%{$reset_color%}%{$fg[green]%}${PWD##*/}%{$reset_color%} ${return_code} "
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
RPS1='$(directory_list)'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue