Clean bobby

pull/1790/head
BarbUk 2021-01-16 09:12:59 +01:00
parent 8691894175
commit eadd2685df
No known key found for this signature in database
GPG Key ID: DB301C759539E9FE
2 changed files with 21 additions and 20 deletions

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash # shellcheck shell=bash
SCM_THEME_PROMPT_DIRTY=" ${red}" SCM_THEME_PROMPT_DIRTY=" ${red}"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}" SCM_THEME_PROMPT_CLEAN=" ${bold_green}"
SCM_THEME_PROMPT_PREFIX=" |" SCM_THEME_PROMPT_PREFIX=" |"
@ -12,13 +13,13 @@ GIT_THEME_PROMPT_SUFFIX="${green}|"
CONDAENV_THEME_PROMPT_SUFFIX="|" CONDAENV_THEME_PROMPT_SUFFIX="|"
function prompt_command() { function prompt_command() {
PS1="\n${yellow}$(python_version_prompt) " # Name of virtual env followed by python version PS1="\n${yellow}$(python_version_prompt) " # Name of virtual env followed by python version
PS1+="${purple}\h " PS1+="${purple}\h "
PS1+="${reset_color}in " PS1+="${reset_color}in "
PS1+="${green}\w\n" PS1+="${green}\w\n"
PS1+="${bold_cyan}$(scm_char)" PS1+="${bold_cyan}$(scm_char)"
PS1+="${green}$(scm_prompt_info) " PS1+="${green}$(scm_prompt_info) "
PS1+="${green}${reset_color} " PS1+="${green}${reset_color} "
} }
safe_append_prompt_command prompt_command safe_append_prompt_command prompt_command

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash # shellcheck shell=bash
SCM_THEME_PROMPT_DIRTY=" ${red}" SCM_THEME_PROMPT_DIRTY=" ${red}"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}" SCM_THEME_PROMPT_CLEAN=" ${bold_green}"
@ -14,21 +14,21 @@ RVM_THEME_PROMPT_PREFIX="|"
RVM_THEME_PROMPT_SUFFIX="|" RVM_THEME_PROMPT_SUFFIX="|"
__bobby_clock() { __bobby_clock() {
printf "$(clock_prompt) " printf '%s' "$(clock_prompt) "
if [ "${THEME_SHOW_CLOCK_CHAR}" == "true" ]; then if [ "${THEME_SHOW_CLOCK_CHAR}" == "true" ]; then
printf "$(clock_char) " printf '%s' "$(clock_char) "
fi fi
} }
function prompt_command() { function prompt_command() {
PS1="\n$(battery_char) $(__bobby_clock)" PS1="\n$(battery_char) $(__bobby_clock)"
PS1+="${yellow}$(ruby_version_prompt) " PS1+="${yellow}$(ruby_version_prompt) "
PS1+="${purple}\h " PS1+="${purple}\h "
PS1+="${reset_color}in " PS1+="${reset_color}in "
PS1+="${green}\w\n" PS1+="${green}\w\n"
PS1+="${bold_cyan}$(scm_prompt_char_info) " PS1+="${bold_cyan}$(scm_prompt_char_info) "
PS1+="${green}${reset_color} " PS1+="${green}${reset_color} "
} }
THEME_SHOW_CLOCK_CHAR=${THEME_SHOW_CLOCK_CHAR:-"true"} THEME_SHOW_CLOCK_CHAR=${THEME_SHOW_CLOCK_CHAR:-"true"}