Skip to content

Instantly share code, notes, and snippets.

@kpmeen
Last active May 5, 2017 21:00
Show Gist options
  • Select an option

  • Save kpmeen/adff3f0a60b1ad9b5b6c to your computer and use it in GitHub Desktop.

Select an option

Save kpmeen/adff3f0a60b1ad9b5b6c to your computer and use it in GitHub Desktop.
My custom ZSH themes...
# echelon
# Stealing shamelessly from these oh-my-zsh themes:
# in-fino-veritas
# fino-time
# https://gist.github.com/smileart/3750104
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
function box_name {
hostname -s
}
function build_prompt {
local current_dir='${PWD/#$HOME/~}'
local git_info='$(git_prompt_info)'
echo "[%{$FG[039]%}%*%{$reset_color%}] %{$FG[040]%}%n%{$reset_color%}%{$FG[239]%}@%{$reset_color%}%{$FG[033]%}$(box_name)%{$reset_color%}%{$FG[239]%}/%{$reset_color%}%{$terminfo[bold]$FG[006]%}${current_dir}%{$reset_color%} ${git_info} λ$(virtualenv_info)%(?.%{%F{green}%}.%{%F{red}%}✘) %{$reset_color%}"
}
PROMPT="$(build_prompt)"
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$reset_color%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$FG[202]%}✘"
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$FG[040]%}✔"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment