From 284c7e46ca00f5c4c5a27ee75b77d0422dbbc35a Mon Sep 17 00:00:00 2001 From: Kirk Strauser Date: Mon, 16 Jan 2012 18:30:31 -0800 Subject: [PATCH 1/3] Initial checkin of kstrauser theme --- themes/kstrauser.zsh-theme | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 themes/kstrauser.zsh-theme diff --git a/themes/kstrauser.zsh-theme b/themes/kstrauser.zsh-theme new file mode 100644 index 000000000..56459d9a9 --- /dev/null +++ b/themes/kstrauser.zsh-theme @@ -0,0 +1,26 @@ +# Define common and useful things to put in a prompt +typeset -A prc +prc[abbrevpath]='%{${fg[red]}%}%B%45<...<%~%<<%b%{$reset_color%}' +prc[gitprompt]='%{$fg[cyan]%}$(git_prompt_info)$(git_prompt_status) %{$reset_color%}' +prc[newline]=$'\n' +prc[promptchar]='%(!.#.$)' +prc[smiley]='%(?.%{${fg[green]}%}:).%{${fg[red]}%}:()%{$reset_color%}' +prc[timestamp]='%B%{${fg[blue]}%}[%T]%{$reset_color%}%b' +prc[userspec]='%B%(!.%{${fg[red]}%}.%{${fg[green]}%})%n@%m%{$reset_color%}%b' + +PROMPT="${prc[userspec]} ${prc[timestamp]} ${prc[gitprompt]} ${prc[abbrevpath]}${prc[newline]}${prc[smiley]} ${prc[promptchar]} %{$reset_color%}" + +# Unclutter the namespace +unset prc + +ZSH_THEME_GIT_PROMPT_PREFIX="(" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[cyan]%})" +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✘" +ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔" + +ZSH_THEME_GIT_PROMPT_ADDED="%{$FG[082]%}✚%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$FG[166]%}✹%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DELETED="%{$FG[160]%}✖%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$FG[220]%}➜%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$FG[082]%}═%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[190]%}✭%{$reset_color%}" From 6b1c0972b4a7b8fc579bb2044e7fe23fd1122b91 Mon Sep 17 00:00:00 2001 From: Kirk Strauser Date: Mon, 16 Jan 2012 18:42:36 -0800 Subject: [PATCH 2/3] Removed an extraneous space char from kstrauser's git status --- themes/kstrauser.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/kstrauser.zsh-theme b/themes/kstrauser.zsh-theme index 56459d9a9..7558bcaf8 100644 --- a/themes/kstrauser.zsh-theme +++ b/themes/kstrauser.zsh-theme @@ -1,7 +1,7 @@ # Define common and useful things to put in a prompt typeset -A prc prc[abbrevpath]='%{${fg[red]}%}%B%45<...<%~%<<%b%{$reset_color%}' -prc[gitprompt]='%{$fg[cyan]%}$(git_prompt_info)$(git_prompt_status) %{$reset_color%}' +prc[gitprompt]='%{$fg[cyan]%}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}' prc[newline]=$'\n' prc[promptchar]='%(!.#.$)' prc[smiley]='%(?.%{${fg[green]}%}:).%{${fg[red]}%}:()%{$reset_color%}' From 2deb7d7982bcb66428ef837c5752f27d6f86cab8 Mon Sep 17 00:00:00 2001 From: Kirk Strauser Date: Tue, 17 Jan 2012 09:57:44 -0800 Subject: [PATCH 3/3] Added explanatory comments to kstrauser.zsh-theme --- themes/kstrauser.zsh-theme | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/themes/kstrauser.zsh-theme b/themes/kstrauser.zsh-theme index 7558bcaf8..3cc016304 100644 --- a/themes/kstrauser.zsh-theme +++ b/themes/kstrauser.zsh-theme @@ -1,4 +1,12 @@ -# Define common and useful things to put in a prompt +# kstrauser's theme for oh-my-zsh by Kirk Strauser + +# Git prompt coloring was heavily influenced by the "muse" theme, but muse +# doesn't offer green smileys to indicate that the last command exited +# successfully or red frowneys to indicate failure. :) + +# Define common and useful things to put in a prompt. By building a little +# library of these components, the actual PROMPT=... definition can be short, +# readable, and editable. typeset -A prc prc[abbrevpath]='%{${fg[red]}%}%B%45<...<%~%<<%b%{$reset_color%}' prc[gitprompt]='%{$fg[cyan]%}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}'