5e7e987ff7abe7119cd22c21987bc87f11535b20

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #1657 from ysmood/master

Add a new theme 'ys'

Diff

 1diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..3d316390ee81be3c2f275221e9438745c3ddd86e
 4--- /dev/null
 5+++ b/themes/ys.zsh-theme
 6@@ -0,0 +1,34 @@
 7+# Clean, simple, compatible and meaningful.
 8+# Tested on Linux, Unix and Windows under ANSI colors.
 9+# It is recommended to use with a dark background and the font Inconsolata.
10+# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
11+# 
12+# http://ysmood.org/wp/2013/03/my-ys-terminal-theme/
13+# Mar 2013 ys
14+
15+# Machine name.
16+function box_name {
17+    [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
18+}
19+
20+# Directory info.
21+local current_dir='${PWD/#$HOME/~}'
22+
23+# Git info.
24+local git_info='$(git_prompt_info)'
25+ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}on%{$reset_color%} git:%{$fg[cyan]%}"
26+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
27+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}x"
28+ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}o"
29+
30+# Prompt format: \n # USER at MACHINE in DIRECTORY on git:BRANCH STATE [TIME] \n $ 
31+PROMPT="
32+%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
33+%{$fg[cyan]%}%n \
34+%{$fg[white]%}at \
35+%{$fg[green]%}$(box_name) \
36+%{$fg[white]%}in \
37+%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
38+${git_info} \
39+%{$fg[white]%}[%*]
40+%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"