Skip to content

Instantly share code, notes, and snippets.

@bluenex
Created March 19, 2018 17:55
Show Gist options
  • Save bluenex/4d09e9731554b1ea1e92b085906bf187 to your computer and use it in GitHub Desktop.
Save bluenex/4d09e9731554b1ea1e92b085906bf187 to your computer and use it in GitHub Desktop.

Original dpoggi.zsh-theme

if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"

PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}@%{$fg[cyan]%}%m\
%{$reset_color%}:%{$fg[magenta]%}%~\
$(git_prompt_info) \
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='${return_code}'

ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}○%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}⚡%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"

My version

if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"

PROMPT='%D{$fg_bold[green]%H:%M} \
%{$reset_color%}\
%{$fg[cyan]%}%~\
$(git_prompt_info)
%{$fg[red]%}%(!.#.$)%{$reset_color%} '
PROMPT2='%{$fg_bold[red]%}\%{$reset_color%}'
RPS1='${return_code} '

ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%} ["
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%}]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[yellow]%}●%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}*%{$reset_color%}"
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%D{$fg_bold[green]%H:%M} \
%{$reset_color%}\
%{$fg[cyan]%}%~\
$(git_prompt_info)
%{$fg[red]%}%(!.#.$)%{$reset_color%} '
PROMPT2='%{$fg_bold[red]%}\%{$reset_color%}'
RPS1='${return_code} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%} ["
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%}]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[yellow]%}●%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}*%{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment