Skip to content

Commit

Permalink
themes: Add a new theme "rr" inspired by robbyrussell from ohmyzsh
Browse files Browse the repository at this point in the history
  • Loading branch information
anish-mandal authored and akinomyoga committed Aug 30, 2022
1 parent f52647d commit 2cdaead
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions themes/THEMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Binary file added themes/rr/rr-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions themes/rr/rr.theme.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2cdaead

Please sign in to comment.