Last active
September 22, 2017 08:49
-
-
Save quangtt-rks/01a0edefc52de317e4b4 to your computer and use it in GitHub Desktop.
Incident theme for Oh-my-zsh
This file contains hidden or 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
autoload -Uz vcs_info | |
GREEN="%{$fg_bold[green]%}" | |
YELLOW="%{$fg_bold[yellow]%}" | |
CYAN="%{$fg_bold[cyan]%}" | |
RED="%{$fg_bold[red]%}" | |
RESET="%{$reset_color%}" | |
zstyle ':vcs_info:*' stagedstr '%F{green}●' | |
zstyle ':vcs_info:*' unstagedstr '%F{yellow}●' | |
zstyle ':vcs_info:*' check-for-changes true | |
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r' | |
zstyle ':vcs_info:*' enable git svn | |
theme_precmd () { | |
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] { | |
zstyle ':vcs_info:*' formats ' %b%c%u%B%F{green}' | |
} else { | |
zstyle ':vcs_info:*' formats ' %b%c%u%B%F{red}●%F{green}' | |
} | |
vcs_info | |
} | |
setopt prompt_subst | |
PROMPT='$GREEN⬢ $CYAN%c$GREEN${vcs_info_msg_0_} $RESET' | |
autoload -U add-zsh-hook | |
add-zsh-hook precmd theme_precmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation
Just click on Raw for
moo.zsh-theme
filePlace it in your Oh-my-zsh custome themes (
~/.oh-my-zsh/custom/themes
) and modify you.zshrc
according to these instructions.On the screenshot, font
Source Code Pro for Powerline Semibold
, size 10pt; Color built-inXTerm
.Preview