diff --git a/themes/THEMES.md b/themes/THEMES.md index fa05197..bfd5d1a 100644 --- a/themes/THEMES.md +++ b/themes/THEMES.md @@ -204,6 +204,10 @@ [![](rjorgenson/rjorgenson-dark.png)](rjorgenson/rjorgenson-dark.png) +## `robbyrussell` + +[![](robbyrussell/robbyrussell-dark.png)](robbyrussell/robbyrussell-dark.png) + ## `roderik` [![](roderik/roderik-dark.png)](roderik/roderik-dark.png) diff --git a/themes/robbyrussell/robbyrussell-dark.png b/themes/robbyrussell/robbyrussell-dark.png new file mode 100644 index 0000000..7c00171 Binary files /dev/null and b/themes/robbyrussell/robbyrussell-dark.png differ diff --git a/themes/robbyrussell/robbyrussell.theme.sh b/themes/robbyrussell/robbyrussell.theme.sh new file mode 100644 index 0000000..d56a986 --- /dev/null +++ b/themes/robbyrussell/robbyrussell.theme.sh @@ -0,0 +1,31 @@ +#! bash oh-my-bash.module + +# This theme attempts to replicate the default "robbyrussell" theme from ohmyzsh: +# https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/robbyrussell.zsh-theme + +function _omb_theme_PROMPT_COMMAND() { + if [[ "$?" == 0 ]]; then + local arrow_color="${_omb_prompt_bold_green}" + else + local arrow_color="${_omb_prompt_bold_brown}" + fi + + local base_directory="${_omb_prompt_bold_teal}\W${_omb_prompt_reset_color}" + local GIT_THEME_PROMPT_PREFIX="${_omb_prompt_bold_navy}git:(${_omb_prompt_bold_brown}" + local SVN_THEME_PROMPT_PREFIX="${_omb_prompt_bold_navy}svn:(${_omb_prompt_bold_brown}" + local HG_THEME_PROMPT_PREFIX="${_omb_prompt_bold_navy}hg:(${_omb_prompt_bold_brown}" + local SCM_THEME_PROMPT_SUFFIX="${_omb_prompt_reset_color}" + local SCM_THEME_PROMPT_CLEAN="${_omb_prompt_bold_navy})${_omb_prompt_reset_color}" + local SCM_THEME_PROMPT_DIRTY="${_omb_prompt_bold_navy}) ${_omb_prompt_olive}✗${_omb_prompt_reset_color}" + + local arrow="${arrow_color}➜${_omb_prompt_reset_color}" + + PS1="${arrow} ${base_directory} " + + local scm_info=$(scm_prompt_info) + + PS1+=${scm_info:+$scm_info } + PS1+=${_omb_prompt_normal} +} + +_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/rr/rr.theme.sh b/themes/rr/rr.theme.sh index ec962f1..36a736f 100644 --- a/themes/rr/rr.theme.sh +++ b/themes/rr/rr.theme.sh @@ -12,7 +12,9 @@ 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 GIT_THEME_PROMPT_PREFIX="${_omb_prompt_bold_purple}git:(${_omb_prompt_reset_color}" + local SVN_THEME_PROMPT_PREFIX="${_omb_prompt_bold_purple}svn:(${_omb_prompt_reset_color}" + local HG_THEME_PROMPT_PREFIX="${_omb_prompt_bold_purple}hg:(${_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}" @@ -23,6 +25,7 @@ function _omb_theme_PROMPT_COMMAND() { local scm_info=$(scm_prompt_info) PS1+=${scm_info:+$scm_info } + PS1+=${_omb_prompt_normal} } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND