Browse code

Merge pull request #505 from masnick/master

Add new theme (fino.zsh-theme)

Robby Russell authored on 10/10/2011 at 12:50:44
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,39 @@
0
+# Fino theme by Max Masnick (http://max.masnick.me)
1
+
2
+# Use with a dark background and 256-color terminal!
3
+# Meant for people with RVM and git. Tested only on OS X 10.7.
4
+
5
+# You can set your computer name in the ~/.box-name file if you want.
6
+
7
+# Borrowing shamelessly from these oh-my-zsh themes:
8
+#   bira
9
+#   robbyrussell
10
+#
11
+# Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
12
+
13
+function virtualenv_info {
14
+    [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
15
+}
16
+
17
+function prompt_char {
18
+    git branch >/dev/null 2>/dev/null && echo '±' && return
19
+    echo '○'
20
+}
21
+
22
+function box_name {
23
+    [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
24
+}
25
+
26
+
27
+local rvm_ruby='‹$(rvm-prompt i v g)›%{$reset_color%}'
28
+local current_dir='${PWD/#$HOME/~}'
29
+local git_info='$(git_prompt_info)'
30
+
31
+
32
+PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}using%{$FG[243]%} ${rvm_ruby}
33
+╰─$(virtualenv_info)$(prompt_char) "
34
+
35
+ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
36
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
37
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘"
38
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔"
0 39
\ No newline at end of file