Simple and clean ZSH theme [ tip ]

0 min read
zsh comes with many theme but sometime you just need simple and clean theme
well IĀ build and created a simple and minimal theme you can useĀ customiseĀ whatever you want to feel free to use as you want

1 : create a file with your custom theme.zsh-themeĀ 
2: copy and paste these zsh commands

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

PROMPT='%{$fg[$reset_color]%}%n%{$reset_color%}@%{$fg[$reset_color]%}%m%{$reset_color%}:%{$fg[$reset_color]%}%~$(git_prompt_info)%{$fg[$reset_color]%}%(!.#.$)%{$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%}"
3: now open ~/.zshrc
4 : and change theme name to your customtheme
5: restart terminal
6 : done enjoy zsh
useful links :


  • Home
  • About