Skip to content

Instantly share code, notes, and snippets.

@insom
Created October 16, 2013 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save insom/7006343 to your computer and use it in GitHub Desktop.
Save insom/7006343 to your computer and use it in GitHub Desktop.
My oh-my-zsh theme.
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || hostname -s
}
local current_dir='${PWD/#$HOME/~}'
local git_info='$(git_prompt_info)'
function virtualenv_info_2 {
[ $VIRTUAL_ENV ] && (
echo "%{$terminfo[bold]$fg[red]%}v:%{$fg[yellow]%}`basename $VIRTUAL_ENV`%{$reset_color%}"
)
}
local virtualenv_info='$(virtualenv_info_2)'
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!%{$fg[cyan]%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
PROMPT="%F{yellow}%{$terminfo[bold]%}$(box_name)%{$reset_color%}:%{$terminfo[bold]$fg[blue]%}${current_dir}${git_info} %{$fg[green]%}%{$terminfo[bold]%}%n%{$fg[blue]%}$ %{$reset_color%}"
PROMPT="%F{yellow}%{$terminfo[bold]%}$(box_name)%{$reset_color%}:%{$terminfo[bold]$fg[blue]%}${current_dir} %{$fg[green]%}%{$terminfo[bold]%}%n%{$fg[blue]%}$ %{$reset_color%}"
RPROMPT="%{$terminfo[bold]%}${git_info}${virtualenv_info}"
export LSCOLORS=Gxfxcxdxbxegedabagacad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment