diff --git a/themes/THEMES.md b/themes/THEMES.md index a19b343..98c9283 100644 --- a/themes/THEMES.md +++ b/themes/THEMES.md @@ -204,6 +204,10 @@ [![](roderik/roderik-dark.png)](roderik/roderik-dark.png) +## `rr` + +[![](rr/rr-dark.png)](rr/rr-dark.png) + ## `sexy` [![](sexy/sexy-dark.png)](sexy/sexy-dark.png) diff --git a/themes/rr/rr-dark.png b/themes/rr/rr-dark.png new file mode 100644 index 0000000..82fb8b0 Binary files /dev/null and b/themes/rr/rr-dark.png differ diff --git a/themes/rr/rr.theme.sh b/themes/rr/rr.theme.sh new file mode 100644 index 0000000..ec962f1 --- /dev/null +++ b/themes/rr/rr.theme.sh @@ -0,0 +1,28 @@ +#! bash oh-my-bash.module + +# rr is a simple one-liner prompt inspired by robbyrussell from ohmyzsh themes. +# +# Looks: +# +# ➜ anish ~ cd .bash-it/themes/dulcie +# ➜ anish custom-dulcie git:(master ✓) # with git +# +# Configuration. Change these by adding them in your .bash_profile + +function _omb_theme_PROMPT_COMMAND() { + local user_name="${_omb_prompt_white}\u${_omb_prompt_reset_color}" + local base_directory="${_omb_prompt_bold_blue}\W${_omb_prompt_reset_color}" + local SCM_THEME_PROMPT_PREFIX="${_omb_prompt_bold_purple}git:(${_omb_prompt_reset_color}" + local SCM_THEME_PROMPT_SUFFIX="${_omb_prompt_bold_purple})${_omb_prompt_reset_color}" + local SCM_THEME_PROMPT_CLEAN="${_omb_prompt_bold_green} ✓${_omb_prompt_reset_color}" + local SCM_THEME_PROMPT_DIRTY="${_omb_prompt_bold_red} ✗${_omb_prompt_reset_color}" + local arrow="${_omb_prompt_bold_purple}➜${_omb_prompt_reset_color}" + + PS1="${arrow} ${user_name} ${base_directory} " + + local scm_info=$(scm_prompt_info) + + PS1+=${scm_info:+$scm_info } +} + +_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND