diff options
author | Robby Russell <robby@planetargon.com> | 2013-03-26 22:12:48 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-03-26 22:12:48 -0700 |
commit | 5e7e987ff7abe7119cd22c21987bc87f11535b20 (patch) | |
tree | 4af36178044cb476da0875a1849ef06ff1ef35ab | |
parent | 95b46e7eac9b01e8dd409894ef1ea1e3f9bf5e2c (diff) | |
parent | 55c6fd5c38ad47c2dfa27e6e1a0913d2aa594172 (diff) | |
download | zsh-5e7e987ff7abe7119cd22c21987bc87f11535b20.tar.gz zsh-5e7e987ff7abe7119cd22c21987bc87f11535b20.tar.bz2 zsh-5e7e987ff7abe7119cd22c21987bc87f11535b20.zip |
Merge pull request #1657 from ysmood/master
Add a new theme 'ys'
-rw-r--r-- | themes/ys.zsh-theme | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme new file mode 100644 index 000000000..3d316390e --- /dev/null +++ b/themes/ys.zsh-theme @@ -0,0 +1,34 @@ +# Clean, simple, compatible and meaningful. +# Tested on Linux, Unix and Windows under ANSI colors. +# It is recommended to use with a dark background and the font Inconsolata. +# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. +# +# http://ysmood.org/wp/2013/03/my-ys-terminal-theme/ +# Mar 2013 ys + +# Machine name. +function box_name { + [ -f ~/.box-name ] && cat ~/.box-name || hostname -s +} + +# Directory info. +local current_dir='${PWD/#$HOME/~}' + +# Git info. +local git_info='$(git_prompt_info)' +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}on%{$reset_color%} git:%{$fg[cyan]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}x" +ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}o" + +# Prompt format: \n # USER at MACHINE in DIRECTORY on git:BRANCH STATE [TIME] \n $ +PROMPT=" +%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \ +%{$fg[cyan]%}%n \ +%{$fg[white]%}at \ +%{$fg[green]%}$(box_name) \ +%{$fg[white]%}in \ +%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\ +${git_info} \ +%{$fg[white]%}[%*] +%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" |