Last active
March 3, 2019 13:13
-
-
Save velfundert/e1dabd63d73ec32ace131d9f5a772926 to your computer and use it in GitHub Desktop.
A single-line, right-side-heavy version of the schminitz zsh theme
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
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}✘" | |
# ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}✔" | |
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[red]%}➦" | |
# 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_UNTRACKED="%{$fg[grey]%} ✱" | |
function prompt_char { | |
if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi | |
} | |
# check if vim-shell | |
function vim_bg_info() { | |
if [[ "$(command echo $VIM)" != "" ]]; then | |
echo " ⚡" | |
fi | |
} | |
# changes: | |
# - time and git-status on the right | |
# - no chrome, only branch-name for clean git repo | |
# - show errorcode instead of "FAIL" if non-zero exit-code | |
PROMPT=' %{$fg[yellow]%}%2~%{$reset_color%}$(vim_bg_info)%_ $(prompt_char) ' | |
# Time on right | |
RPROMPT='%(?, ,%{$fg[red]%}$?%{$reset_color%})$(git_prompt_info)%{$reset_color%}$(git_prompt_ahead)%{$reset_color%} %{$fg[green]%}[%*]%{$reset_color%}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment