From 3f9bc3955902d2cb34f7488e5f68403c1e0e6cd4 Mon Sep 17 00:00:00 2001 From: haesken08 Date: Thu, 12 Jan 2012 19:02:58 -0600 Subject: [PATCH] adding 'haesken' theme --- themes/haesken.zsh-theme | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 themes/haesken.zsh-theme diff --git a/themes/haesken.zsh-theme b/themes/haesken.zsh-theme new file mode 100644 index 000000000..9d01d0e89 --- /dev/null +++ b/themes/haesken.zsh-theme @@ -0,0 +1,50 @@ +# https://github.com/haesken +# +# Modified from the Blinks theme, with some code from Steve Losh's site. +# https://github.com/blinks zsh theme +# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/ + +function prompt_char { + git branch >/dev/null 2>/dev/null && echo '%{%F{blue}%}±%{%f%k%b%}' && return + hg root >/dev/null 2>/dev/null && echo '%{%F{blue}%}☿%{%f%k%b%}' && return + echo '%{%F{blue}%}○%{%f%k%b%}' +} + +# Show mercurial branches/status like git. +# Requires the hg extension "hg-prompt" +# http://stevelosh.com/projects/hg-prompt/ +function hg_prompt_info { + hg prompt --angle-brackets " [\ +%{%B%F{blue}%}%{$reset_color%}\ +%{%F{red}%}%{$reset_color%}]" 2>/dev/null +} + +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$reset_color%}[%{%B%F{blue}%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}%{%F{red}%}*%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +# % - the escape character +# %{%f%k%b%} - resets coloring/bolding +# %{$reset_color%} - resets coloring/bolding +# %{%F{COLOR}%} - sets a color +# %{%B%F{COLOR}%} - sets a bold color (solarized uses some of these for grays) + +# %n - user +# @ - literal @ +# %m - short hostname +# %~ - path (truncated when in home dir) +# git_prompt_info - branch/status of the current git repo +# hg_prompt_info - branch/status of the current mercurial repo +# prompt_char - if you are in a git/hg repo +# %E - clear till end of line +# %# - % if user, # if root + +PROMPT='%{$reset_color%} +%{%F{yellow}%}%n%{$reset_color%}\ +%{%F{gray}%}@%{$reset_color%}\ +%{%F{blue}%}%m%{$reset_color%} \ +%{%F{yellow}%}%~%{$reset_color%}\ +$(git_prompt_info)%{$reset_color%}\ +$(hg_prompt_info)%{$reset_color%}%E +$(prompt_char) %#%{$reset_color%} '