From d8a22e6a0efbd954c532875fa0c1a108079e211f Mon Sep 17 00:00:00 2001 From: AlfredoBejarano Date: Wed, 20 Apr 2016 00:07:18 -0500 Subject: [PATCH 1/4] Adds cooperkid theme by AlfredoBejarano --- themes/cooperkid/cooperkid.theme.bash | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 themes/cooperkid/cooperkid.theme.bash diff --git a/themes/cooperkid/cooperkid.theme.bash b/themes/cooperkid/cooperkid.theme.bash new file mode 100644 index 00000000..c4c58a73 --- /dev/null +++ b/themes/cooperkid/cooperkid.theme.bash @@ -0,0 +1,30 @@ +# ------------------------------------------------------------------# +# FILE: cooperkid.zsh-theme # +# BY: Alfredo Bejarano # +# BASED ON: Mr Briggs by Matt Brigg (matt@mattbriggs.net) # +# ------------------------------------------------------------------# + +SCM_THEME_PROMPT_DIRTY="${yellow}⚡${reset_color}" +SCM_THEME_PROMPT_AHEAD="${red}!${reset_color}" +SCM_THEME_PROMPT_CLEAN="${green}✓${reset_color}" +SCM_THEME_PROMPT_PREFIX=" " +SCM_THEME_PROMPT_SUFFIX="" +GIT_SHA_PREFIX="${blue}" +GIT_SHA_SUFFIX="${reset_color}" + +function git_short_sha() { + SHA=$(git rev-parse --short HEAD 2> /dev/null) && echo "$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX" +} + +function prompt() { + local return_status="" + local ruby="${red}$(ruby_version_prompt)${reset_color}" + local user_host="${green}\h @ \w${reset_color}" + local git_branch="$(git_short_sha)$(scm_prompt_info)" + local prompt_symbol=' ' + local prompt_char="${purple}>_${reset_color} " + + PS1="\n${user_host}${prompt_symbol}${ruby} ${git_branch} ${return_status}\n${prompt_char}" +} + +PROMPT_COMMAND=prompt From 07236c05714478d87572faffa865e38d19384932 Mon Sep 17 00:00:00 2001 From: AlfredoBejarano Date: Wed, 20 Apr 2016 00:29:02 -0500 Subject: [PATCH 2/4] Adds spacing to git status icon and changes the dirty and ahead icons --- themes/cooperkid/cooperkid.theme.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/cooperkid/cooperkid.theme.bash b/themes/cooperkid/cooperkid.theme.bash index c4c58a73..d46c885e 100644 --- a/themes/cooperkid/cooperkid.theme.bash +++ b/themes/cooperkid/cooperkid.theme.bash @@ -4,9 +4,9 @@ # BASED ON: Mr Briggs by Matt Brigg (matt@mattbriggs.net) # # ------------------------------------------------------------------# -SCM_THEME_PROMPT_DIRTY="${yellow}⚡${reset_color}" -SCM_THEME_PROMPT_AHEAD="${red}!${reset_color}" -SCM_THEME_PROMPT_CLEAN="${green}✓${reset_color}" +SCM_THEME_PROMPT_DIRTY="${red} ✗${reset_color}" +SCM_THEME_PROMPT_AHEAD="${yellow} ↑${reset_color}" +SCM_THEME_PROMPT_CLEAN="${green} ✓${reset_color}" SCM_THEME_PROMPT_PREFIX=" " SCM_THEME_PROMPT_SUFFIX="" GIT_SHA_PREFIX="${blue}" From d2acf1664681464caf5409f7ea12ce14af69b163 Mon Sep 17 00:00:00 2001 From: AlfredoBejarano Date: Wed, 20 Apr 2016 00:32:28 -0500 Subject: [PATCH 3/4] Changes color for git status prompt --- themes/cooperkid/cooperkid.theme.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/cooperkid/cooperkid.theme.bash b/themes/cooperkid/cooperkid.theme.bash index d46c885e..60e4adec 100644 --- a/themes/cooperkid/cooperkid.theme.bash +++ b/themes/cooperkid/cooperkid.theme.bash @@ -20,7 +20,7 @@ function prompt() { local return_status="" local ruby="${red}$(ruby_version_prompt)${reset_color}" local user_host="${green}\h @ \w${reset_color}" - local git_branch="$(git_short_sha)$(scm_prompt_info)" + local git_branch="$(git_short_sha)${cyan}$(scm_prompt_info)${reset_color}" local prompt_symbol=' ' local prompt_char="${purple}>_${reset_color} " From cff6025338afed9ac0ede59b3e4b7722d4a64bbf Mon Sep 17 00:00:00 2001 From: AlfredoBejarano Date: Wed, 20 Apr 2016 00:58:08 -0500 Subject: [PATCH 4/4] Removes pipes around ruby version --- themes/cooperkid/cooperkid.theme.bash | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/themes/cooperkid/cooperkid.theme.bash b/themes/cooperkid/cooperkid.theme.bash index 60e4adec..ff4df68e 100644 --- a/themes/cooperkid/cooperkid.theme.bash +++ b/themes/cooperkid/cooperkid.theme.bash @@ -12,6 +12,15 @@ SCM_THEME_PROMPT_SUFFIX="" GIT_SHA_PREFIX="${blue}" GIT_SHA_SUFFIX="${reset_color}" +function rvm_version_prompt { + if which rvm &> /dev/null; then + rvm=$(rvm-prompt) || return + if [ -n "$rvm" ]; then + echo -e "$rvm" + fi + fi +} + function git_short_sha() { SHA=$(git rev-parse --short HEAD 2> /dev/null) && echo "$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX" }