From 7ed389eafd1bd6d8f616950695baee9d8e78b5fc Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Wed, 19 Jan 2022 16:52:15 +0900 Subject: [PATCH] themes: Use new color variables --- lib/base.sh | 10 +-- lib/git.sh | 9 ++- lib/omb-prompt-base.sh | 6 +- lib/omb-prompt-colors.sh | 5 +- lib/spectrum.sh | 5 +- lib/spinner.sh | 2 +- lib/utils.sh | 16 ++--- plugins/battery/battery.plugin.sh | 32 ++++----- themes/90210/90210.theme.sh | 6 +- themes/axin/axin.theme.sh | 2 +- themes/bakke/bakke.theme.sh | 12 ++-- themes/binaryanomaly/binaryanomaly.theme.sh | 24 +++---- themes/bobby-python/bobby-python.theme.sh | 8 +-- themes/bobby/bobby.theme.sh | 10 +-- themes/brainy/brainy.theme.sh | 52 +++++++------- themes/brunton/brunton.theme.sh | 18 ++--- themes/candy/candy.theme.sh | 2 +- themes/clean/clean.theme.sh | 10 +-- themes/cooperkid/cooperkid.theme.sh | 16 ++--- themes/cupcake/cupcake.theme.sh | 14 ++-- themes/demula/demula.theme.sh | 10 +-- themes/doubletime/doubletime.theme.sh | 24 +++---- .../doubletime_multiline.theme.sh | 4 +- .../doubletime_multiline_pyonly.theme.sh | 4 +- themes/dulcie/dulcie.theme.sh | 28 ++++---- themes/duru/duru.theme.sh | 6 +- themes/emperor/emperor.theme.sh | 8 +-- themes/envy/envy.theme.sh | 6 +- themes/font/font.theme.sh | 12 ++-- themes/gallifrey/gallifrey.theme.sh | 10 +-- themes/garo/garo.theme.sh | 10 +-- themes/half-life/half-life.theme.sh | 8 +-- themes/hawaii50/hawaii50.theme.sh | 14 ++-- themes/iterate/iterate.theme.sh | 14 ++-- themes/kitsune/kitsune.theme.sh | 14 ++-- themes/luan/luan.theme.sh | 22 +++--- themes/mairan/mairan.theme.sh | 32 ++++----- themes/mbriggs/mbriggs.theme.sh | 12 ++-- themes/minimal/minimal.theme.sh | 6 +- themes/modern-t/modern-t.theme.sh | 18 ++--- themes/modern/modern.theme.sh | 18 ++--- themes/morris/morris.theme.sh | 4 +- themes/n0qorg/n0qorg.theme.sh | 8 +-- themes/nwinkler/nwinkler.theme.sh | 10 +-- .../nwinkler_random_colors.theme.sh | 68 +++++++++---------- themes/pete/pete.theme.sh | 2 +- .../powerline-multiline.base.sh | 6 +- .../powerline-naked/powerline-naked.base.sh | 2 +- .../powerline-plain/powerline-plain.base.sh | 4 +- themes/powerline/powerline.base.sh | 6 +- themes/primer/primer.theme.sh | 2 +- themes/pro/pro.theme.sh | 2 +- themes/pure/pure.theme.sh | 20 +++--- themes/purity/purity.theme.sh | 20 +++--- themes/rainbowbrite/rainbowbrite.theme.sh | 4 +- themes/rjorgenson/rjorgenson.theme.sh | 30 ++++---- themes/roderik/roderik.theme.sh | 4 +- themes/simple/simple.theme.sh | 2 +- themes/sirup/sirup.theme.sh | 2 +- themes/slick/slick.theme.sh | 24 +++---- themes/standard/standard.theme.sh | 2 +- themes/tonotdo/tonotdo.theme.sh | 4 +- themes/tylenol/tylenol.theme.sh | 4 +- themes/wanelo/wanelo.theme.sh | 6 +- themes/zitron/zitron.theme.sh | 4 +- themes/zork/zork.theme.sh | 28 ++++---- 66 files changed, 407 insertions(+), 400 deletions(-) diff --git a/lib/base.sh b/lib/base.sh index 2d661b1..f5b50d9 100644 --- a/lib/base.sh +++ b/lib/base.sh @@ -208,7 +208,7 @@ bigfind() { # ------------------------------------------------------------------- myip () { res=$(curl -s checkip.dyndns.org | grep -Eo '[0-9\.]+') - echo -e "Your public IP is: ${echo_bold_green} $res ${echo_normal}" + echo -e "Your public IP is: ${_omb_term_bold_green} $res ${_omb_term_normal}" } # ii: display useful host related informaton @@ -233,15 +233,15 @@ bigfind() { # batch_chmod: Batch chmod for all files & sub-directories in the current one # ------------------------------------------------------------------- batch_chmod() { - echo -ne "${echo_bold_blue}Applying 0755 permission for all directories..." + echo -ne "${_omb_term_bold_blue}Applying 0755 permission for all directories..." (find . -type d -print0 | xargs -0 chmod 0755) & spinner - echo -ne "${echo_normal}" + echo -ne "${_omb_term_normal}" - echo -ne "${echo_bold_blue}Applying 0644 permission for all files..." + echo -ne "${_omb_term_bold_blue}Applying 0644 permission for all files..." (find . -type f -print0 | xargs -0 chmod 0644) & spinner - echo -ne "${echo_normal}" + echo -ne "${_omb_term_normal}" } # usage: disk usage per directory, in Mac OS X and Linux diff --git a/lib/git.sh b/lib/git.sh index a113a8b..fa433ff 100644 --- a/lib/git.sh +++ b/lib/git.sh @@ -1,5 +1,8 @@ #! bash oh-my-bash.module # Outputs current branch info in prompt format + +_omb_module_require lib:omb-prompt-colors + function git_prompt_info() { local ref if [[ "$(command git config --get oh-my-bash.hide-status 2>/dev/null)" != "1" ]]; then @@ -43,13 +46,13 @@ function git_remote_status() { git_remote_status="$OSH_THEME_GIT_PROMPT_EQUAL_REMOTE" elif [[ $ahead -gt 0 ]] && [[ $behind -eq 0 ]]; then git_remote_status="$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE" - git_remote_status_detailed="$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}" + git_remote_status_detailed="$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$_omb_prompt_reset_color%}" elif [[ $behind -gt 0 ]] && [[ $ahead -eq 0 ]]; then git_remote_status="$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE" - git_remote_status_detailed="$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}" + git_remote_status_detailed="$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$_omb_prompt_reset_color%}" elif [[ $ahead -gt 0 ]] && [[ $behind -gt 0 ]]; then git_remote_status="$OSH_THEME_GIT_PROMPT_DIVERGED_REMOTE" - git_remote_status_detailed="$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}" + git_remote_status_detailed="$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$_omb_prompt_reset_color%}$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$_omb_prompt_reset_color%}" fi if [[ -n $OSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED ]]; then diff --git a/lib/omb-prompt-base.sh b/lib/omb-prompt-base.sh index d53b1b0..fd90702 100644 --- a/lib/omb-prompt-base.sh +++ b/lib/omb-prompt-base.sh @@ -502,7 +502,7 @@ function git_user_info { function clock_char { CLOCK_CHAR=${THEME_CLOCK_CHAR:-"⌚"} - CLOCK_CHAR_COLOR=${THEME_CLOCK_CHAR_COLOR:-"$normal"} + CLOCK_CHAR_COLOR=${THEME_CLOCK_CHAR_COLOR:-"$_omb_prompt_normal"} SHOW_CLOCK_CHAR=${THEME_SHOW_CLOCK_CHAR:-"true"} if [[ "${SHOW_CLOCK_CHAR}" = "true" ]]; then @@ -511,7 +511,7 @@ function clock_char { } function clock_prompt { - CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$normal"} + CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$_omb_prompt_normal"} CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%H:%M:%S"} [ -z $THEME_SHOW_CLOCK ] && THEME_SHOW_CLOCK=${THEME_CLOCK_CHECK:-"true"} SHOW_CLOCK=$THEME_SHOW_CLOCK @@ -555,7 +555,7 @@ function prompt_char { function battery_char { if [[ "${THEME_BATTERY_PERCENTAGE_CHECK}" = true ]]; then - echo -e "${bold_red}$(battery_percentage)%" + echo -e "${_omb_prompt_bold_red}$(battery_percentage)%" fi } diff --git a/lib/omb-prompt-colors.sh b/lib/omb-prompt-colors.sh index 70101c2..8288f88 100644 --- a/lib/omb-prompt-colors.sh +++ b/lib/omb-prompt-colors.sh @@ -124,7 +124,7 @@ _omb_prompt_background_orange='\[\e[101m\]' _omb_prompt_normal='\[\e[0m\]' _omb_prompt_reset_color='\[\e[39m\]' -# These colors are meant to be used with `echo -e` +# These colors are intended to be used with `echo` # These variables are defined in lib/utils.sh # @@ -171,6 +171,9 @@ _omb_term_background_orange=$'\e[101m' _omb_term_normal=$'\e[0m' _omb_term_reset_color=$'\e[39m' +# used by themes/gallifrey +_omb_prompt_bold='\[\e[1m\]' + _omb_deprecate_function 20000 color _omb_theme_color_prompt _omb_deprecate_function 20000 echo_color _omb_theme_color_echo diff --git a/lib/spectrum.sh b/lib/spectrum.sh index d8b24a2..450f79e 100644 --- a/lib/spectrum.sh +++ b/lib/spectrum.sh @@ -3,6 +3,7 @@ # P.C. Shyamshankar # Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ +_omb_module_require lib:omb-prompt-colors # typeset in bash does not have associative arrays, declare does in bash 4.0+ # https://stackoverflow.com/a/6047948 @@ -35,14 +36,14 @@ if [ "${BASH_VERSINFO[0]}" -gt 4 ]; then # Show all 256 colors with color number function spectrum_ls() { for code in {000..255}; do - print -P -- "$code: %{$FG[$code]%}$OSH_SPECTRUM_TEXT%{$reset_color%}" + print -P -- "$code: %{$FG[$code]%}$OSH_SPECTRUM_TEXT%{$_omb_prompt_reset_color%}" done } # Show all 256 colors where the background is set to specific color function spectrum_bls() { for code in {000..255}; do - print -P -- "$code: %{$BG[$code]%}$OSH_SPECTRUM_TEXT%{$reset_color%}" + print -P -- "$code: %{$BG[$code]%}$OSH_SPECTRUM_TEXT%{$_omb_prompt_reset_color%}" done } fi diff --git a/lib/spinner.sh b/lib/spinner.sh index c4bf8d7..11dfeb8 100644 --- a/lib/spinner.sh +++ b/lib/spinner.sh @@ -8,7 +8,7 @@ # echo -ne "${fg[red]}I am running..." # ( my_long_task_running ) & # spinner -# echo -ne "...${reset_color} ${fg[green]}DONE${reset_color}" +# echo -ne "...${_omb_prompt_reset_color} ${fg[green]}DONE${_omb_prompt_reset_color}" # # This spinner is used when there is a terminal. diff --git a/lib/utils.sh b/lib/utils.sh index e2a0789..51e0573 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -160,14 +160,14 @@ fi # # Headers and Logging # -_omb_log_header() { printf "\n${bold}${purple}========== %s ==========${reset}\n" "$@"; } +_omb_log_header() { printf "\n${_omb_term_bold}${purple}========== %s ==========${_omb_term_reset}\n" "$@"; } _omb_log_arrow() { printf "➜ %s\n" "$@"; } -_omb_log_success() { printf "${green}✔ %s${reset}\n" "$@"; } -_omb_log_error() { printf "${red}✖ %s${reset}\n" "$@"; } -_omb_log_warning() { printf "${tan}➜ %s${reset}\n" "$@"; } -_omb_log_underline() { printf "${underline}${bold}%s${reset}\n" "$@"; } -_omb_log_bold() { printf "${bold}%s${reset}\n" "$@"; } -_omb_log_note() { printf "${underline}${bold}${blue}Note:${reset} ${yellow}%s${reset}\n" "$@"; } +_omb_log_success() { printf "${green}✔ %s${_omb_term_reset}\n" "$@"; } +_omb_log_error() { printf "${red}✖ %s${_omb_term_reset}\n" "$@"; } +_omb_log_warning() { printf "${_omb_term_yellow}➜ %s${_omb_term_reset}\n" "$@"; } +_omb_log_underline() { printf "${_omb_term_underline}${_omb_term_bold}%s${_omb_term_reset}\n" "$@"; } +_omb_log_bold() { printf "${_omb_term_bold}%s${_omb_term_reset}\n" "$@"; } +_omb_log_note() { printf "${_omb_term_underline}${_omb_term_bold}${blue}Note:${_omb_term_reset} ${yellow}%s${_omb_term_reset}\n" "$@"; } # # USAGE FOR SEEKING CONFIRMATION @@ -181,7 +181,7 @@ _omb_log_note() { printf "${underline}${bold}${blue}Note:${reset} ${yellow # fi # seek_confirmation() { - printf "\\n${bold}%s${reset}" "$@" + printf "\\n${_omb_term_bold}%s${_omb_term_reset}" "$@" read -p " (y/n) " -n 1 printf "\\n" } diff --git a/plugins/battery/battery.plugin.sh b/plugins/battery/battery.plugin.sh index 27f1797..a869ed9 100644 --- a/plugins/battery/battery.plugin.sh +++ b/plugins/battery/battery.plugin.sh @@ -137,7 +137,7 @@ battery_charge(){ local F_C='▸' # Depleted char local D_C='▹' - local DEPLETED_COLOR="${normal}" + local DEPLETED_COLOR="${_omb_prompt_normal}" local FULL_COLOR="${green}" local HALF_COLOR="${yellow}" local DANGER_COLOR="${red}" @@ -149,49 +149,49 @@ battery_charge(){ echo "" ;; 9*) - echo "${FULL_COLOR}${F_C}${F_C}${F_C}${F_C}${F_C}${normal}" + echo "${FULL_COLOR}${F_C}${F_C}${F_C}${F_C}${F_C}${_omb_prompt_normal}" ;; 8*) - echo "${FULL_COLOR}${F_C}${F_C}${F_C}${F_C}${HALF_COLOR}${F_C}${normal}" + echo "${FULL_COLOR}${F_C}${F_C}${F_C}${F_C}${HALF_COLOR}${F_C}${_omb_prompt_normal}" ;; 7*) - echo "${FULL_COLOR}${F_C}${F_C}${F_C}${F_C}${DEPLETED_COLOR}${D_C}${normal}" + echo "${FULL_COLOR}${F_C}${F_C}${F_C}${F_C}${DEPLETED_COLOR}${D_C}${_omb_prompt_normal}" ;; 6*) - echo "${FULL_COLOR}${F_C}${F_C}${F_C}${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${normal}" + echo "${FULL_COLOR}${F_C}${F_C}${F_C}${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${_omb_prompt_normal}" ;; 5*) - echo "${FULL_COLOR}${F_C}${F_C}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${normal}" + echo "${FULL_COLOR}${F_C}${F_C}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${_omb_prompt_normal}" ;; 4*) - echo "${FULL_COLOR}${F_C}${F_C}${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${normal}" + echo "${FULL_COLOR}${F_C}${F_C}${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${_omb_prompt_normal}" ;; 3*) - echo "${FULL_COLOR}${F_C}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${normal}" + echo "${FULL_COLOR}${F_C}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${_omb_prompt_normal}" ;; 2*) - echo "${FULL_COLOR}${F_C}${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${normal}" + echo "${FULL_COLOR}${F_C}${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${_omb_prompt_normal}" ;; 1*) - echo "${FULL_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${normal}" + echo "${FULL_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}" ;; 05) - echo "${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${normal}" + echo "${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}" ;; 04) - echo "${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${normal}" + echo "${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}" ;; 03) - echo "${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${normal}" + echo "${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}" ;; 02) - echo "${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${normal}" + echo "${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}" ;; 0*) - echo "${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${normal}" + echo "${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}" ;; *) - echo "${DANGER_COLOR}UNPLG${normal}" + echo "${DANGER_COLOR}UNPLG${_omb_prompt_normal}" ;; esac } diff --git a/themes/90210/90210.theme.sh b/themes/90210/90210.theme.sh index 2ae6dd4..95c9c99 100644 --- a/themes/90210/90210.theme.sh +++ b/themes/90210/90210.theme.sh @@ -1,17 +1,17 @@ #! bash oh-my-bash.module SCM_THEME_PROMPT_DIRTY=" ${red}✗" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" SCM_THEME_PROMPT_PREFIX=" |" SCM_THEME_PROMPT_SUFFIX="${green}|" GIT_THEME_PROMPT_DIRTY=" ${red}✗" -GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" +GIT_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" GIT_THEME_PROMPT_PREFIX=" ${green}|" GIT_THEME_PROMPT_SUFFIX="${green}|" # Nicely formatted terminal prompt function _omb_theme_PROMPT_COMMAND(){ - export PS1="\n${bold_black}[${blue}\@${bold_black}]-${bold_black}[${green}\u${yellow}@${green}\h${bold_black}]-${bold_black}[${purple}\w${bold_black}]-$(scm_prompt_info)\n${reset_color}\$ " + export PS1="\n${_omb_prompt_bold_black}[${blue}\@${_omb_prompt_bold_black}]-${_omb_prompt_bold_black}[${green}\u${yellow}@${green}\h${_omb_prompt_bold_black}]-${_omb_prompt_bold_black}[${purple}\w${_omb_prompt_bold_black}]-$(scm_prompt_info)\n${_omb_prompt_reset_color}\$ " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/axin/axin.theme.sh b/themes/axin/axin.theme.sh index 3cd6edd..8d80043 100644 --- a/themes/axin/axin.theme.sh +++ b/themes/axin/axin.theme.sh @@ -37,6 +37,6 @@ function _omb_theme_PROMPT_COMMAND() { PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]@ \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\[$SCM_THEME_PROMPT_PREFIX\]$(clock_prompt) \[$PURPLE\]\$(scm_prompt_info) \n\$ \[$RESET\]" } -THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"${white}"} +THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"${_omb_prompt_white}"} _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/bakke/bakke.theme.sh b/themes/bakke/bakke.theme.sh index 5a8bb1a..bf56398 100644 --- a/themes/bakke/bakke.theme.sh +++ b/themes/bakke/bakke.theme.sh @@ -1,11 +1,11 @@ #! bash oh-my-bash.module SCM_THEME_PROMPT_DIRTY=" ${red}✗" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" SCM_THEME_PROMPT_PREFIX=" |" SCM_THEME_PROMPT_SUFFIX="${green}|" GIT_THEME_PROMPT_DIRTY=" ${red}✗" -GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" +GIT_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" GIT_THEME_PROMPT_PREFIX=" ${green}|" GIT_THEME_PROMPT_SUFFIX="${green}|" @@ -13,10 +13,10 @@ RVM_THEME_PROMPT_PREFIX="|" RVM_THEME_PROMPT_SUFFIX="|" function _omb_theme_PROMPT_COMMAND() { - #PS1="${bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(_omb_prompt_print_ruby_env) ${yellow}\h ${reset_color}in ${green}\w ${reset_color}\n${green}→${reset_color} " - #PS1="\n${purple}\h: ${reset_color} ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} " - #PS1="\n${cyan}\h: ${reset_color} ${yellow}\w\n${red}$(scm_char)${red}$(scm_prompt_info) ${green}→${reset_color} " - PS1="\n${cyan}\h: ${reset_color} ${yellow}\w ${green}$(scm_prompt_info)\n${reset_color}→ " + #PS1="${_omb_prompt_bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(_omb_prompt_print_ruby_env) ${yellow}\h ${_omb_prompt_reset_color}in ${green}\w ${_omb_prompt_reset_color}\n${green}→${_omb_prompt_reset_color} " + #PS1="\n${purple}\h: ${_omb_prompt_reset_color} ${green}\w\n${_omb_prompt_bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${_omb_prompt_reset_color} " + #PS1="\n${_omb_prompt_cyan}\h: ${_omb_prompt_reset_color} ${yellow}\w\n${red}$(scm_char)${red}$(scm_prompt_info) ${green}→${_omb_prompt_reset_color} " + PS1="\n${_omb_prompt_cyan}\h: ${_omb_prompt_reset_color} ${yellow}\w ${green}$(scm_prompt_info)\n${_omb_prompt_reset_color}→ " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/binaryanomaly/binaryanomaly.theme.sh b/themes/binaryanomaly/binaryanomaly.theme.sh index a0bf75a..9e9ef6c 100644 --- a/themes/binaryanomaly/binaryanomaly.theme.sh +++ b/themes/binaryanomaly/binaryanomaly.theme.sh @@ -33,7 +33,7 @@ function set_user_color() { printf "${red}" ;; *) - printf "${cyan}" + printf "${_omb_prompt_cyan}" ;; esac } @@ -63,21 +63,21 @@ function set_custom_colors() { } __ps_time() { - echo "$(clock_prompt)${normal}\n" + echo "$(clock_prompt)${_omb_prompt_normal}\n" } function _omb_theme_PROMPT_COMMAND() { - ps_reboot="${bright_yellow}$(show_reboot_required)${normal}\n" + ps_reboot="${bright_yellow}$(show_reboot_required)${_omb_prompt_normal}\n" - ps_username="$(set_user_color)\u${normal}" - ps_uh_separator="${dark_grey}@${normal}" - ps_hostname="$(set_host_color)\h${normal}" + ps_username="$(set_user_color)\u${_omb_prompt_normal}" + ps_uh_separator="${dark_grey}@${_omb_prompt_normal}" + ps_hostname="$(set_host_color)\h${_omb_prompt_normal}" - ps_path="${yellow}\w${normal}" + ps_path="${yellow}\w${_omb_prompt_normal}" ps_scm_prompt="${light_grey}$(scm_prompt)" - ps_user_mark="${normal} ${normal}" - ps_user_input="${normal}" + ps_user_mark="${_omb_prompt_normal} ${_omb_prompt_normal}" + ps_user_input="${_omb_prompt_normal}" # Set prompt PS1="$ps_reboot$(__ps_time)$ps_username$ps_uh_separator$ps_hostname $ps_path $ps_scm_prompt$ps_user_mark$ps_user_input" @@ -92,10 +92,10 @@ THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$dark_grey"} SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${light_grey}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${light_grey}" SCM_THEME_PROMPT_CLEAN=" ${green}✓${light_grey}" SCM_GIT_CHAR="${green}±${light_grey}" -SCM_SVN_CHAR="${bold_cyan}⑆${light_grey}" -SCM_HG_CHAR="${bold_red}☿${light_grey}" +SCM_SVN_CHAR="${_omb_prompt_bold_cyan}⑆${light_grey}" +SCM_HG_CHAR="${_omb_prompt_bold_red}☿${light_grey}" _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/bobby-python/bobby-python.theme.sh b/themes/bobby-python/bobby-python.theme.sh index 88053e5..f8d15ec 100644 --- a/themes/bobby-python/bobby-python.theme.sh +++ b/themes/bobby-python/bobby-python.theme.sh @@ -1,19 +1,19 @@ #! bash oh-my-bash.module SCM_THEME_PROMPT_DIRTY=" ${red}✗" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" SCM_THEME_PROMPT_PREFIX=" |" SCM_THEME_PROMPT_SUFFIX="${green}|" GIT_THEME_PROMPT_DIRTY=" ${red}✗" -GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" +GIT_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" GIT_THEME_PROMPT_PREFIX=" ${green}|" GIT_THEME_PROMPT_SUFFIX="${green}|" CONDAENV_THEME_PROMPT_SUFFIX="|" function _omb_theme_PROMPT_COMMAND() { - #PS1="${bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(_omb_prompt_print_ruby_env) ${yellow}\h ${reset_color}in ${green}\w ${reset_color}\n${green}→${reset_color} " - PS1="\n${yellow}$(python_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} " + #PS1="${_omb_prompt_bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(_omb_prompt_print_ruby_env) ${yellow}\h ${_omb_prompt_reset_color}in ${green}\w ${_omb_prompt_reset_color}\n${green}→${_omb_prompt_reset_color} " + PS1="\n${yellow}$(python_version_prompt) ${purple}\h ${_omb_prompt_reset_color}in ${green}\w\n${_omb_prompt_bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${_omb_prompt_reset_color} " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/bobby/bobby.theme.sh b/themes/bobby/bobby.theme.sh index dac3998..c0077c5 100644 --- a/themes/bobby/bobby.theme.sh +++ b/themes/bobby/bobby.theme.sh @@ -1,12 +1,12 @@ #! bash oh-my-bash.module SCM_THEME_PROMPT_DIRTY=" ${red}✗" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" SCM_THEME_PROMPT_PREFIX=" ${green}|" SCM_THEME_PROMPT_SUFFIX="${green}|" GIT_THEME_PROMPT_DIRTY=" ${red}✗" -GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" +GIT_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" GIT_THEME_PROMPT_PREFIX=" ${green}|" GIT_THEME_PROMPT_SUFFIX="${green}|" @@ -22,13 +22,13 @@ __bobby_clock() { } function _omb_theme_PROMPT_COMMAND() { - #PS1="${bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(_omb_prompt_print_ruby_env) ${yellow}\h ${reset_color}in ${green}\w ${reset_color}\n${green}→${reset_color} " - PS1="\n$(battery_char) $(__bobby_clock)${yellow}$(_omb_prompt_print_ruby_env) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_prompt_char_info) ${green}→${reset_color} " + #PS1="${_omb_prompt_bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(_omb_prompt_print_ruby_env) ${yellow}\h ${_omb_prompt_reset_color}in ${green}\w ${_omb_prompt_reset_color}\n${green}→${_omb_prompt_reset_color} " + PS1="\n$(battery_char) $(__bobby_clock)${yellow}$(_omb_prompt_print_ruby_env) ${purple}\h ${_omb_prompt_reset_color}in ${green}\w\n${_omb_prompt_bold_cyan}$(scm_prompt_char_info) ${green}→${_omb_prompt_reset_color} " } THEME_SHOW_CLOCK_CHAR=${THEME_SHOW_CLOCK_CHAR:-"true"} THEME_CLOCK_CHAR_COLOR=${THEME_CLOCK_CHAR_COLOR:-"$red"} -THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$bold_cyan"} +THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$_omb_prompt_bold_cyan"} THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%Y-%m-%d %H:%M:%S"} _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/brainy/brainy.theme.sh b/themes/brainy/brainy.theme.sh index ac384cd..4e67a90 100644 --- a/themes/brainy/brainy.theme.sh +++ b/themes/brainy/brainy.theme.sh @@ -88,59 +88,59 @@ ____brainy_bottom() { ############## ___brainy_prompt_user_info() { - color=$bold_blue + color=$_omb_prompt_bold_blue if [ "${THEME_SHOW_SUDO}" == "true" ]; then if [ $(sudo -n id -u 2>&1 | grep 0) ]; then - color=$bold_red + color=$_omb_prompt_bold_red fi fi box="[|]" info="\u@\H" if [ -n "${SSH_CLIENT}" ]; then - printf "%s|%s|%s|%s" "${color}" "${info}" "${bold_white}" "${box}" + printf "%s|%s|%s|%s" "${color}" "${info}" "${_omb_prompt_bold_white}" "${box}" else printf "%s|%s" "${color}" "${info}" fi } ___brainy_prompt_dir() { - color=$bold_yellow + color=$_omb_prompt_bold_yellow box="[|]" info="\w" - printf "%s|%s|%s|%s" "${color}" "${info}" "${bold_white}" "${box}" + printf "%s|%s|%s|%s" "${color}" "${info}" "${_omb_prompt_bold_white}" "${box}" } ___brainy_prompt_scm() { [ "${THEME_SHOW_SCM}" != "true" ] && return - color=$bold_green + color=$_omb_prompt_bold_green box="$(scm_char) " info="$(scm_prompt_info)" - printf "%s|%s|%s|%s" "${color}" "${info}" "${bold_white}" "${box}" + printf "%s|%s|%s|%s" "${color}" "${info}" "${_omb_prompt_bold_white}" "${box}" } ___brainy_prompt_python() { [ "${THEME_SHOW_PYTHON}" != "true" ] && return - color=$bold_yellow + color=$_omb_prompt_bold_yellow box="[|]" info="$(python_version_prompt)" - printf "%s|%s|%s|%s" "${color}" "${info}" "${bold_blue}" "${box}" + printf "%s|%s|%s|%s" "${color}" "${info}" "${_omb_prompt_bold_blue}" "${box}" } ___brainy_prompt_ruby() { [ "${THEME_SHOW_RUBY}" != "true" ] && return - color=$bold_white + color=$_omb_prompt_bold_white box="[|]" info="rb-$(_omb_prompt_print_ruby_env)" - printf "%s|%s|%s|%s" "${color}" "${info}" "${bold_red}" "${box}" + printf "%s|%s|%s|%s" "${color}" "${info}" "${_omb_prompt_bold_red}" "${box}" } ___brainy_prompt_todo() { [ "${THEME_SHOW_TODO}" != "true" ] || [ -z "$(which todo.sh)" ] && return - color=$bold_white + color=$_omb_prompt_bold_white box="[|]" info="t:$(todo.sh ls | egrep "TODO: [0-9]+ of ([0-9]+)" | awk '{ print $4 }' )" - printf "%s|%s|%s|%s" "${color}" "${info}" "${bold_green}" "${box}" + printf "%s|%s|%s|%s" "${color}" "${info}" "${_omb_prompt_bold_green}" "${box}" } ___brainy_prompt_clock() { @@ -148,33 +148,33 @@ ___brainy_prompt_clock() { color=$THEME_CLOCK_COLOR box="[|]" info="$(date +"${THEME_CLOCK_FORMAT}")" - printf "%s|%s|%s|%s" "${color}" "${info}" "${bold_purple}" "${box}" + printf "%s|%s|%s|%s" "${color}" "${info}" "${_omb_prompt_bold_magenta}" "${box}" } ___brainy_prompt_battery() { [ ! -e $OSH/plugins/battery/battery.plugin.sh ] || [ "${THEME_SHOW_BATTERY}" != "true" ] && return info=$(battery_percentage) - color=$bold_green + color=$_omb_prompt_bold_green if [ "$info" -lt 50 ]; then - color=$bold_yellow + color=$_omb_prompt_bold_yellow elif [ "$info" -lt 25 ]; then - color=$bold_red + color=$_omb_prompt_bold_red fi box="[|]" ac_adapter_connected && info+="+" [ "$info" == "100+" ] && info="AC" - printf "%s|%s|%s|%s" "${color}" "${info}" "${bold_white}" "${box}" + printf "%s|%s|%s|%s" "${color}" "${info}" "${_omb_prompt_bold_white}" "${box}" } ___brainy_prompt_exitcode() { [ "${THEME_SHOW_EXITCODE}" != "true" ] && return - color=$bold_purple + color=$_omb_prompt_bold_magenta [ "$exitcode" -ne 0 ] && printf "%s|%s" "${color}" "${exitcode}" } ___brainy_prompt_char() { - color=$bold_white + color=$_omb_prompt_bold_white prompt_char="${__BRAINY_PROMPT_CHAR_PS1}" printf "%s|%s" "${color}" "${prompt_char}" } @@ -250,8 +250,8 @@ export RBFU_THEME_PROMPT_SUFFIX="" export RVM_THEME_PROMPT_PREFIX="" export RVM_THEME_PROMPT_SUFFIX="" -export SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -export SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" +export SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +export SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" THEME_SHOW_SUDO=${THEME_SHOW_SUDO:-"true"} THEME_SHOW_SCM=${THEME_SHOW_SCM:-"true"} @@ -262,7 +262,7 @@ THEME_SHOW_TODO=${THEME_SHOW_TODO:-"false"} THEME_SHOW_BATTERY=${THEME_SHOW_BATTERY:-"false"} THEME_SHOW_EXITCODE=${THEME_SHOW_EXITCODE:-"true"} -THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$bold_white"} +THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$_omb_prompt_bold_white"} THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%H:%M:%S"} __BRAINY_PROMPT_CHAR_PS1=${THEME_PROMPT_CHAR_PS1:-">"} @@ -277,12 +277,12 @@ ___BRAINY_BOTTOM=${___BRAINY_BOTTOM:-"exitcode char"} ############ __brainy_ps1() { - printf "%s%s%s" "$(____brainy_top)" "$(____brainy_bottom)" "${normal}" + printf "%s%s%s" "$(____brainy_top)" "$(____brainy_bottom)" "${_omb_prompt_normal}" } __brainy_ps2() { - color=$bold_white - printf "%s%s%s" "${color}" "${__BRAINY_PROMPT_CHAR_PS2} " "${normal}" + color=$_omb_prompt_bold_white + printf "%s%s%s" "${color}" "${__BRAINY_PROMPT_CHAR_PS2} " "${_omb_prompt_normal}" } _omb_theme_PROMPT_COMMAND() { diff --git a/themes/brunton/brunton.theme.sh b/themes/brunton/brunton.theme.sh index 294c5f4..426aca5 100644 --- a/themes/brunton/brunton.theme.sh +++ b/themes/brunton/brunton.theme.sh @@ -3,16 +3,16 @@ SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" -SCM_GIT_CHAR="${bold_green}±${normal}" -SCM_SVN_CHAR="${bold_cyan}⑆${normal}" -SCM_HG_CHAR="${bold_red}☿${normal}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" +SCM_GIT_CHAR="${_omb_prompt_bold_green}±${_omb_prompt_normal}" +SCM_SVN_CHAR="${_omb_prompt_bold_cyan}⑆${_omb_prompt_normal}" +SCM_HG_CHAR="${_omb_prompt_bold_red}☿${_omb_prompt_normal}" is_vim_shell() { if [ ! -z "$VIMRUNTIME" ] then - echo "[${cyan}vim shell${normal}]" + echo "[${_omb_prompt_cyan}vim shell${_omb_prompt_normal}]" fi } @@ -22,15 +22,15 @@ scm_prompt() { then return else - echo " $(scm_char) (${white}$(scm_prompt_info)${normal})" + echo " $(scm_char) (${_omb_prompt_white}$(scm_prompt_info)${_omb_prompt_normal})" fi } _omb_theme_PROMPT_COMMAND() { - PS1="${white}${background_blue} \u${normal}${background_blue}@${red}${background_blue}\h $(clock_prompt) ${reset_color}${normal} $(battery_charge)\n${bold_black}${background_white} \w ${normal}$(scm_prompt)$(is_vim_shell)\n${white}>${normal} " + PS1="${_omb_prompt_white}${_omb_prompt_background_blue} \u${_omb_prompt_normal}${_omb_prompt_background_blue}@${red}${_omb_prompt_background_blue}\h $(clock_prompt) ${_omb_prompt_reset_color}${_omb_prompt_normal} $(battery_charge)\n${_omb_prompt_bold_black}${_omb_prompt_background_white} \w ${_omb_prompt_normal}$(scm_prompt)$(is_vim_shell)\n${_omb_prompt_white}>${_omb_prompt_normal} " } -THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$blue$background_white"} +THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$blue$_omb_prompt_background_white"} THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-" %H:%M:%S"} _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/candy/candy.theme.sh b/themes/candy/candy.theme.sh index 0fc7c34..e346cca 100644 --- a/themes/candy/candy.theme.sh +++ b/themes/candy/candy.theme.sh @@ -1,7 +1,7 @@ #! bash oh-my-bash.module function _omb_theme_PROMPT_COMMAND() { - PS1="${green}\u@\h $(clock_prompt) ${reset_color}${white}\w${reset_color}$(scm_prompt_info)${blue} →${bold_blue} ${reset_color} "; + PS1="${green}\u@\h $(clock_prompt) ${_omb_prompt_reset_color}${_omb_prompt_white}\w${_omb_prompt_reset_color}$(scm_prompt_info)${blue} →${_omb_prompt_bold_blue} ${_omb_prompt_reset_color} "; } THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$blue"} diff --git a/themes/clean/clean.theme.sh b/themes/clean/clean.theme.sh index b1e738d..ad0bb00 100644 --- a/themes/clean/clean.theme.sh +++ b/themes/clean/clean.theme.sh @@ -1,9 +1,9 @@ #! bash oh-my-bash.module # git theming -ZSH_THEME_GIT_PROMPT_PREFIX="${bold_blue}(${yellow}%B" -ZSH_THEME_GIT_PROMPT_SUFFIX="%b${bold_blue})${reset_color} " +ZSH_THEME_GIT_PROMPT_PREFIX="${_omb_prompt_bold_blue}(${yellow}%B" +ZSH_THEME_GIT_PROMPT_SUFFIX="%b${_omb_prompt_bold_blue})${_omb_prompt_reset_color} " ZSH_THEME_GIT_PROMPT_CLEAN="" -ZSH_THEME_GIT_PROMPT_DIRTY="${bold_red}✗" +ZSH_THEME_GIT_PROMPT_DIRTY="${_omb_prompt_bold_red}✗" # LS colors, made with http://geoff.greer.fm/lscolors/ @@ -12,9 +12,9 @@ export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40 function _omb_theme_PROMPT_COMMAND() { - if [ "$(whoami)" = root ]; then no_color=$red; else no_color=$white; fi + if [ "$(whoami)" = root ]; then no_color=$red; else no_color=$_omb_prompt_white; fi - PS1="${no_color}\u${reset_color}:${blue}\W/${reset_color} \[\$(scm_prompt_info)\]$ " + PS1="${no_color}\u${_omb_prompt_reset_color}:${blue}\W/${_omb_prompt_reset_color} \[\$(scm_prompt_info)\]$ " RPROMPT='[\t]' } diff --git a/themes/cooperkid/cooperkid.theme.sh b/themes/cooperkid/cooperkid.theme.sh index 8d0f28d..8134488 100644 --- a/themes/cooperkid/cooperkid.theme.sh +++ b/themes/cooperkid/cooperkid.theme.sh @@ -5,13 +5,13 @@ # BASED ON: Mr Briggs by Matt Brigg (matt@mattbriggs.net) # # ------------------------------------------------------------------# -SCM_THEME_PROMPT_DIRTY="${red} ✗${reset_color}" -SCM_THEME_PROMPT_AHEAD="${yellow} ↑${reset_color}" -SCM_THEME_PROMPT_CLEAN="${green} ✓${reset_color}" +SCM_THEME_PROMPT_DIRTY="${red} ✗${_omb_prompt_reset_color}" +SCM_THEME_PROMPT_AHEAD="${yellow} ↑${_omb_prompt_reset_color}" +SCM_THEME_PROMPT_CLEAN="${green} ✓${_omb_prompt_reset_color}" SCM_THEME_PROMPT_PREFIX=" " SCM_THEME_PROMPT_SUFFIX="" GIT_SHA_PREFIX="${blue}" -GIT_SHA_SUFFIX="${reset_color}" +GIT_SHA_SUFFIX="${_omb_prompt_reset_color}" function git_short_sha() { SHA=$(git rev-parse --short HEAD 2> /dev/null) && echo "$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX" @@ -19,11 +19,11 @@ function git_short_sha() { function _omb_theme_PROMPT_COMMAND() { local return_status="" - local ruby="${red}$(_omb_prompt_print_ruby_env)${reset_color}" - local user_host="${green}\h @ \w${reset_color}" - local git_branch="$(git_short_sha)${cyan}$(scm_prompt_info)${reset_color}" + local ruby="${red}$(_omb_prompt_print_ruby_env)${_omb_prompt_reset_color}" + local user_host="${green}\h @ \w${_omb_prompt_reset_color}" + local git_branch="$(git_short_sha)${_omb_prompt_cyan}$(scm_prompt_info)${_omb_prompt_reset_color}" local prompt_symbol=' ' - local prompt_char="${purple}>_${reset_color} " + local prompt_char="${purple}>_${_omb_prompt_reset_color} " PS1="\n${user_host}${prompt_symbol}${ruby} ${git_branch} ${return_status}\n${prompt_char}" } diff --git a/themes/cupcake/cupcake.theme.sh b/themes/cupcake/cupcake.theme.sh index ecfa8ad..39a9466 100644 --- a/themes/cupcake/cupcake.theme.sh +++ b/themes/cupcake/cupcake.theme.sh @@ -19,11 +19,11 @@ VIRTUALENV_THEME_PROMPT_SUFFIX="" # SCM prompts SCM_NONE_CHAR="" SCM_GIT_CHAR="[±] " -SCM_GIT_BEHIND_CHAR="${red}↓${normal}" -SCM_GIT_AHEAD_CHAR="${bold_green}↑${normal}" +SCM_GIT_BEHIND_CHAR="${red}↓${_omb_prompt_normal}" +SCM_GIT_AHEAD_CHAR="${_omb_prompt_bold_green}↑${_omb_prompt_normal}" SCM_GIT_UNTRACKED_CHAR="⌀" -SCM_GIT_UNSTAGED_CHAR="${bold_yellow}•${normal}" -SCM_GIT_STAGED_CHAR="${bold_green}+${normal}" +SCM_GIT_UNSTAGED_CHAR="${_omb_prompt_bold_yellow}•${_omb_prompt_normal}" +SCM_GIT_STAGED_CHAR="${_omb_prompt_bold_green}+${_omb_prompt_normal}" SCM_THEME_PROMPT_DIRTY="" SCM_THEME_PROMPT_CLEAN="" @@ -31,8 +31,8 @@ SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" # Git status prompts -GIT_THEME_PROMPT_DIRTY=" ${red}✗${normal}" -GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" +GIT_THEME_PROMPT_DIRTY=" ${red}✗${_omb_prompt_normal}" +GIT_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" GIT_THEME_PROMPT_PREFIX="" GIT_THEME_PROMPT_SUFFIX="" @@ -63,7 +63,7 @@ function winname { # Displays the current prompt function _omb_theme_PROMPT_COMMAND() { - PS1="\n${icon_start}$(_omb_prompt_print_python_venv)${icon_user}${bold_red}\u${normal}${icon_host}${bold_cyan}\h${normal}${icon_directory}${bold_purple}\W${normal}\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")${white}$(scm_prompt_info)${normal}\n${icon_end}" + PS1="\n${icon_start}$(_omb_prompt_print_python_venv)${icon_user}${_omb_prompt_bold_red}\u${_omb_prompt_normal}${icon_host}${_omb_prompt_bold_cyan}\h${_omb_prompt_normal}${icon_directory}${_omb_prompt_bold_magenta}\W${_omb_prompt_normal}\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")${_omb_prompt_white}$(scm_prompt_info)${_omb_prompt_normal}\n${icon_end}" PS2="${icon_end}" } diff --git a/themes/demula/demula.theme.sh b/themes/demula/demula.theme.sh index c3789dd..e3e32d3 100644 --- a/themes/demula/demula.theme.sh +++ b/themes/demula/demula.theme.sh @@ -33,17 +33,17 @@ #*color7: #E5E5E5 # ----------------------------------------------------------------- COLOR CONF -D_DEFAULT_COLOR="${normal}" -D_INTERMEDIATE_COLOR="${white}" +D_DEFAULT_COLOR="${_omb_prompt_normal}" +D_INTERMEDIATE_COLOR="${_omb_prompt_white}" D_USER_COLOR="${purple}" D_SUPERUSER_COLOR="${red}" -D_MACHINE_COLOR="${cyan}" +D_MACHINE_COLOR="${_omb_prompt_cyan}" D_DIR_COLOR="${green}" D_SCM_COLOR="${yellow}" D_BRANCH_COLOR="${yellow}" -D_CHANGES_COLOR="${white}" +D_CHANGES_COLOR="${_omb_prompt_white}" D_CMDFAIL_COLOR="${red}" -D_VIMSHELL_COLOR="${cyan}" +D_VIMSHELL_COLOR="${_omb_prompt_cyan}" # ------------------------------------------------------------------ FUNCTIONS case $TERM in diff --git a/themes/doubletime/doubletime.theme.sh b/themes/doubletime/doubletime.theme.sh index d30648d..f2fdf9d 100644 --- a/themes/doubletime/doubletime.theme.sh +++ b/themes/doubletime/doubletime.theme.sh @@ -2,9 +2,9 @@ SCM_THEME_PROMPT_DIRTY='' SCM_THEME_PROMPT_CLEAN='' -SCM_GIT_CHAR="${bold_cyan}±${normal}" -SCM_SVN_CHAR="${bold_cyan}⑆${normal}" -SCM_HG_CHAR="${bold_red}☿${normal}" +SCM_GIT_CHAR="${_omb_prompt_bold_cyan}±${_omb_prompt_normal}" +SCM_SVN_CHAR="${_omb_prompt_bold_cyan}⑆${_omb_prompt_normal}" +SCM_HG_CHAR="${_omb_prompt_bold_red}☿${_omb_prompt_normal}" SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" if [ ! -z $RVM_THEME_PROMPT_COLOR ]; then @@ -12,14 +12,14 @@ if [ ! -z $RVM_THEME_PROMPT_COLOR ]; then else RVM_THEME_PROMPT_COLOR="${red}" fi -RVM_THEME_PROMPT_PREFIX="(${RVM_THEME_PROMPT_COLOR}rb${normal}: " +RVM_THEME_PROMPT_PREFIX="(${RVM_THEME_PROMPT_COLOR}rb${_omb_prompt_normal}: " RVM_THEME_PROMPT_SUFFIX=") " if [ ! -z $VIRTUALENV_THEME_PROMPT_COLOR ]; then VIRTUALENV_THEME_PROMPT_COLOR=$(eval echo $`echo ${VIRTUALENV_THEME_PROMPT_COLOR}`); else VIRTUALENV_THEME_PROMPT_COLOR="${green}" fi -VIRTUALENV_THEME_PROMPT_PREFIX="(${VIRTUALENV_THEME_PROMPT_COLOR}py${normal}: " +VIRTUALENV_THEME_PROMPT_PREFIX="(${VIRTUALENV_THEME_PROMPT_COLOR}py${_omb_prompt_normal}: " VIRTUALENV_THEME_PROMPT_SUFFIX=") " if [ ! -z $THEME_PROMPT_HOST_COLOR ]; then @@ -45,8 +45,8 @@ function _omb_theme_PROMPT_COMMAND() { history -c history -r PS1=" -$(clock_prompt) $(scm_char) [${THEME_PROMPT_HOST_COLOR}\u@${THEME_PROMPT_HOST}$reset_color] $(_omb_prompt_print_python_venv)$(_omb_prompt_print_ruby_env)\w -$(doubletime_scm_prompt)$reset_color $ " +$(clock_prompt) $(scm_char) [${THEME_PROMPT_HOST_COLOR}\u@${THEME_PROMPT_HOST}$_omb_prompt_reset_color] $(_omb_prompt_print_python_venv)$(_omb_prompt_print_ruby_env)\w +$(doubletime_scm_prompt)$_omb_prompt_reset_color $ " PS2='> ' PS4='+ ' } @@ -57,16 +57,16 @@ git_prompt_status() { local git_status_output git_status_output=$(git status 2> /dev/null ) if [ -n "$(echo $git_status_output | grep 'Changes not staged')" ]; then - git_status="${bold_red}$(scm_prompt_info) ✗" + git_status="${_omb_prompt_bold_red}$(scm_prompt_info) ✗" elif [ -n "$(echo $git_status_output | grep 'Changes to be committed')" ]; then - git_status="${bold_yellow}$(scm_prompt_info) ^" + git_status="${_omb_prompt_bold_yellow}$(scm_prompt_info) ^" elif [ -n "$(echo $git_status_output | grep 'Untracked files')" ]; then - git_status="${bold_cyan}$(scm_prompt_info) +" + git_status="${_omb_prompt_bold_cyan}$(scm_prompt_info) +" elif [ -n "$(echo $git_status_output | grep 'nothing to commit')" ]; then - git_status="${bold_green}$(scm_prompt_info) ${green}✓" + git_status="${_omb_prompt_bold_green}$(scm_prompt_info) ${green}✓" else git_status="$(scm_prompt_info)" fi - echo "[$git_status${normal}]" + echo "[$git_status${_omb_prompt_normal}]" } diff --git a/themes/doubletime_multiline/doubletime_multiline.theme.sh b/themes/doubletime_multiline/doubletime_multiline.theme.sh index e174d29..83cd79d 100644 --- a/themes/doubletime_multiline/doubletime_multiline.theme.sh +++ b/themes/doubletime_multiline/doubletime_multiline.theme.sh @@ -8,9 +8,9 @@ function _omb_theme_PROMPT_COMMAND() { history -c history -r PS1=" -$(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\u@${THEME_PROMPT_HOST}$reset_color] $(_omb_prompt_print_python_venv)$(_omb_prompt_print_ruby_env) +$(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\u@${THEME_PROMPT_HOST}$_omb_prompt_reset_color] $(_omb_prompt_print_python_venv)$(_omb_prompt_print_ruby_env) \w -$(doubletime_scm_prompt)$reset_color $ " +$(doubletime_scm_prompt)$_omb_prompt_reset_color $ " PS2='> ' PS4='+ ' } diff --git a/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.sh b/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.sh index dc01e11..9a959b1 100644 --- a/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.sh +++ b/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.sh @@ -8,9 +8,9 @@ function _omb_theme_PROMPT_COMMAND() { history -c history -r PS1=" -$(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\u@${THEME_PROMPT_HOST}$reset_color] $(_omb_prompt_print_python_venv) +$(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\u@${THEME_PROMPT_HOST}$_omb_prompt_reset_color] $(_omb_prompt_print_python_venv) \w -$(doubletime_scm_prompt)$reset_color $ " +$(doubletime_scm_prompt)$_omb_prompt_reset_color $ " PS2='> ' PS4='+ ' } diff --git a/themes/dulcie/dulcie.theme.sh b/themes/dulcie/dulcie.theme.sh index 1ff8177..4a94860 100644 --- a/themes/dulcie/dulcie.theme.sh +++ b/themes/dulcie/dulcie.theme.sh @@ -48,18 +48,18 @@ _omb_theme_PROMPT_COMMAND() { color_host="${color_host_local}" fi - DULCIE_USER="${color_user}\u${reset_color}" - DULCIE_HOST="${color_host}\h${reset_color}" - DULCIE_WORKINGDIR="${color_workingdir}\W${reset_color}" - DULCIE_PROMPTCHAR="${color_user}"'\$'"${reset_color}" + DULCIE_USER="${color_user}\u${_omb_prompt_reset_color}" + DULCIE_HOST="${color_host}\h${_omb_prompt_reset_color}" + DULCIE_WORKINGDIR="${color_workingdir}\W${_omb_prompt_reset_color}" + DULCIE_PROMPTCHAR="${color_user}"'\$'"${_omb_prompt_reset_color}" - SCM_THEME_PROMPT_DIRTY=" ${red}✗${reset_color}" - SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" + SCM_THEME_PROMPT_DIRTY=" ${red}✗${_omb_prompt_reset_color}" + SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" DULCIE_SCM_BACKGROUND="${background_scm}" DULCIE_SCM_DIR_COLOR="${color_rootdir}" - SCM_THEME_ROOT_SUFFIX="${reset_color}${SCM_THEME_ROOT_SUFFIX}" - SCM_THEME_PROMPT_DIRTY=" $(dulcie_color 1)✗${reset_color}" - SCM_THEME_PROMPT_CLEAN=" $(dulcie_color 10)✓${reset_color}" + SCM_THEME_ROOT_SUFFIX="${_omb_prompt_reset_color}${SCM_THEME_ROOT_SUFFIX}" + SCM_THEME_PROMPT_DIRTY=" $(dulcie_color 1)✗${_omb_prompt_reset_color}" + SCM_THEME_PROMPT_CLEAN=" $(dulcie_color 10)✓${_omb_prompt_reset_color}" else DULCIE_USER='\u' DULCIE_HOST='\h' @@ -79,18 +79,18 @@ _omb_theme_PROMPT_COMMAND() { # Open the new terminal in the same directory declare -f __vte_osc7 > /dev/null && __vte_osc7 - PS1="${reset_color}[${DULCIE_USER}@${DULCIE_HOST}$(scm_prompt_info)${reset_color} ${DULCIE_WORKINGDIR}]" + PS1="${_omb_prompt_reset_color}[${DULCIE_USER}@${DULCIE_HOST}$(scm_prompt_info)${_omb_prompt_reset_color} ${DULCIE_WORKINGDIR}]" if [[ "${DULCIE_MULTILINE}" -eq "1" ]]; then - PS1="${reset_color}[${DULCIE_USER}@${DULCIE_HOST}${reset_color} ${DULCIE_WORKINGDIR}]" + PS1="${_omb_prompt_reset_color}[${DULCIE_USER}@${DULCIE_HOST}${_omb_prompt_reset_color} ${DULCIE_WORKINGDIR}]" if [[ "$(scm_prompt_info)" ]]; then SCM_THEME_PROMPT_PREFIX="${DULCIE_SCM_BACKGROUND}|${DULCIE_SCM_DIR_COLOR}" - SCM_THEME_PROMPT_SUFFIX="|${normal}" + SCM_THEME_PROMPT_SUFFIX="|${_omb_prompt_normal}" PS1="$(scm_prompt_info)\n${PS1}" fi else SCM_THEME_PROMPT_PREFIX=" ${DULCIE_SCM_BACKGROUND}|${DULCIE_SCM_DIR_COLOR}" - SCM_THEME_PROMPT_SUFFIX="|${normal}" - PS1="${reset_color}[${DULCIE_USER}@${DULCIE_HOST}$(scm_prompt_info)${reset_color} ${DULCIE_WORKINGDIR}]" + SCM_THEME_PROMPT_SUFFIX="|${_omb_prompt_normal}" + PS1="${_omb_prompt_reset_color}[${DULCIE_USER}@${DULCIE_HOST}$(scm_prompt_info)${_omb_prompt_reset_color} ${DULCIE_WORKINGDIR}]" fi PS1="${PS1}${DULCIE_PROMPTCHAR} " } diff --git a/themes/duru/duru.theme.sh b/themes/duru/duru.theme.sh index 71c34c9..7a76368 100644 --- a/themes/duru/duru.theme.sh +++ b/themes/duru/duru.theme.sh @@ -1,6 +1,6 @@ #! bash oh-my-bash.module -SCM_THEME_PROMPT_PREFIX="${cyan} on ${green}" +SCM_THEME_PROMPT_PREFIX="${_omb_prompt_cyan} on ${green}" SCM_THEME_PROMPT_SUFFIX="" SCM_THEME_PROMPT_DIRTY=" ${red}with changes" SCM_THEME_PROMPT_CLEAN="" @@ -9,7 +9,7 @@ venv() { if [ ! -z "$VIRTUAL_ENV" ] then local env=$VIRTUAL_ENV - echo "${gray} in ${orange}${env##*/} " + echo "${gray} in ${_omb_prompt_orange}${env##*/} " fi } @@ -18,7 +18,7 @@ last_two_dirs() { } _omb_theme_PROMPT_COMMAND() { - PS1="${yellow}# ${reset_color}$(last_two_dirs)$(scm_prompt_info)${reset_color}$(venv)${reset_color} ${cyan}\n> ${reset_color}" + PS1="${yellow}# ${_omb_prompt_reset_color}$(last_two_dirs)$(scm_prompt_info)${_omb_prompt_reset_color}$(venv)${_omb_prompt_reset_color} ${_omb_prompt_cyan}\n> ${_omb_prompt_reset_color}" } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/emperor/emperor.theme.sh b/themes/emperor/emperor.theme.sh index 123ef60..6353028 100644 --- a/themes/emperor/emperor.theme.sh +++ b/themes/emperor/emperor.theme.sh @@ -1,12 +1,12 @@ #! bash oh-my-bash.module SCM_THEME_PROMPT_DIRTY=" ${red}✗" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" SCM_THEME_PROMPT_PREFIX=" |" SCM_THEME_PROMPT_SUFFIX="${green}|" GIT_THEME_PROMPT_DIRTY=" ${red}✗" -GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" +GIT_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" GIT_THEME_PROMPT_PREFIX=" ${green}|" GIT_THEME_PROMPT_SUFFIX="${green}|" @@ -17,7 +17,7 @@ function get_hour_color { hour_color=$red min=$(date +%M) if [ "$min" -lt "15" ]; then - hour_color=$white + hour_color=$_omb_prompt_white elif [ "$min" -lt "30" ]; then hour_color=$green elif [ "$min" -lt "45" ]; then @@ -34,7 +34,7 @@ __emperor_clock() { } function _omb_theme_PROMPT_COMMAND() { - PS1="\n$(__emperor_clock)${purple}\h ${reset_color}in ${prompt_color}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} " + PS1="\n$(__emperor_clock)${purple}\h ${_omb_prompt_reset_color}in ${prompt_color}\w\n${_omb_prompt_bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${_omb_prompt_reset_color} " } THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%H "} diff --git a/themes/envy/envy.theme.sh b/themes/envy/envy.theme.sh index 7dd549d..a78e0a6 100644 --- a/themes/envy/envy.theme.sh +++ b/themes/envy/envy.theme.sh @@ -1,16 +1,16 @@ #! bash oh-my-bash.module SCM_THEME_PROMPT_DIRTY=" ${red}✗" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" SCM_THEME_PROMPT_PREFIX=" |" SCM_THEME_PROMPT_SUFFIX="${green}|" GIT_THEME_PROMPT_DIRTY=" ${red}✗" -GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" +GIT_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" GIT_THEME_PROMPT_PREFIX=" ${green}|" GIT_THEME_PROMPT_SUFFIX="${green}|" function _omb_theme_PROMPT_COMMAND() { - PS1="\n${yellow}$(_omb_prompt_print_ruby_env) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} " + PS1="\n${yellow}$(_omb_prompt_print_ruby_env) ${purple}\h ${_omb_prompt_reset_color}in ${green}\w\n${_omb_prompt_bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${_omb_prompt_reset_color} " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/font/font.theme.sh b/themes/font/font.theme.sh index 1883c43..01ebfcb 100644 --- a/themes/font/font.theme.sh +++ b/themes/font/font.theme.sh @@ -31,7 +31,7 @@ SCM_GIT_SHOW_MINIMAL_INFO=true CLOCK_THEME_PROMPT_PREFIX='' CLOCK_THEME_PROMPT_SUFFIX=' ' THEME_SHOW_CLOCK=${THEME_SHOW_CLOCK:-"true"} -THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$bold_blue"} +THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$_omb_prompt_bold_blue"} THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%I:%M:%S"} VIRTUALENV_THEME_PROMPT_PREFIX='(' @@ -41,21 +41,21 @@ function _omb_theme_PROMPT_COMMAND() { # This needs to be first to save last command return code local RC="$?" - local hostname="${bold_black}\u@\h" + local hostname="${_omb_prompt_bold_black}\u@\h" local python_venv; _omb_prompt_get_python_venv - python_venv=$white$python_venv + python_venv=$_omb_prompt_white$python_venv # Set return status color if [[ ${RC} == 0 ]]; then - ret_status="${bold_green}" + ret_status="${_omb_prompt_bold_green}" else - ret_status="${bold_red}" + ret_status="${_omb_prompt_bold_red}" fi # Append new history lines to history file history -a - PS1="$(clock_prompt)$python_venv${hostname} ${bold_cyan}\W $(scm_prompt_char_info)${ret_status}→ ${normal}" + PS1="$(clock_prompt)$python_venv${hostname} ${_omb_prompt_bold_cyan}\W $(scm_prompt_char_info)${ret_status}→ ${_omb_prompt_normal}" } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/gallifrey/gallifrey.theme.sh b/themes/gallifrey/gallifrey.theme.sh index 21eef62..01cc279 100644 --- a/themes/gallifrey/gallifrey.theme.sh +++ b/themes/gallifrey/gallifrey.theme.sh @@ -1,7 +1,7 @@ #! bash oh-my-bash.module # scm theming SCM_THEME_PROMPT_PREFIX="${yellow}(" -SCM_THEME_PROMPT_SUFFIX=")${normal}" +SCM_THEME_PROMPT_SUFFIX=")${_omb_prompt_normal}" SCM_THEME_PROMPT_DIRTY="*" SCM_THEME_PROMPT_CLEAN="" @@ -25,10 +25,10 @@ scm_prompt() { } _omb_theme_PROMPT_COMMAND() { - ps_host="${green}\h${normal}"; - ps_user_mark="${bold}\$${normal}"; - ps_root_mark="${normal}§" - ps_path="${normal}\w"; + ps_host="${green}\h${_omb_prompt_normal}"; + ps_user_mark="${_omb_prompt_bold}\$${_omb_prompt_normal}"; + ps_root_mark="${_omb_prompt_normal}§" + ps_path="${_omb_prompt_normal}\w"; # make it work case $(id -u) in diff --git a/themes/garo/garo.theme.sh b/themes/garo/garo.theme.sh index c3951a6..d93b9a0 100644 --- a/themes/garo/garo.theme.sh +++ b/themes/garo/garo.theme.sh @@ -35,21 +35,21 @@ function _omb_theme_PROMPT_COMMAND() { # This needs to be first to save last command return code local RC="$?" - local hostname="${bold_black}\u" + local hostname="${_omb_prompt_bold_black}\u" local python_venv; _omb_prompt_get_python_venv - python_venv=$white$python_venv + python_venv=$_omb_prompt_white$python_venv # Set return status color if [[ ${RC} == 0 ]]; then - ret_status="${bold_green}" + ret_status="${_omb_prompt_bold_green}" else - ret_status="${bold_red}" + ret_status="${_omb_prompt_bold_red}" fi # Append new history lines to history file history -a - PS1="$python_venv${hostname} ${bold_cyan}\w $(scm_prompt_char_info)${ret_status}→ ${normal}" + PS1="$python_venv${hostname} ${_omb_prompt_bold_cyan}\w $(scm_prompt_char_info)${ret_status}→ ${_omb_prompt_normal}" } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/half-life/half-life.theme.sh b/themes/half-life/half-life.theme.sh index a18ad10..5af1cb8 100644 --- a/themes/half-life/half-life.theme.sh +++ b/themes/half-life/half-life.theme.sh @@ -7,14 +7,14 @@ OSH_THEME_GIT_PROMPT_CLEAN="✓" _omb_theme_half_way_prompt_scm() { local CHAR=$(scm_char) if [[ $CHAR != "$SCM_NONE_CHAR" ]]; then - printf '%s' " on ${blue}$(git_current_branch)$(parse_git_dirty)${normal} " + printf '%s' " on ${blue}$(git_current_branch)$(parse_git_dirty)${_omb_prompt_normal} " fi } _omb_theme_PROMPT_COMMAND() { - local ps_username="${purple}\u${normal}" - local ps_path="${green}\w${normal}" - local ps_user_mark="${orange}λ${normal}" + local ps_username="${purple}\u${_omb_prompt_normal}" + local ps_path="${green}\w${_omb_prompt_normal}" + local ps_user_mark="${_omb_prompt_orange}λ${_omb_prompt_normal}" PS1="$ps_username in $ps_path$(_omb_theme_half_way_prompt_scm) $ps_user_mark " } diff --git a/themes/hawaii50/hawaii50.theme.sh b/themes/hawaii50/hawaii50.theme.sh index 4409e1b..798cb10 100644 --- a/themes/hawaii50/hawaii50.theme.sh +++ b/themes/hawaii50/hawaii50.theme.sh @@ -42,7 +42,7 @@ VIRTUAL_PROMPT_ENABLED=1 # COLORS ====================================================================== ORANGE='\[\e[0;33m\]' -DEFAULT_COLOR="${white}" +DEFAULT_COLOR="${_omb_prompt_white}" USER_COLOR="${purple}" SUPERUSER_COLOR="${red}" @@ -50,14 +50,14 @@ MACHINE_COLOR=$ORANGE IP_COLOR=$ORANGE DIRECTORY_COLOR="${green}" -VE_COLOR="${cyan}" -RVM_COLOR="${cyan}" +VE_COLOR="${_omb_prompt_cyan}" +RVM_COLOR="${_omb_prompt_cyan}" REF_COLOR="${purple}" # SCM prompts -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" SCM_THEME_PROMPT_PREFIX=' on ' SCM_THEME_PROMPT_SUFFIX='' @@ -186,9 +186,9 @@ function _omb_theme_PROMPT_COMMAND() { ((UID == 0)) && UC=$SUPERUSER_COLOR if [[ $VIRTUAL_PROMPT_ENABLED == 1 ]]; then - PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h$(ip_prompt_info) ${DEFAULT_COLOR}in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(virtual_prompt_info)$(scm_prompt_info)${reset_color} \$ " + PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h$(ip_prompt_info) ${DEFAULT_COLOR}in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(virtual_prompt_info)$(scm_prompt_info)${_omb_prompt_reset_color} \$ " else - PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h$(ip_prompt_info) ${DEFAULT_COLOR}in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(scm_prompt_info)${reset_color} \$ " + PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h$(ip_prompt_info) ${DEFAULT_COLOR}in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(scm_prompt_info)${_omb_prompt_reset_color} \$ " fi PS2='> ' PS4='+ ' diff --git a/themes/iterate/iterate.theme.sh b/themes/iterate/iterate.theme.sh index cdb8b2c..7351867 100644 --- a/themes/iterate/iterate.theme.sh +++ b/themes/iterate/iterate.theme.sh @@ -4,16 +4,16 @@ SCM_HG_CHAR="☿ " SCM_SVN_CHAR="⑆ " SCM_NONE_CHAR="" SCM_THEME_PROMPT_DIRTY=" ${red}✗" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" SCM_THEME_PROMPT_PREFIX="|" SCM_THEME_PROMPT_SUFFIX="${green}| " SCM_GIT_AHEAD_CHAR="${green}+" SCM_GIT_BEHIND_CHAR="${red}-" -GIT_THEME_PROMPT_DIRTY=" ${bold_red}✗" -GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" -GIT_THEME_PROMPT_PREFIX="${cyan}|" -GIT_THEME_PROMPT_SUFFIX="${cyan}| " +GIT_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗" +GIT_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" +GIT_THEME_PROMPT_PREFIX="${_omb_prompt_cyan}|" +GIT_THEME_PROMPT_SUFFIX="${_omb_prompt_cyan}| " RVM_THEME_PROMPT_PREFIX="|" RVM_THEME_PROMPT_SUFFIX="| " @@ -34,7 +34,7 @@ function git_prompt_info { LAST_PROMPT="" function _omb_theme_PROMPT_COMMAND() { - local new_PS1="${bold_cyan}$(scm_char)${yellow}$(_omb_prompt_print_ruby_env)${green}\w $(scm_prompt_info)" + local new_PS1="${_omb_prompt_bold_cyan}$(scm_char)${yellow}$(_omb_prompt_print_ruby_env)${green}\w $(scm_prompt_info)" local new_prompt=$(PS1="$new_PS1" "$BASH" --norc -i &1 | sed -n '${s/^\(.*\)exit$/\1/p;}') if [ "$LAST_PROMPT" = "$new_prompt" ]; then @@ -45,7 +45,7 @@ function _omb_theme_PROMPT_COMMAND() { local wrap_char="" [[ ${#new_PS1} -gt $(($COLUMNS/1)) ]] && wrap_char="\n" - PS1="${new_PS1}${green}${wrap_char}→${reset_color} " + PS1="${new_PS1}${green}${wrap_char}→${_omb_prompt_reset_color} " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/kitsune/kitsune.theme.sh b/themes/kitsune/kitsune.theme.sh index 98a361d..1c078a0 100644 --- a/themes/kitsune/kitsune.theme.sh +++ b/themes/kitsune/kitsune.theme.sh @@ -21,23 +21,23 @@ function _omb_theme_PROMPT_COMMAND() { local SC if ((status == 0)); then - SC="$cyan-$bold_green(${green}^_^$bold_green)"; + SC="$_omb_prompt_cyan-$_omb_prompt_bold_green(${green}^_^$_omb_prompt_bold_green)"; else - SC="$cyan-$bold_green(${red}T_T$bold_green)"; + SC="$_omb_prompt_cyan-$_omb_prompt_bold_green(${red}T_T$_omb_prompt_bold_green)"; fi local BC=$(battery_percentage) [[ $BC == no && $BC == -1 ]] && BC= - BC=${BC:+${cyan}-${green}($BC%)} + BC=${BC:+${_omb_prompt_cyan}-${green}($BC%)} - PS1=$TITLEBAR"\n${cyan}┌─${bold_white}[\u@\h]${cyan}─${bold_yellow}(\w)$(scm_prompt_info)\n${cyan}└─${bold_green}[\A]$SC$BC${cyan}-${bold_cyan}[${green}${bold_green}\$${bold_cyan}]${green} " + PS1=$TITLEBAR"\n${_omb_prompt_cyan}┌─${_omb_prompt_bold_white}[\u@\h]${_omb_prompt_cyan}─${_omb_prompt_bold_yellow}(\w)$(scm_prompt_info)\n${_omb_prompt_cyan}└─${_omb_prompt_bold_green}[\A]$SC$BC${_omb_prompt_cyan}-${_omb_prompt_bold_cyan}[${green}${_omb_prompt_bold_green}\$${_omb_prompt_bold_cyan}]${green} " } # scm theming SCM_THEME_PROMPT_DIRTY=" ${red}✗" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" -SCM_THEME_PROMPT_PREFIX="${bold_cyan}(" -SCM_THEME_PROMPT_SUFFIX="${bold_cyan})${reset_color}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" +SCM_THEME_PROMPT_PREFIX="${_omb_prompt_bold_cyan}(" +SCM_THEME_PROMPT_SUFFIX="${_omb_prompt_bold_cyan})${_omb_prompt_reset_color}" _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/luan/luan.theme.sh b/themes/luan/luan.theme.sh index e69afb4..e0a090b 100644 --- a/themes/luan/luan.theme.sh +++ b/themes/luan/luan.theme.sh @@ -1,27 +1,27 @@ #! bash oh-my-bash.module SCM_THEME_PROMPT_DIRTY=" ${red}✗" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" SCM_THEME_PROMPT_PREFIX="(${yellow}" -SCM_THEME_PROMPT_SUFFIX="${normal})" +SCM_THEME_PROMPT_SUFFIX="${_omb_prompt_normal})" GIT_THEME_PROMPT_DIRTY=" ${red}✗" -GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" +GIT_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" GIT_THEME_PROMPT_PREFIX="(${yellow}" -GIT_THEME_PROMPT_SUFFIX="${normal})" +GIT_THEME_PROMPT_SUFFIX="${_omb_prompt_normal})" RVM_THEME_PROMPT_PREFIX="" RVM_THEME_PROMPT_SUFFIX="" function _omb_theme_PROMPT_COMMAND() { dtime="$(clock_prompt)" - user_host="${green}\u@${cyan}\h${normal}" - current_dir="${bold_blue}\w${normal}" - rvm_ruby="${bold_red}$(_omb_prompt_print_ruby_env)${normal}" - git_branch="$(scm_prompt_info)${normal}" - prompt="${bold_green}\$${normal} " - arrow="${bold_white}▶${normal} " - prompt="${bold_green}\$${normal} " + user_host="${green}\u@${_omb_prompt_cyan}\h${_omb_prompt_normal}" + current_dir="${_omb_prompt_bold_blue}\w${_omb_prompt_normal}" + rvm_ruby="${_omb_prompt_bold_red}$(_omb_prompt_print_ruby_env)${_omb_prompt_normal}" + git_branch="$(scm_prompt_info)${_omb_prompt_normal}" + prompt="${_omb_prompt_bold_green}\$${_omb_prompt_normal} " + arrow="${_omb_prompt_bold_white}▶${_omb_prompt_normal} " + prompt="${_omb_prompt_bold_green}\$${_omb_prompt_normal} " PS1="${dtime}${user_host}:${current_dir} ${rvm_ruby} ${git_branch} $arrow $prompt" diff --git a/themes/mairan/mairan.theme.sh b/themes/mairan/mairan.theme.sh index b465752..1cc2f5c 100644 --- a/themes/mairan/mairan.theme.sh +++ b/themes/mairan/mairan.theme.sh @@ -35,11 +35,11 @@ BRACKET_COLOR=$ORANGE SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" -SCM_GIT_CHAR="${bold_green}±${normal}" -SCM_SVN_CHAR="${bold_cyan}⑆${normal}" -SCM_HG_CHAR="${bold_red}☿${normal}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" +SCM_GIT_CHAR="${_omb_prompt_bold_green}±${_omb_prompt_normal}" +SCM_SVN_CHAR="${_omb_prompt_bold_cyan}⑆${_omb_prompt_normal}" +SCM_HG_CHAR="${_omb_prompt_bold_red}☿${_omb_prompt_normal}" #Mysql Prompt export MYSQL_PS1="(\u@\h) [\d]> " @@ -66,7 +66,7 @@ __my_rvm_ruby_version() { is_vim_shell() { if [ ! -z "$VIMRUNTIME" ] then - echo "[${cyan}vim shell${normal}]" + echo "[${_omb_prompt_cyan}vim shell${_omb_prompt_normal}]" fi } @@ -84,7 +84,7 @@ modern_scm_prompt() { chroot(){ if [ -n "$debian_chroot" ] then - my_ps_chroot="${bold_cyan}$debian_chroot${normal}"; + my_ps_chroot="${_omb_prompt_bold_cyan}$debian_chroot${_omb_prompt_normal}"; echo "($my_ps_chroot)"; fi } @@ -93,7 +93,7 @@ chroot(){ my_ve(){ if [ -n "$VIRTUAL_ENV" ] then - my_ps_ve="${bold_purple}$ve${normal}"; + my_ps_ve="${_omb_prompt_bold_magenta}$ve${_omb_prompt_normal}"; echo "($my_ps_ve)"; fi echo ""; @@ -101,12 +101,12 @@ my_ve(){ _omb_theme_PROMPT_COMMAND() { - my_ps_host="$BOLD$ORANGE\h${normal}"; + my_ps_host="$BOLD$ORANGE\h${_omb_prompt_normal}"; # yes, these are the the same for now ... - my_ps_host_root="$ORANGE\h${normal}"; + my_ps_host_root="$ORANGE\h${_omb_prompt_normal}"; - my_ps_user="$BOLD$GREEN\u${normal}" - my_ps_root="${bold_red}\u${normal}"; + my_ps_user="$BOLD$GREEN\u${_omb_prompt_normal}" + my_ps_root="${_omb_prompt_bold_red}\u${_omb_prompt_normal}"; if [ -n "$VIRTUAL_ENV" ] then @@ -115,11 +115,11 @@ _omb_theme_PROMPT_COMMAND() { # nice prompt case "`id -u`" in - 0) PS1="\n${TITLEBAR}${BRACKET_COLOR}┌─${normal}$(my_ve)$(chroot)[$my_ps_root][$my_ps_host_root]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${green}\w${normal}]$(is_vim_shell)${BRACKET_COLOR} -└─▪ ${prompt_symbol} ${normal}" + 0) PS1="\n${TITLEBAR}${BRACKET_COLOR}┌─${_omb_prompt_normal}$(my_ve)$(chroot)[$my_ps_root][$my_ps_host_root]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${green}\w${_omb_prompt_normal}]$(is_vim_shell)${BRACKET_COLOR} +└─▪ ${prompt_symbol} ${_omb_prompt_normal}" ;; - *) PS1="\n${TITLEBAR}${BRACKET_COLOR}┌─${normal}$(my_ve)$(chroot)[$my_ps_user][$my_ps_host]$(modern_scm_prompt)${normal}$(__my_rvm_ruby_version)[${green}\w${normal}]$(is_vim_shell)${BRACKET_COLOR} -└─▪ ${prompt_symbol} ${normal}" + *) PS1="\n${TITLEBAR}${BRACKET_COLOR}┌─${_omb_prompt_normal}$(my_ve)$(chroot)[$my_ps_user][$my_ps_host]$(modern_scm_prompt)${_omb_prompt_normal}$(__my_rvm_ruby_version)[${green}\w${_omb_prompt_normal}]$(is_vim_shell)${BRACKET_COLOR} +└─▪ ${prompt_symbol} ${_omb_prompt_normal}" ;; esac } diff --git a/themes/mbriggs/mbriggs.theme.sh b/themes/mbriggs/mbriggs.theme.sh index 3974948..818e521 100644 --- a/themes/mbriggs/mbriggs.theme.sh +++ b/themes/mbriggs/mbriggs.theme.sh @@ -5,13 +5,13 @@ # BASED ON: smt by Stephen Tudor (stephen@tudorstudio.com) # # ------------------------------------------------------------------# -SCM_THEME_PROMPT_DIRTY="${red}⚡${reset_color}" -SCM_THEME_PROMPT_AHEAD="${red}!${reset_color}" -SCM_THEME_PROMPT_CLEAN="${green}✓${reset_color}" +SCM_THEME_PROMPT_DIRTY="${red}⚡${_omb_prompt_reset_color}" +SCM_THEME_PROMPT_AHEAD="${red}!${_omb_prompt_reset_color}" +SCM_THEME_PROMPT_CLEAN="${green}✓${_omb_prompt_reset_color}" SCM_THEME_PROMPT_PREFIX=" " SCM_THEME_PROMPT_SUFFIX="" GIT_SHA_PREFIX=" ${yellow}" -GIT_SHA_SUFFIX="${reset_color}" +GIT_SHA_SUFFIX="${_omb_prompt_reset_color}" function git_short_sha() { SHA=$(git rev-parse --short HEAD 2> /dev/null) && echo "$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX" @@ -19,8 +19,8 @@ function git_short_sha() { function _omb_theme_PROMPT_COMMAND() { local return_status="" - local ruby="${red}$(_omb_prompt_print_ruby_env)${reset_color}" - local user_host="${green}\h${reset_color}" + local ruby="${red}$(_omb_prompt_print_ruby_env)${_omb_prompt_reset_color}" + local user_host="${green}\h${_omb_prompt_reset_color}" local current_path="\w" local n_commands="\!" local git_branch="$(git_short_sha)$(scm_prompt_info)" diff --git a/themes/minimal/minimal.theme.sh b/themes/minimal/minimal.theme.sh index 485b4cf..8837fbf 100644 --- a/themes/minimal/minimal.theme.sh +++ b/themes/minimal/minimal.theme.sh @@ -1,12 +1,12 @@ #! bash oh-my-bash.module -SCM_THEME_PROMPT_PREFIX="${cyan}(${green}" -SCM_THEME_PROMPT_SUFFIX="${cyan})" +SCM_THEME_PROMPT_PREFIX="${_omb_prompt_cyan}(${green}" +SCM_THEME_PROMPT_SUFFIX="${_omb_prompt_cyan})" SCM_THEME_PROMPT_DIRTY=" ${red}✗" SCM_THEME_PROMPT_CLEAN=" ${green}✓" _omb_theme_PROMPT_COMMAND() { - PS1="$(scm_prompt_info)${reset_color} ${cyan}\W${reset_color} " + PS1="$(scm_prompt_info)${_omb_prompt_reset_color} ${_omb_prompt_cyan}\W${_omb_prompt_reset_color} " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/modern-t/modern-t.theme.sh b/themes/modern-t/modern-t.theme.sh index 4852f5e..273ab5b 100644 --- a/themes/modern-t/modern-t.theme.sh +++ b/themes/modern-t/modern-t.theme.sh @@ -2,11 +2,11 @@ SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" -SCM_GIT_CHAR="${bold_green}±${normal}" -SCM_SVN_CHAR="${bold_cyan}⑆${normal}" -SCM_HG_CHAR="${bold_red}☿${normal}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" +SCM_GIT_CHAR="${_omb_prompt_bold_green}±${_omb_prompt_normal}" +SCM_SVN_CHAR="${_omb_prompt_bold_cyan}⑆${_omb_prompt_normal}" +SCM_HG_CHAR="${_omb_prompt_bold_red}☿${_omb_prompt_normal}" case $TERM in xterm*) @@ -22,7 +22,7 @@ PS3=">> " is_vim_shell() { if [ ! -z "$VIMRUNTIME" ] then - echo "[${cyan}vim shell${normal}]" + echo "[${_omb_prompt_cyan}vim shell${_omb_prompt_normal}]" fi } @@ -42,10 +42,10 @@ _omb_theme_PROMPT_COMMAND() { # Yes, the indenting on these is weird, but it has to be like # this otherwise it won't display properly. - PS1="${TITLEBAR}${bold_red}┌─[${cyan}$(t | wc -l | sed -e's/ *//')${reset_color}]${reset_color}$(modern_scm_prompt)[${cyan}\W${normal}]$(is_vim_shell) -${bold_red}└─▪${normal} " + PS1="${TITLEBAR}${_omb_prompt_bold_red}┌─[${_omb_prompt_cyan}$(t | wc -l | sed -e's/ *//')${_omb_prompt_reset_color}]${_omb_prompt_reset_color}$(modern_scm_prompt)[${_omb_prompt_cyan}\W${_omb_prompt_normal}]$(is_vim_shell) +${_omb_prompt_bold_red}└─▪${_omb_prompt_normal} " else - PS1="${TITLEBAR}┌─[${cyan}$(t | wc -l | sed -e's/ *//')${reset_color}]$(modern_scm_prompt)[${cyan}\W${normal}]$(is_vim_shell) + PS1="${TITLEBAR}┌─[${_omb_prompt_cyan}$(t | wc -l | sed -e's/ *//')${_omb_prompt_reset_color}]$(modern_scm_prompt)[${_omb_prompt_cyan}\W${_omb_prompt_normal}]$(is_vim_shell) └─▪ " fi } diff --git a/themes/modern/modern.theme.sh b/themes/modern/modern.theme.sh index 9829f0a..972455a 100644 --- a/themes/modern/modern.theme.sh +++ b/themes/modern/modern.theme.sh @@ -2,11 +2,11 @@ SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" -SCM_GIT_CHAR="${bold_green}±${normal}" -SCM_SVN_CHAR="${bold_cyan}⑆${normal}" -SCM_HG_CHAR="${bold_red}☿${normal}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" +SCM_GIT_CHAR="${_omb_prompt_bold_green}±${_omb_prompt_normal}" +SCM_SVN_CHAR="${_omb_prompt_bold_cyan}⑆${_omb_prompt_normal}" +SCM_HG_CHAR="${_omb_prompt_bold_red}☿${_omb_prompt_normal}" case $TERM in xterm*) @@ -22,7 +22,7 @@ PS3=">> " is_vim_shell() { if [ ! -z "$VIMRUNTIME" ] then - echo "[${cyan}vim shell${normal}]" + echo "[${_omb_prompt_cyan}vim shell${_omb_prompt_normal}]" fi } @@ -42,10 +42,10 @@ _omb_theme_PROMPT_COMMAND() { # Yes, the indenting on these is weird, but it has to be like # this otherwise it won't display properly. - PS1="${TITLEBAR}${bold_red}┌─${reset_color}$(modern_scm_prompt)[${cyan}\W${normal}][$(battery_charge)]$(is_vim_shell) -${bold_red}└─▪${normal} " + PS1="${TITLEBAR}${_omb_prompt_bold_red}┌─${_omb_prompt_reset_color}$(modern_scm_prompt)[${_omb_prompt_cyan}\W${_omb_prompt_normal}][$(battery_charge)]$(is_vim_shell) +${_omb_prompt_bold_red}└─▪${_omb_prompt_normal} " else - PS1="${TITLEBAR}┌─$(modern_scm_prompt)[${cyan}\W${normal}][$(battery_charge)]$(is_vim_shell) + PS1="${TITLEBAR}┌─$(modern_scm_prompt)[${_omb_prompt_cyan}\W${_omb_prompt_normal}][$(battery_charge)]$(is_vim_shell) └─▪ " fi } diff --git a/themes/morris/morris.theme.sh b/themes/morris/morris.theme.sh index 9609ed4..2690378 100644 --- a/themes/morris/morris.theme.sh +++ b/themes/morris/morris.theme.sh @@ -21,9 +21,9 @@ function _omb_theme_PROMPT_COMMAND() { # scm theming SCM_THEME_PROMPT_DIRTY=" ${red}✗" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" SCM_THEME_PROMPT_PREFIX="${green}(" -SCM_THEME_PROMPT_SUFFIX="${green})${reset_color}" +SCM_THEME_PROMPT_SUFFIX="${green})${_omb_prompt_reset_color}" _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/n0qorg/n0qorg.theme.sh b/themes/n0qorg/n0qorg.theme.sh index 4eeff52..59aff58 100644 --- a/themes/n0qorg/n0qorg.theme.sh +++ b/themes/n0qorg/n0qorg.theme.sh @@ -6,17 +6,17 @@ # for example: # ananas ~/Code/bash-it/themes (master*)» function _omb_theme_PROMPT_COMMAND() { - PS1="${bold_blue}[$(hostname)]${normal} \w${normal} ${bold_white}[$(git_prompt_info)]${normal}» " + PS1="${_omb_prompt_bold_blue}[$(hostname)]${_omb_prompt_normal} \w${_omb_prompt_normal} ${_omb_prompt_bold_white}[$(git_prompt_info)]${_omb_prompt_normal}» " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND ## git-theme # feel free to change git chars. -GIT_THEME_PROMPT_DIRTY="${bold_blue}*${bold_white}" +GIT_THEME_PROMPT_DIRTY="${_omb_prompt_bold_blue}*${_omb_prompt_bold_white}" GIT_THEME_PROMPT_CLEAN="" -GIT_THEME_PROMPT_PREFIX="${bold_blue}(${bold_white}" -GIT_THEME_PROMPT_SUFFIX="${bold_blue})" +GIT_THEME_PROMPT_PREFIX="${_omb_prompt_bold_blue}(${_omb_prompt_bold_white}" +GIT_THEME_PROMPT_SUFFIX="${_omb_prompt_bold_blue})" ## alternate chars # diff --git a/themes/nwinkler/nwinkler.theme.sh b/themes/nwinkler/nwinkler.theme.sh index beb65ec..138bf9f 100644 --- a/themes/nwinkler/nwinkler.theme.sh +++ b/themes/nwinkler/nwinkler.theme.sh @@ -16,8 +16,8 @@ # since 'fasd' is messing with the $PROMPT_COMMAND -PROMPT_END_CLEAN="${green}→${reset_color}" -PROMPT_END_DIRTY="${red}→${reset_color}" +PROMPT_END_CLEAN="${green}→${_omb_prompt_reset_color}" +PROMPT_END_DIRTY="${red}→${_omb_prompt_reset_color}" function prompt_end() { echo -e "$PROMPT_END" @@ -32,15 +32,15 @@ _omb_theme_PROMPT_COMMAND() { #history -a #history -c #history -r - PS1="($(clock_prompt)) $(scm_char) [${blue}\u${reset_color}@${green}\H${reset_color}] ${yellow}\w${reset_color}$(scm_prompt_info) ${reset_color}\n$(prompt_end) " + PS1="($(clock_prompt)) $(scm_char) [${blue}\u${_omb_prompt_reset_color}@${green}\H${_omb_prompt_reset_color}] ${yellow}\w${_omb_prompt_reset_color}$(scm_prompt_info) ${_omb_prompt_reset_color}\n$(prompt_end) " PS2='> ' PS4='+ ' } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" SCM_THEME_PROMPT_PREFIX=" (" SCM_THEME_PROMPT_SUFFIX=")" RVM_THEME_PROMPT_PREFIX=" (" diff --git a/themes/nwinkler_random_colors/nwinkler_random_colors.theme.sh b/themes/nwinkler_random_colors/nwinkler_random_colors.theme.sh index 67f5795..3c4457c 100644 --- a/themes/nwinkler_random_colors/nwinkler_random_colors.theme.sh +++ b/themes/nwinkler_random_colors/nwinkler_random_colors.theme.sh @@ -21,36 +21,36 @@ function randomize_nwinkler { declare -a AVAILABLE_COLORS AVAILABLE_COLORS=( - $black - $red - $green - $yellow - $blue - $purple - $cyan - $white - $orange - $bold_black - $bold_red - $bold_green - $bold_yellow - $bold_blue - $bold_purple - $bold_cyan - $bold_white - $bold_orange + "$_omb_prompt_black" + "$red" + "$green" + "$yellow" + "$blue" + "$purple" + "$_omb_prompt_cyan" + "$_omb_prompt_white" + "$_omb_prompt_orange" + "$_omb_prompt_bold_black" + "$_omb_prompt_bold_red" + "$_omb_prompt_bold_green" + "$_omb_prompt_bold_yellow" + "$_omb_prompt_bold_blue" + "$_omb_prompt_bold_magenta" + "$_omb_prompt_bold_cyan" + "$_omb_prompt_bold_white" + "$_omb_prompt_bold_orange" + + # # Uncomment these to allow underlines: + # "$_omb_prompt_underline_black" + # "$_omb_prompt_underline_red" + # "$_omb_prompt_underline_green" + # "$_omb_prompt_underline_yellow" + # "$_omb_prompt_underline_blue" + # "$_omb_prompt_underline_magenta" + # "$_omb_prompt_underline_cyan" + # "$_omb_prompt_underline_white" + # "$_omb_prompt_underline_orange" ) - # Uncomment these to allow underlines: - #$underline_black - #$underline_red - #$underline_green - #$underline_yellow - #$underline_blue - #$underline_purple - #$underline_cyan - #$underline_white - #$underline_orange - #) USERNAME_COLOR=${AVAILABLE_COLORS[$RANDOM % ${#AVAILABLE_COLORS[@]} ]} HOSTNAME_COLOR=${AVAILABLE_COLORS[$RANDOM % ${#AVAILABLE_COLORS[@]} ]} @@ -83,8 +83,8 @@ else echo fi -PROMPT_END_CLEAN="${green}→${reset_color}" -PROMPT_END_DIRTY="${red}→${reset_color}" +PROMPT_END_CLEAN="${green}→${_omb_prompt_reset_color}" +PROMPT_END_DIRTY="${red}→${_omb_prompt_reset_color}" function prompt_end() { echo -e "$PROMPT_END" @@ -99,15 +99,15 @@ _omb_theme_PROMPT_COMMAND() { history -a history -c history -r - PS1="($(clock_prompt)${reset_color}) $(scm_char) [${USERNAME_COLOR}\u${reset_color}@${HOSTNAME_COLOR}\H${reset_color}] ${PATH_COLOR}\w${reset_color}$(scm_prompt_info) ${reset_color}\n$(prompt_end) " + PS1="($(clock_prompt)${_omb_prompt_reset_color}) $(scm_char) [${USERNAME_COLOR}\u${_omb_prompt_reset_color}@${HOSTNAME_COLOR}\H${_omb_prompt_reset_color}] ${PATH_COLOR}\w${_omb_prompt_reset_color}$(scm_prompt_info) ${_omb_prompt_reset_color}\n$(prompt_end) " PS2='> ' PS4='+ ' } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" SCM_THEME_PROMPT_PREFIX=" (" SCM_THEME_PROMPT_SUFFIX=")" RVM_THEME_PROMPT_PREFIX=" (" diff --git a/themes/pete/pete.theme.sh b/themes/pete/pete.theme.sh index 6c151ff..5ce3231 100644 --- a/themes/pete/pete.theme.sh +++ b/themes/pete/pete.theme.sh @@ -5,7 +5,7 @@ _omb_theme_PROMPT_COMMAND() { history -a history -c history -r - PS1="($(clock_prompt)) $(scm_char) [$blue\u$reset_color@$green\H$reset_color] $yellow\w${reset_color}$(scm_prompt_info)$(_omb_prompt_print_ruby_env) $reset_color " + PS1="($(clock_prompt)) $(scm_char) [$blue\u$_omb_prompt_reset_color@$green\H$_omb_prompt_reset_color] $yellow\w${_omb_prompt_reset_color}$(scm_prompt_info)$(_omb_prompt_print_ruby_env) $_omb_prompt_reset_color " PS2='> ' PS4='+ ' } diff --git a/themes/powerline-multiline/powerline-multiline.base.sh b/themes/powerline-multiline/powerline-multiline.base.sh index bbd8652..b25b0c4 100644 --- a/themes/powerline-multiline/powerline-multiline.base.sh +++ b/themes/powerline-multiline/powerline-multiline.base.sh @@ -3,7 +3,7 @@ source "$OSH/themes/powerline/powerline.base.sh" function __powerline_last_status_prompt { - [[ "$1" -ne 0 ]] && echo "$(set_color ${LAST_STATUS_THEME_PROMPT_COLOR} -) ${1} ${normal}" + [[ "$1" -ne 0 ]] && echo "$(set_color ${LAST_STATUS_THEME_PROMPT_COLOR} -) ${1} ${_omb_prompt_normal}" } function __powerline_right_segment { @@ -20,7 +20,7 @@ function __powerline_right_segment { separator_color="$(set_color ${params[1]} ${LAST_SEGMENT_COLOR})" (( padding += 1 )) fi - RIGHT_PROMPT+="${separator_color}${separator_char}${normal}$(set_color - ${params[1]}) ${params[0]} ${normal}$(set_color - ${COLOR})${normal}" + RIGHT_PROMPT+="${separator_color}${separator_char}${_omb_prompt_normal}$(set_color - ${params[1]}) ${params[0]} ${_omb_prompt_normal}$(set_color - ${COLOR})${_omb_prompt_normal}" RIGHT_PROMPT_LENGTH=$(( ${#params[0]} + RIGHT_PROMPT_LENGTH + padding )) LAST_SEGMENT_COLOR="${params[1]}" (( SEGMENTS_AT_RIGHT += 1 )) @@ -43,7 +43,7 @@ function __powerline_prompt_command { local info="$(__powerline_${segment}_prompt)" [[ -n "${info}" ]] && __powerline_left_segment "${info}" done - [[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="$(set_color ${LAST_SEGMENT_COLOR} -)${separator_char}${normal}" + [[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="$(set_color ${LAST_SEGMENT_COLOR} -)${separator_char}${_omb_prompt_normal}" ## right prompt ## if [[ -n "${POWERLINE_RIGHT_PROMPT}" ]]; then diff --git a/themes/powerline-naked/powerline-naked.base.sh b/themes/powerline-naked/powerline-naked.base.sh index d93ff6a..0cd4239 100644 --- a/themes/powerline-naked/powerline-naked.base.sh +++ b/themes/powerline-naked/powerline-naked.base.sh @@ -12,6 +12,6 @@ function __powerline_left_segment { if [[ "${SEGMENTS_AT_LEFT}" -gt 0 ]]; then separator="${separator_char}" fi - LEFT_PROMPT+="${separator}$(set_color ${params[1]} -) ${params[0]} ${normal}" + LEFT_PROMPT+="${separator}$(set_color ${params[1]} -) ${params[0]} ${_omb_prompt_normal}" (( SEGMENTS_AT_LEFT += 1 )) } diff --git a/themes/powerline-plain/powerline-plain.base.sh b/themes/powerline-plain/powerline-plain.base.sh index bcc3686..f8a1cc8 100644 --- a/themes/powerline-plain/powerline-plain.base.sh +++ b/themes/powerline-plain/powerline-plain.base.sh @@ -7,7 +7,7 @@ function __powerline_left_segment { local params=( $1 ) IFS="${OLD_IFS}" - LEFT_PROMPT+="${separator}$(set_color - ${params[1]}) ${params[0]} ${normal}" + LEFT_PROMPT+="${separator}$(set_color - ${params[1]}) ${params[0]} ${_omb_prompt_normal}" LAST_SEGMENT_COLOR=${params[1]} } @@ -22,7 +22,7 @@ function __powerline_prompt_command { [[ -n "${info}" ]] && __powerline_left_segment "${info}" done [[ "${last_status}" -ne 0 ]] && __powerline_left_segment $(__powerline_last_status_prompt ${last_status}) - [[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="$(set_color ${LAST_SEGMENT_COLOR} -) ${normal}" + [[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="$(set_color ${LAST_SEGMENT_COLOR} -) ${_omb_prompt_normal}" PS1="${LEFT_PROMPT} " diff --git a/themes/powerline/powerline.base.sh b/themes/powerline/powerline.base.sh index 6fe3a65..33e8e11 100644 --- a/themes/powerline/powerline.base.sh +++ b/themes/powerline/powerline.base.sh @@ -130,9 +130,9 @@ function __powerline_left_segment { local separator="" if [[ "${SEGMENTS_AT_LEFT}" -gt 0 ]]; then - separator="$(set_color ${LAST_SEGMENT_COLOR} ${params[1]})${separator_char}${normal}" + separator="$(set_color ${LAST_SEGMENT_COLOR} ${params[1]})${separator_char}${_omb_prompt_normal}" fi - LEFT_PROMPT+="${separator}$(set_color - ${params[1]}) ${params[0]} ${normal}" + LEFT_PROMPT+="${separator}$(set_color - ${params[1]}) ${params[0]} ${_omb_prompt_normal}" LAST_SEGMENT_COLOR=${params[1]} (( SEGMENTS_AT_LEFT += 1 )) } @@ -160,7 +160,7 @@ function __powerline_prompt_command { [[ -n "${info}" ]] && __powerline_left_segment "${info}" done [[ "${last_status}" -ne 0 ]] && __powerline_left_segment $(__powerline_last_status_prompt ${last_status}) - [[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="$(set_color ${LAST_SEGMENT_COLOR} -)${separator_char}${normal}" + [[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="$(set_color ${LAST_SEGMENT_COLOR} -)${separator_char}${_omb_prompt_normal}" PS1="${LEFT_PROMPT} " diff --git a/themes/primer/primer.theme.sh b/themes/primer/primer.theme.sh index 35758f2..64bbf38 100644 --- a/themes/primer/primer.theme.sh +++ b/themes/primer/primer.theme.sh @@ -2,7 +2,7 @@ # based of the candy theme, but minimized by odbol function _omb_theme_PROMPT_COMMAND() { - PS1="$(clock_prompt) ${reset_color}${white}\w${reset_color}$(scm_prompt_info)${blue} →${bold_blue} ${reset_color} "; + PS1="$(clock_prompt) ${_omb_prompt_reset_color}${_omb_prompt_white}\w${_omb_prompt_reset_color}$(scm_prompt_info)${blue} →${_omb_prompt_bold_blue} ${_omb_prompt_reset_color} "; } THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$blue"} diff --git a/themes/pro/pro.theme.sh b/themes/pro/pro.theme.sh index 6462f0c..674312c 100644 --- a/themes/pro/pro.theme.sh +++ b/themes/pro/pro.theme.sh @@ -16,7 +16,7 @@ function git_prompt_info { } function _omb_theme_PROMPT_COMMAND() { - PS1="\h: \W $(scm_prompt_info)${reset_color} $ " + PS1="\h: \W $(scm_prompt_info)${_omb_prompt_reset_color} $ " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/pure/pure.theme.sh b/themes/pure/pure.theme.sh index d82793d..9b9fd5e 100644 --- a/themes/pure/pure.theme.sh +++ b/themes/pure/pure.theme.sh @@ -3,11 +3,11 @@ SCM_THEME_PROMPT_PREFIX="|" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -SCM_THEME_PROMPT_CLEAN=" ${green}✓${normal}" -SCM_GIT_CHAR="${green}±${normal}" -SCM_SVN_CHAR="${bold_cyan}⑆${normal}" -SCM_HG_CHAR="${bold_red}☿${normal}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${green}✓${_omb_prompt_normal}" +SCM_GIT_CHAR="${green}±${_omb_prompt_normal}" +SCM_SVN_CHAR="${_omb_prompt_bold_cyan}⑆${_omb_prompt_normal}" +SCM_HG_CHAR="${_omb_prompt_bold_red}☿${_omb_prompt_normal}" ### TODO: openSUSE has already colors enabled, check if those differs from stock # LS colors, made with http://geoff.greer.fm/lscolors/ @@ -25,12 +25,12 @@ scm_prompt() { } _omb_theme_PROMPT_COMMAND() { - ps_host="${bold_blue}\h${normal}"; - ps_user="${green}\u${normal}"; - ps_user_mark="${green} $ ${normal}"; + ps_host="${_omb_prompt_bold_blue}\h${_omb_prompt_normal}"; + ps_user="${green}\u${_omb_prompt_normal}"; + ps_user_mark="${green} $ ${_omb_prompt_normal}"; ps_root="${red}\u${red}"; - ps_root_mark="${red} # ${normal}" - ps_path="${yellow}\w${normal}"; + ps_root_mark="${red} # ${_omb_prompt_normal}" + ps_path="${yellow}\w${_omb_prompt_normal}"; # make it work case $(id -u) in diff --git a/themes/purity/purity.theme.sh b/themes/purity/purity.theme.sh index 61ac9cd..13df5f8 100644 --- a/themes/purity/purity.theme.sh +++ b/themes/purity/purity.theme.sh @@ -1,17 +1,17 @@ #! bash oh-my-bash.module -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})" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}⊘${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" +SCM_THEME_PROMPT_PREFIX="${_omb_prompt_reset_color}( " +SCM_THEME_PROMPT_SUFFIX=" ${_omb_prompt_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})" +GIT_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}⊘${_omb_prompt_normal}" +GIT_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" +GIT_THEME_PROMPT_PREFIX="${_omb_prompt_reset_color}( " +GIT_THEME_PROMPT_SUFFIX=" ${_omb_prompt_reset_color})" -STATUS_THEME_PROMPT_BAD="${bold_red}❯${reset_color}${normal} " -STATUS_THEME_PROMPT_OK="${bold_green}❯${reset_color}${normal} " +STATUS_THEME_PROMPT_BAD="${_omb_prompt_bold_red}❯${_omb_prompt_reset_color}${_omb_prompt_normal} " +STATUS_THEME_PROMPT_OK="${_omb_prompt_bold_green}❯${_omb_prompt_reset_color}${_omb_prompt_normal} " function _omb_theme_PROMPT_COMMAND() { local ret_status="$( [ $? -eq 0 ] && echo -e "$STATUS_THEME_PROMPT_OK" || echo -e "$STATUS_THEME_PROMPT_BAD")" diff --git a/themes/rainbowbrite/rainbowbrite.theme.sh b/themes/rainbowbrite/rainbowbrite.theme.sh index a662dfe..8c1810b 100644 --- a/themes/rainbowbrite/rainbowbrite.theme.sh +++ b/themes/rainbowbrite/rainbowbrite.theme.sh @@ -11,9 +11,9 @@ _omb_theme_PROMPT_COMMAND() { history -c history -r # displays user@server in purple - # PS1="$red$(scm_char) $purple\u@\h$reset_color:$blue\w$yellow$(scm_prompt_info)$(_omb_prompt_print_ruby_env) $black\$$reset_color " + # PS1="$red$(scm_char) $purple\u@\h$_omb_prompt_reset_color:$blue\w$yellow$(scm_prompt_info)$(_omb_prompt_print_ruby_env) $_omb_prompt_black\$$_omb_prompt_reset_color " # no user@server - PS1="$red$(scm_char) $blue\w$yellow$(scm_prompt_info)$(_omb_prompt_print_ruby_env) $black\$$reset_color " + PS1="$red$(scm_char) $blue\w$yellow$(scm_prompt_info)$(_omb_prompt_print_ruby_env) $_omb_prompt_black\$$_omb_prompt_reset_color " PS2='> ' PS4='+ ' } diff --git a/themes/rjorgenson/rjorgenson.theme.sh b/themes/rjorgenson/rjorgenson.theme.sh index 99e1b23..bfab490 100644 --- a/themes/rjorgenson/rjorgenson.theme.sh +++ b/themes/rjorgenson/rjorgenson.theme.sh @@ -9,15 +9,15 @@ OMB_THEME_STRING_COLOR="${OMB_THEME_STRING_COLOR-${green}}" SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" -SCM_GIT_CHAR="${OMB_THEME_STRING_COLOR}±${normal}" -SCM_SVN_CHAR="${bold_cyan}⑆${normal}" -SCM_HG_CHAR="${bold_red}☿${normal}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" +SCM_GIT_CHAR="${OMB_THEME_STRING_COLOR}±${_omb_prompt_normal}" +SCM_SVN_CHAR="${_omb_prompt_bold_cyan}⑆${_omb_prompt_normal}" +SCM_HG_CHAR="${_omb_prompt_bold_red}☿${_omb_prompt_normal}" -PROMPT_CHAR="${OMB_THEME_BRACKET_COLOR}➞ ${normal}" +PROMPT_CHAR="${OMB_THEME_BRACKET_COLOR}➞ ${_omb_prompt_normal}" if [[ $OSTYPE == *darwin* ]]; then - PROMPT_CHAR="${OMB_THEME_BRACKET_COLOR}➞ ${normal}" + PROMPT_CHAR="${OMB_THEME_BRACKET_COLOR}➞ ${_omb_prompt_normal}" fi #Mysql Prompt @@ -35,12 +35,12 @@ __my_rvm_ruby_version() { [ "${gemset}" != "" ] && gemset="@${gemset}" local full="${version}${gemset}" [ "${full}" != "" ] \ - && echo "${OMB_THEME_BRACKET_COLOR}[${OMB_THEME_STRING_COLOR}${full}${OMB_THEME_BRACKET_COLOR}]${normal}" + && echo "${OMB_THEME_BRACKET_COLOR}[${OMB_THEME_STRING_COLOR}${full}${OMB_THEME_BRACKET_COLOR}]${_omb_prompt_normal}" } is_vim_shell() { if [ -n "${VIMRUNTIME}" ] ; then - echo "${OMB_THEME_BRACKET_COLOR}[${OMB_THEME_STRING_COLOR}vim shell${OMB_THEME_BRACKET_COLOR}]${normal}" + echo "${OMB_THEME_BRACKET_COLOR}[${OMB_THEME_STRING_COLOR}vim shell${OMB_THEME_BRACKET_COLOR}]${_omb_prompt_normal}" fi } @@ -56,7 +56,7 @@ todo_txt_count() { local count=$(todo.sh ls \ | awk '/TODO: [0-9]+ of ([0-9]+) tasks shown/ { print $4 }') if is_integer "${count}" ; then # did we get a sane answer back - echo "${OMB_THEME_BRACKET_COLOR}[${OMB_THEME_STRING_COLOR}T:$count${OMB_THEME_BRACKET_COLOR}]$normal" + echo "${OMB_THEME_BRACKET_COLOR}[${OMB_THEME_STRING_COLOR}T:$count${OMB_THEME_BRACKET_COLOR}]$_omb_prompt_normal" fi fi } @@ -66,22 +66,22 @@ modern_scm_prompt() { if [ ! "${CHAR}" = "${SCM_NONE_CHAR}" ] ; then printf "%s" \ "${OMB_THEME_BRACKET_COLOR}[${CHAR}${OMB_THEME_BRACKET_COLOR}]" \ - "[${OMB_THEME_STRING_COLOR}$(scm_prompt_info)${OMB_THEME_BRACKET_COLOR}]$normal" + "[${OMB_THEME_STRING_COLOR}$(scm_prompt_info)${OMB_THEME_BRACKET_COLOR}]$_omb_prompt_normal" printf "\n" fi } _omb_theme_PROMPT_COMMAND() { - local my_host="${OMB_THEME_STRING_COLOR}\h${normal}"; - local my_user="${OMB_THEME_STRING_COLOR}\u${normal}"; - local my_path="${OMB_THEME_STRING_COLOR}\w${normal}"; + local my_host="${OMB_THEME_STRING_COLOR}\h${_omb_prompt_normal}"; + local my_user="${OMB_THEME_STRING_COLOR}\u${_omb_prompt_normal}"; + local my_path="${OMB_THEME_STRING_COLOR}\w${_omb_prompt_normal}"; local bracket_c="${OMB_THEME_BRACKET_COLOR}" local line2 ; line2="${bracket_c}└─$(todo_txt_count)${PROMPT_CHAR}" # nice prompt case "$(id -u)" in 0) - my_user="${bold_red}\u${normal}"; + my_user="${_omb_prompt_bold_red}\u${_omb_prompt_normal}"; line2="${bracket_c}└─${PROMPT_CHAR}" ;; esac diff --git a/themes/roderik/roderik.theme.sh b/themes/roderik/roderik.theme.sh index 0798b32..60daf2f 100644 --- a/themes/roderik/roderik.theme.sh +++ b/themes/roderik/roderik.theme.sh @@ -8,9 +8,9 @@ export PROMPT_DIRTRIM=3 function _omb_theme_PROMPT_COMMAND() { if [[ ${EUID} == 0 ]] ; then - PS1="[$(clock_prompt)]${yellow}[${red}\u@\h ${green}\w${yellow}]${red}$(__git_ps1 "(%s)")${normal}\\$ " + PS1="[$(clock_prompt)]${yellow}[${red}\u@\h ${green}\w${yellow}]${red}$(__git_ps1 "(%s)")${_omb_prompt_normal}\\$ " else - PS1="[$(clock_prompt)]${yellow}[${cyan}\u@\h ${green}\w${yellow}]${red}$(__git_ps1 "(%s)")${normal}\\$ " + PS1="[$(clock_prompt)]${yellow}[${_omb_prompt_cyan}\u@\h ${green}\w${yellow}]${red}$(__git_ps1 "(%s)")${_omb_prompt_normal}\\$ " fi } diff --git a/themes/simple/simple.theme.sh b/themes/simple/simple.theme.sh index b8e21cb..41772fa 100644 --- a/themes/simple/simple.theme.sh +++ b/themes/simple/simple.theme.sh @@ -13,7 +13,7 @@ case $TERM in esac function _omb_theme_PROMPT_COMMAND() { - PS1="${TITLEBAR}${orange}${reset_color}${green}\w${bold_blue}\[\$(scm_prompt_info)\]${normal} " + PS1="${TITLEBAR}${_omb_prompt_orange}${_omb_prompt_reset_color}${green}\w${_omb_prompt_bold_blue}\[\$(scm_prompt_info)\]${_omb_prompt_normal} " } # scm themeing diff --git a/themes/sirup/sirup.theme.sh b/themes/sirup/sirup.theme.sh index 1d6a5ba..58d6a99 100644 --- a/themes/sirup/sirup.theme.sh +++ b/themes/sirup/sirup.theme.sh @@ -15,7 +15,7 @@ function _omb_theme_sirup_rubygem { function _omb_theme_PROMPT_COMMAND { # Check http://github.com/Sirupsen/dotfiles for screenshot - PS1="$blue\W/$bold_blue$(_omb_theme_sirup_rubygem)$bold_green$(__git_ps1 " (%s)") ${normal}$ " + PS1="$blue\W/$_omb_prompt_bold_blue$(_omb_theme_sirup_rubygem)$_omb_prompt_bold_green$(__git_ps1 " (%s)") ${_omb_prompt_normal}$ " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/slick/slick.theme.sh b/themes/slick/slick.theme.sh index 8756c00..a978602 100644 --- a/themes/slick/slick.theme.sh +++ b/themes/slick/slick.theme.sh @@ -2,11 +2,11 @@ SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" -SCM_GIT_CHAR="${bold_cyan}±${normal}" -SCM_SVN_CHAR="${bold_green}⑆${normal}" -SCM_HG_CHAR="${bold_red}☿${normal}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" +SCM_GIT_CHAR="${_omb_prompt_bold_cyan}±${_omb_prompt_normal}" +SCM_SVN_CHAR="${_omb_prompt_bold_green}⑆${_omb_prompt_normal}" +SCM_HG_CHAR="${_omb_prompt_bold_red}☿${_omb_prompt_normal}" #Mysql Prompt export MYSQL_PS1="(\u@\h) [\d]> " @@ -33,14 +33,14 @@ __my_rvm_ruby_version() { __my_venv_prompt() { if [ ! -z "$VIRTUAL_ENV" ] then - echo "[${blue}@${normal}${VIRTUAL_ENV##*/}]" + echo "[${blue}@${_omb_prompt_normal}${VIRTUAL_ENV##*/}]" fi } is_vim_shell() { if [ ! -z "$VIMRUNTIME" ] then - echo "[${cyan}vim shell${normal}]" + echo "[${_omb_prompt_cyan}vim shell${_omb_prompt_normal}]" fi } @@ -57,11 +57,11 @@ modern_scm_prompt() { _omb_theme_PROMPT_COMMAND() { case $HOSTNAME in - "clappy"* ) my_ps_host="${green}\h${normal}"; + "clappy"* ) my_ps_host="${green}\h${_omb_prompt_normal}"; ;; - "icekernel") my_ps_host="${red}\h${normal}"; + "icekernel") my_ps_host="${red}\h${_omb_prompt_normal}"; ;; - * ) my_ps_host="${green}\h${normal}"; + * ) my_ps_host="${green}\h${_omb_prompt_normal}"; ;; esac @@ -71,10 +71,10 @@ _omb_theme_PROMPT_COMMAND() { # nice prompt case "`id -u`" in - 0) PS1="${TITLEBAR}[$my_ps_root][$my_ps_host]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${cyan}\w${normal}]$(is_vim_shell) + 0) PS1="${TITLEBAR}[$my_ps_root][$my_ps_host]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${_omb_prompt_cyan}\w${_omb_prompt_normal}]$(is_vim_shell) $ " ;; - *) PS1="${TITLEBAR}[$my_ps_user][$my_ps_host]$(modern_scm_prompt)$(__my_rvm_ruby_version)$(__my_venv_prompt)[${cyan}\w${normal}]$(is_vim_shell) + *) PS1="${TITLEBAR}[$my_ps_user][$my_ps_host]$(modern_scm_prompt)$(__my_rvm_ruby_version)$(__my_venv_prompt)[${_omb_prompt_cyan}\w${_omb_prompt_normal}]$(is_vim_shell) $ " ;; esac diff --git a/themes/standard/standard.theme.sh b/themes/standard/standard.theme.sh index 2e95821..9605609 100644 --- a/themes/standard/standard.theme.sh +++ b/themes/standard/standard.theme.sh @@ -19,7 +19,7 @@ case $TERM in esac function _omb_theme_PROMPT_COMMAND() { - PROMPT='${green}\u${normal}@${green}\h${normal}:${blue}\w${normal}${red}$(prompt_char)$(git_prompt_info)${normal}\$ ' + PROMPT='${green}\u${_omb_prompt_normal}@${green}\h${_omb_prompt_normal}:${blue}\w${_omb_prompt_normal}${red}$(prompt_char)$(git_prompt_info)${_omb_prompt_normal}\$ ' } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/tonotdo/tonotdo.theme.sh b/themes/tonotdo/tonotdo.theme.sh index de0a4ae..e38e9d2 100644 --- a/themes/tonotdo/tonotdo.theme.sh +++ b/themes/tonotdo/tonotdo.theme.sh @@ -1,13 +1,13 @@ #! bash oh-my-bash.module SCM_THEME_PROMPT_PREFIX=" ${purple}" -SCM_THEME_PROMPT_SUFFIX=" ${normal}" +SCM_THEME_PROMPT_SUFFIX=" ${_omb_prompt_normal}" SCM_THEME_PROMPT_DIRTY=" ${red}✗" SCM_THEME_PROMPT_CLEAN=" ${green}✓" SCM_GIT_SHOW_DETAILS="false" function _omb_theme_PROMPT_COMMAND() { - PS1="${yellow}\u${normal}${cyan}@\h${normal}${purple} ${normal}${green}\w${normal}$(scm_prompt_info)> " + PS1="${yellow}\u${_omb_prompt_normal}${_omb_prompt_cyan}@\h${_omb_prompt_normal}${purple} ${_omb_prompt_normal}${green}\w${_omb_prompt_normal}$(scm_prompt_info)> " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/tylenol/tylenol.theme.sh b/themes/tylenol/tylenol.theme.sh index 8fe38e4..e1a7c58 100644 --- a/themes/tylenol/tylenol.theme.sh +++ b/themes/tylenol/tylenol.theme.sh @@ -5,7 +5,7 @@ SCM_THEME_PROMPT_DIRTY=" ${red}✗" SCM_THEME_PROMPT_CLEAN=" ${green}✓" -SCM_THEME_PROMPT_PREFIX=" ${yellow}|${reset_color}" +SCM_THEME_PROMPT_PREFIX=" ${yellow}|${_omb_prompt_reset_color}" SCM_THEME_PROMPT_SUFFIX="${yellow}|" RVM_THEME_PROMPT_PREFIX="|" @@ -14,7 +14,7 @@ VIRTUALENV_THEME_PROMPT_PREFIX='|' VIRTUALENV_THEME_PROMPT_SUFFIX='|' function _omb_theme_PROMPT_COMMAND() { - PS1="\n${green}$(_omb_prompt_print_python_venv)${red}$(_omb_prompt_print_ruby_env) ${reset_color}\h ${orange}in ${reset_color}\w\n${yellow}$(scm_char)$(scm_prompt_info) ${yellow}→${white} " + PS1="\n${green}$(_omb_prompt_print_python_venv)${red}$(_omb_prompt_print_ruby_env) ${_omb_prompt_reset_color}\h ${_omb_prompt_orange}in ${_omb_prompt_reset_color}\w\n${yellow}$(scm_char)$(scm_prompt_info) ${yellow}→${_omb_prompt_white} " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/wanelo/wanelo.theme.sh b/themes/wanelo/wanelo.theme.sh index fd11e94..06cb104 100644 --- a/themes/wanelo/wanelo.theme.sh +++ b/themes/wanelo/wanelo.theme.sh @@ -1,11 +1,11 @@ #! bash oh-my-bash.module SCM_THEME_PROMPT_DIRTY=" ${red}✗" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" SCM_THEME_PROMPT_PREFIX=" |" SCM_THEME_PROMPT_SUFFIX="${green}|" GIT_THEME_PROMPT_DIRTY=" ${red}✗" -GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" +GIT_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓" GIT_THEME_PROMPT_PREFIX=" ${green}|" GIT_THEME_PROMPT_SUFFIX="${green}|" @@ -18,7 +18,7 @@ function _omb_theme_PROMPT_COMMAND() { else status=💔 fi - PS1="\n${yellow}$(_omb_prompt_print_ruby_env) ${purple}\h ${reset_color}in ${green}\w $status \n${bold_cyan} ${blue}|$(clock_prompt)|${green}$(scm_prompt_info) ${green}→${reset_color} " + PS1="\n${yellow}$(_omb_prompt_print_ruby_env) ${purple}\h ${_omb_prompt_reset_color}in ${green}\w $status \n${_omb_prompt_bold_cyan} ${blue}|$(clock_prompt)|${green}$(scm_prompt_info) ${green}→${_omb_prompt_reset_color} " } THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$blue"} diff --git a/themes/zitron/zitron.theme.sh b/themes/zitron/zitron.theme.sh index aca4f82..9f3d7f6 100644 --- a/themes/zitron/zitron.theme.sh +++ b/themes/zitron/zitron.theme.sh @@ -3,7 +3,7 @@ ## git-theme # feel free to change git chars. -GIT_THEME_PROMPT_DIRTY="${bold_yellow}*${normal}" +GIT_THEME_PROMPT_DIRTY="${_omb_prompt_bold_yellow}*${_omb_prompt_normal}" GIT_THEME_PROMPT_CLEAN="" GIT_THEME_PROMPT_PREFIX="" GIT_THEME_PROMPT_SUFFIX="" @@ -18,7 +18,7 @@ function _omb_theme_PROMPT_COMMAND() { # user:host:pwd git-branch(*)$ # for example: # noqqe:deathstar:themes master*$ - PS1="${no_color}\u:$(hostname)${normal}:${bold_yellow}\W/${normal} $(git_prompt_info)${reset_color}$ " + PS1="${no_color}\u:$(hostname)${_omb_prompt_normal}:${_omb_prompt_bold_yellow}\W/${_omb_prompt_normal} $(git_prompt_info)${_omb_prompt_reset_color}$ " } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/zork/zork.theme.sh b/themes/zork/zork.theme.sh index 8b3130a..fcd8601 100644 --- a/themes/zork/zork.theme.sh +++ b/themes/zork/zork.theme.sh @@ -2,11 +2,11 @@ SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" -SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" -SCM_GIT_CHAR="${bold_green}±${normal}" -SCM_SVN_CHAR="${bold_cyan}⑆${normal}" -SCM_HG_CHAR="${bold_red}☿${normal}" +SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_bold_red}✗${_omb_prompt_normal}" +SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}" +SCM_GIT_CHAR="${_omb_prompt_bold_green}±${_omb_prompt_normal}" +SCM_SVN_CHAR="${_omb_prompt_bold_cyan}⑆${_omb_prompt_normal}" +SCM_HG_CHAR="${_omb_prompt_bold_red}☿${_omb_prompt_normal}" #Mysql Prompt export MYSQL_PS1="(\u@\h) [\d]> " @@ -33,7 +33,7 @@ __my_rvm_ruby_version() { is_vim_shell() { if [ ! -z "$VIMRUNTIME" ] then - echo "[${cyan}vim shell${normal}]" + echo "[${_omb_prompt_cyan}vim shell${_omb_prompt_normal}]" fi } @@ -51,7 +51,7 @@ modern_scm_prompt() { chroot(){ if [ -n "$debian_chroot" ] then - my_ps_chroot="${bold_cyan}$debian_chroot${normal}"; + my_ps_chroot="${_omb_prompt_bold_cyan}$debian_chroot${_omb_prompt_normal}"; echo "($my_ps_chroot)"; fi } @@ -60,7 +60,7 @@ chroot(){ my_ve(){ if [ -n "$VIRTUAL_ENV" ] then - my_ps_ve="${bold_purple}$ve${normal}"; + my_ps_ve="${_omb_prompt_bold_magenta}$ve${_omb_prompt_normal}"; echo "($my_ps_ve)"; fi echo ""; @@ -68,12 +68,12 @@ my_ve(){ _omb_theme_PROMPT_COMMAND() { - my_ps_host="${green}\h${normal}"; + my_ps_host="${green}\h${_omb_prompt_normal}"; # yes, these are the the same for now ... - my_ps_host_root="${green}\h${normal}"; + my_ps_host_root="${green}\h${_omb_prompt_normal}"; - my_ps_user="${bold_green}\u${normal}" - my_ps_root="${bold_red}\u${normal}"; + my_ps_user="${_omb_prompt_bold_green}\u${_omb_prompt_normal}" + my_ps_root="${_omb_prompt_bold_red}\u${_omb_prompt_normal}"; if [ -n "$VIRTUAL_ENV" ] then @@ -82,10 +82,10 @@ _omb_theme_PROMPT_COMMAND() { # nice prompt case "`id -u`" in - 0) PS1="${TITLEBAR}┌─$(my_ve)$(chroot)[$my_ps_root][$my_ps_host_root]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${cyan}\w${normal}]$(is_vim_shell) + 0) PS1="${TITLEBAR}┌─$(my_ve)$(chroot)[$my_ps_root][$my_ps_host_root]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${_omb_prompt_cyan}\w${_omb_prompt_normal}]$(is_vim_shell) └─▪ " ;; - *) PS1="${TITLEBAR}┌─$(my_ve)$(chroot)[$my_ps_user][$my_ps_host]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${cyan}\w${normal}]$(is_vim_shell) + *) PS1="${TITLEBAR}┌─$(my_ve)$(chroot)[$my_ps_user][$my_ps_host]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${_omb_prompt_cyan}\w${_omb_prompt_normal}]$(is_vim_shell) └─▪ " ;; esac