bash-it/themes/bobby/bobby.theme.bash

60 lines
1.8 KiB
Bash

# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.
SCM_THEME_PROMPT_DIRTY=" ${red?}"
SCM_THEME_PROMPT_CLEAN=" ${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_PREFIX=" ${green?}|"
GIT_THEME_PROMPT_SUFFIX="${green?}|"
RVM_THEME_PROMPT_PREFIX="|"
RVM_THEME_PROMPT_SUFFIX="|"
function __bobby_clock()
{
############ STACK_TRACE_BUILDER #####################
Function_Name="${FUNCNAME[0]}"
Function_PATH="${Function_PATH}/${Function_Name}"
######################################################
printf '%s' "$(clock_prompt) "
if [[ "${THEME_SHOW_CLOCK_CHAR:-}" == "true" ]]
then
printf '%s' "$(clock_char) "
fi
############### Stack_TRACE_BUILDER ################
Function_PATH="$( dirname ${Function_PATH} )"
####################################################
}
function prompt_command()
{
############ STACK_TRACE_BUILDER #####################
Function_Name="${FUNCNAME[0]}"
Function_PATH="${Function_PATH}/${Function_Name}"
######################################################
PS1="\n$(battery_char) $(__bobby_clock)"
PS1+="${yellow?}$(ruby_version_prompt) "
PS1+="${purple?}\h "
PS1+="${reset_color?}in "
PS1+="${green?}\w\n"
PS1+="${bold_cyan?}$(scm_prompt_char_info) "
PS1+="${green?}${reset_color?} "
############### Stack_TRACE_BUILDER ################
Function_PATH="$( dirname ${Function_PATH} )"
####################################################
}
: "${THEME_SHOW_CLOCK_CHAR:="true"}"
: "${THEME_CLOCK_CHAR_COLOR:=${red?}}"
: "${THEME_CLOCK_COLOR:=${bold_cyan?}}"
: "${THEME_CLOCK_FORMAT:="%Y-%m-%d %H:%M:%S"}"
safe_append_prompt_command prompt_command