From 65e2514c63b175b73afba2c4d5c3a219aaab3bf7 Mon Sep 17 00:00:00 2001 From: Peter Benjamin Date: Wed, 7 Dec 2016 09:58:24 -0800 Subject: [PATCH] Add theme: purity --- themes/purity/purity.theme.bash | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 themes/purity/purity.theme.bash diff --git a/themes/purity/purity.theme.bash b/themes/purity/purity.theme.bash new file mode 100644 index 00000000..fd8b60ed --- /dev/null +++ b/themes/purity/purity.theme.bash @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +SCM_THEME_PROMPT_DIRTY=" ${bold_red}⊘${normal}" +SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" +SCM_THEME_PROMPT_PREFIX="${reset_color}( " +SCM_THEME_PROMPT_SUFFIX=" ${reset_color})" + +GIT_THEME_PROMPT_DIRTY=" ${bold_red}⊘${normal}" +GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" +GIT_THEME_PROMPT_PREFIX="${reset_color}( " +GIT_THEME_PROMPT_SUFFIX=" ${reset_color})" + +STATUS_THEME_PROMPT_BAD="${bold_red}❯${reset_color}${normal} " +STATUS_THEME_PROMPT_OK="${bold_green}❯${reset_color}${normal} " + +function prompt_command() { + local ret_status="$( [ $? -eq 0 ] && echo -e "$STATUS_THEME_PROMPT_OK" || echo -e "$STATUS_THEME_PROMPT_BAD")" + PS1="\n${blue}\w $(scm_prompt_info)\n${ret_status} " +} + +safe_append_prompt_command prompt_command