Last active
August 12, 2018 15:39
-
-
Save GabrielCzar/56e19140617baaf45e8720766f62be75 to your computer and use it in GitHub Desktop.
Zsh themes
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
# vim:ft=zsh ts=2 sw=2 sts=2 | |
rvm_current() { | |
rvm current 2>/dev/null | |
} | |
rbenv_version() { | |
rbenv version 2>/dev/null | awk '{print $1}' | |
} | |
PROMPT='%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) $ ' | |
RPROMPT='⌚%{$fg_bold[red]%}%*%{$reset_color%}' | |
# Must use Powerline font, for \uE0A0 to render. | |
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}\uE0A0 " | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!" | |
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
if [ -e ~/.rvm/bin/rvm-prompt ]; then | |
RPROMPT='%{$fg_bold[red]%}‹$(rvm_current)›%{$reset_color%}' | |
else | |
if which rbenv &> /dev/null; then | |
RPROMPT='%{$fg_bold[red]%}$(rbenv_version)%{$reset_color%}' | |
fi | |
fi |
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
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
# LEFT | |
PROMPT='${ret_status}%{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)%{$reset_color%}' | |
# RIGHT | |
RPROMPT='${time} %{$reset_color%}' | |
time="%(?.%*" | |
# Black: 0, 0, 0 | |
# Red: 229, 34, 34 | |
# Green: 166, 227, 45 | |
# Yellow: 252, 149, 30 | |
# Blue: 196, 141, 255 | |
# Magenta: 250, 37, 115 | |
# Cyan: 103, 217, 240 | |
# White: 242, 242, 242 | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[white]%}➟ $BRANCH%{$fg[blue]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[magenta]%}✗ " | |
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg_bold[green]%}✔ " | |
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%}ⓣ " | |
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✚" # ⓐ ⑃ | |
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ⚡" # ⓜ ⑁ | |
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖" # ⓧ ⑂ | |
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➜" # ⓡ ⑄ | |
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ♒" # ⓤ ⑊ | |
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[blue]%} 𝝙" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment