fino.zsh-theme 1.48 KB
Newer Older
1
# fino.zsh-theme
Max Masnick's avatar
Max Masnick committed
2
3

# Use with a dark background and 256-color terminal!
4
# Meant for people with rbenv and git. Tested only on OS X 10.7.
Max Masnick's avatar
Max Masnick committed
5
6
7
8
9
10
11
12
13

# You can set your computer name in the ~/.box-name file if you want.

# Borrowing shamelessly from these oh-my-zsh themes:
#   bira
#   robbyrussell
#
# Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/

14
15
16
17
18
function virtualenv_prompt_info {
  [[ -n ${VIRTUAL_ENV} ]] || return
  echo "${ZSH_THEME_VIRTUALENV_PREFIX:=[}${VIRTUAL_ENV:t}${ZSH_THEME_VIRTUALENV_SUFFIX:=]}"
}

Max Masnick's avatar
Max Masnick committed
19
function prompt_char {
20
  command git branch &>/dev/null && echo "±" || echo '○'
Max Masnick's avatar
Max Masnick committed
21
22
23
}

function box_name {
24
  [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
Max Masnick's avatar
Max Masnick committed
25
26
}

27
local ruby_env='$(ruby_prompt_info)'
Max Masnick's avatar
Max Masnick committed
28
local git_info='$(git_prompt_info)'
29
local virtualenv_info='$(virtualenv_prompt_info)'
30
local prompt_char='$(prompt_char)'
Max Masnick's avatar
Max Masnick committed
31

32
PROMPT="╭─${FG[040]}%n ${FG[239]}at ${FG[033]}$(box_name) ${FG[239]}in %B${FG[226]}%~%b${git_info}${ruby_env}${virtualenv_info}
33
╰─${prompt_char}%{$reset_color%} "
Max Masnick's avatar
Max Masnick committed
34

35
ZSH_THEME_GIT_PROMPT_PREFIX=" ${FG[239]}on%{$reset_color%} ${FG[255]}"
Max Masnick's avatar
Max Masnick committed
36
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
37
38
39
40
ZSH_THEME_GIT_PROMPT_DIRTY="${FG[202]}✘✘✘"
ZSH_THEME_GIT_PROMPT_CLEAN="${FG[040]}✔"

ZSH_THEME_RUBY_PROMPT_PREFIX=" ${FG[239]}using${FG[243]} ‹"
41
ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
42
43
44
45

export VIRTUAL_ENV_DISABLE_PROMPT=1
ZSH_THEME_VIRTUALENV_PREFIX=" ${FG[239]}using${FG[243]} «"
ZSH_THEME_VIRTUALENV_SUFFIX="»%{$reset_color%}"