Skip to content

Instantly share code, notes, and snippets.

@sgobotta
Last active April 26, 2021 14:08
Show Gist options
  • Save sgobotta/3ff62ba4df001e8a1c799a05ac6a0c9c to your computer and use it in GitHub Desktop.
Save sgobotta/3ff62ba4df001e8a1c799a05ac6a0c9c to your computer and use it in GitHub Desktop.
My oh-my-zsh theme

sgobotta's Zsh Theme

Pre-requisites

Usage

  • Copy the sgobotta.zsh-theme file in a custom/themes directory in the ~/.oh-my-zsh repository
  • Paste this line in the very beginning of your ~/.zshrc file: ZSH_THEME=sgobotta
# Forked from the robbyrussel theme
function virtualenv_prompt_info {
[[ -n ${VIRTUAL_ENV} ]] || return
echo "${ZSH_THEME_VIRTUALENV_PREFIX:=[}${VIRTUAL_ENV:t}${ZSH_THEME_VIRTUALENV_SUFFIX:=]}"
}
local virtualenv_info='$(virtualenv_prompt_info)'
PROMPT="${virtualenv_info}"
PROMPT+='%{$fg_bold[grey]%}[%{$reset_color%}%{$fg[white]%}%D{%y/%m/%d} %D{%H:%M:%S}%{$fg_bold[grey]%}]'
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
PROMPT+=$'\n'
PROMPT+="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
export VIRTUAL_ENV_DISABLE_PROMPT=1
ZSH_THEME_VIRTUALENV_PREFIX="${fg[yellow]}("
ZSH_THEME_VIRTUALENV_SUFFIX=")%{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment