seperate clock_char function
parent
01dab32683
commit
7d901b11b6
|
|
@ -16,7 +16,8 @@ SCM_THEME_BRANCH_GONE_PREFIX=' ⇢ '
|
|||
SCM_THEME_CURRENT_USER_PREFFIX=' ☺︎ '
|
||||
SCM_THEME_CURRENT_USER_SUFFIX=''
|
||||
|
||||
CLOCK_CHAR='☆'
|
||||
CLOCK_CHAR='⌚'
|
||||
THEME_CLOCK_CHAR_COLOR=${THEME_CLOCK_CHAR_COLOR:="${red}"}
|
||||
THEME_SHOW_CLOCK=${THEME_CLOCK_CHECK:-true}
|
||||
THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:="%Y-%m-%d %H:%M:%S"}
|
||||
THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:="${bold_cyan}"}
|
||||
|
|
@ -373,10 +374,14 @@ function prompt_char {
|
|||
scm_char
|
||||
}
|
||||
|
||||
function clock_char {
|
||||
echo -e "${THEME_CLOCK_CHAR_COLOR}$CLOCK_CHAR"
|
||||
}
|
||||
|
||||
function clock_prompt {
|
||||
if [[ "${THEME_SHOW_CLOCK}" = true ]]; then
|
||||
DATE_STRING=$(date +"${THEME_CLOCK_FORMAT}")
|
||||
echo -e "${THEME_CLOCK_COLOR}$DATE_STRING ${red}$CLOCK_CHAR"
|
||||
echo -e "${THEME_CLOCK_COLOR}$DATE_STRING"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ RVM_THEME_PROMPT_SUFFIX="|"
|
|||
|
||||
function prompt_command() {
|
||||
#PS1="${bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(ruby_version_prompt) ${yellow}\h ${reset_color}in ${green}\w ${reset_color}\n${green}→${reset_color} "
|
||||
PS1="\n$(battery_char) $(clock_prompt) ${yellow}$(ruby_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} "
|
||||
PS1="\n$(battery_char) $(clock_prompt) $(clock_char) ${yellow}$(ruby_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} "
|
||||
}
|
||||
|
||||
safe_append_prompt_command prompt_command
|
||||
|
|
|
|||
Loading…
Reference in New Issue