From 2f9b877232ccd4cfb3ef98ab6230bfca2610a834 Mon Sep 17 00:00:00 2001 From: Hobbestigrou Date: Sat, 31 Dec 2011 00:06:05 +0100 Subject: [PATCH] [Core] Mahewin: Add a new theme adapt to perlbrew. --- themes/mahewin.zsh-theme | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 themes/mahewin.zsh-theme diff --git a/themes/mahewin.zsh-theme b/themes/mahewin.zsh-theme new file mode 100644 index 000000000..2257b60de --- /dev/null +++ b/themes/mahewin.zsh-theme @@ -0,0 +1,30 @@ +PROMPT='%{$fg_bold[blue]%}%n%{$reset_color%}%{$fg_bold[magenta]%}@%{$reset_color%}%{$fg_bold[yellow]%}%M %{$reset_color%}$(perlbrew_set) %{$fg_bold[white]%}♜ +\ +%{$fg_no_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) $(git_prompt_status) %{$reset_color%}' +RPROMPT='[%{$fg_no_bold[blue]%}%t%{$reset_color%} %{$fg_no_bold[yellow]%}%D%{$reset_color%}]' + +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}☁%{$reset_color%} %{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%} ±" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ☀" + +ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✚" # +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ⚡" +ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖" # +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➜" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ♒" + + + +function perlbrew_set() { + which_perlbrew=$(which perlbrew) + if [[ "$which_perlbrew" != "perlbrew not found" ]]; + then + PERLBREW=`perlbrew list | grep '*' | cut -b3-` + fi + if [[ -n $PERLBREW ]]; then + echo "%{$fg_bold[cyan]%}$PERLBREW%{$reset_color%}" +fi +} +