Skip to content

Instantly share code, notes, and snippets.

@Insolita
Created March 19, 2019 18:56
Show Gist options
  • Save Insolita/753713914c03907760a5af3bd25374f5 to your computer and use it in GitHub Desktop.
Save Insolita/753713914c03907760a5af3bd25374f5 to your computer and use it in GitHub Desktop.
my.zsh-theme
if [ $USER =='root']; then NCOLOR="red"; else NCOLOR="green"; fi
local RETCODE="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local SYSICON UNAME PATHICON GITICON
() {
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
SYSICON=$'\uF17C';
PATHICON=$'\uF015';
GITICON=$'\uF113';
}
PROMPT='%{$fg[$NCOLOR]%}% $SYSICON %n@%m %{$reset_color%}%{$fg[blue]%}% $PATHICON%~ \
$(git_prompt_info) \
%{$fg[green]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='${RETCODE}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[magenta]%}($GITICON "
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}○%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}⚡%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[magenta]%})%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_RENAMED=""
ZSH_THEME_GIT_PROMPT_AHEAD=""
ZSH_THEME_GIT_PROMPT_BEHIND=""
ZSH_THEME_GIT_PROMPT_MODIFIED=" %F{yellow}✹%F{black}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment