-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
Copy pathbobby.theme.bash
40 lines (32 loc) · 1.06 KB
/
bobby.theme.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# 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() {
printf '%s' "$(clock_prompt) "
if [[ "${THEME_SHOW_CLOCK_CHAR:-}" == "true" ]]; then
printf '%s' "$(clock_char) "
fi
}
function prompt_command() {
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?} "
}
: "${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