Skip to content

Instantly share code, notes, and snippets.

@trumbitta
Last active November 4, 2019 13:44
Show Gist options
  • Save trumbitta/4849dc81aa862ff117243f0da19bb326 to your computer and use it in GitHub Desktop.
Save trumbitta/4849dc81aa862ff117243f0da19bb326 to your computer and use it in GitHub Desktop.
My oh-my-zsh theme
# Based on https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/dpoggi.zsh-theme
# set newline variable to be used in the prompt
NEWLINE=$'\n'
if [ $UID -eq 0 ]; then NCOLOR=001; else NCOLOR=254; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$FG[$NCOLOR]%}%n%{$reset_color%}@%m\
:%~\
$(git_prompt_info)\
${NEWLINE}%{$reset_color%}%(!.#.🤖) '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='${return_code}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{[$FG[104]%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[220]%} *%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$FG[104]%}%{$reset_color%}]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment