Created
April 1, 2014 01:12
-
-
Save ferd/9905862 to your computer and use it in GitHub Desktop.
ZSH theme for light background
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROMPT='$(prompt_clr)λ %{$fg[grey]%}%1~ $(prompt_mode) $(git_prompt_info)$(hg_prompt_info)%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}" | |
function hg_prompt_info { | |
hg prompt --angle-brackets "\ | |
<%{$fg[blue]%}<branch>%{$reset_color%}> \ | |
<%{$fg[blue]%}<status|modified|unknown>%{$reset_color%} >" 2>/dev/null | |
} | |
function prompt_clr { | |
git branch >/dev/null 2>/dev/null && echo "%{$fg[red]%}" && return | |
hg root >/dev/null 2>/dev/null && echo "%{$fg[blue]%}" && return | |
echo "%{$fg[black]%}" | |
} | |
VIMODE='→' | |
function zle-line-init zle-keymap-select { | |
VIMODE="${${KEYMAP/vicmd/:}/(main|viins)/→}" | |
zle reset-prompt | |
} | |
zle -N zle-line-init | |
zle -N zle-keymap-select | |
function prompt_mode { | |
echo "%{$fg[red]%}${VIMODE}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dark version: