You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: themes/Single_line_Solarized.bgptheme
+17-97
Original file line number
Diff line number
Diff line change
@@ -4,111 +4,31 @@
4
4
# without the indicator of the last command state
5
5
# tweaked for Ubuntu terminal fonts
6
6
7
-
unset_git_prompt_colors() {
8
-
unset Time12a
9
-
unset PathShort
10
-
unset GIT_PROMPT_PREFIX
11
-
unset GIT_PROMPT_SUFFIX
12
-
unset GIT_PROMPT_SEPARATOR
13
-
unset GIT_PROMPT_BRANCH
14
-
unset GIT_PROMPT_STAGED
15
-
unset GIT_PROMPT_CONFLICTS
16
-
unset GIT_PROMPT_CHANGED
17
-
unset GIT_PROMPT_REMOTE
18
-
unset GIT_PROMPT_UNTRACKED
19
-
unset GIT_PROMPT_STASHED
20
-
unset GIT_PROMPT_CLEAN
21
-
unset GIT_PROMPT_COMMAND_OK
22
-
unset GIT_PROMPT_COMMAND_FAIL
23
-
unset GIT_PROMPT_VIRTUALENV
24
-
unset GIT_PROMPT_UPSTREAM
25
-
unset GIT_PROMPT_START_USER
26
-
unset GIT_PROMPT_START_ROOT
27
-
unset GIT_PROMPT_END_USER
28
-
unset GIT_PROMPT_END_ROOT
29
-
unset GIT_PROMPT_SYMBOLS_AHEAD
30
-
unset GIT_PROMPT_SYMBOLS_BEHIND
31
-
unset GIT_PROMPT_SYMBOLS_PREHASH
32
-
unset GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING
33
-
}
34
-
35
7
define_helpers() {
36
8
PathShort="${BoldBlue}\u:${Cyan}\W"
37
9
}
38
10
39
-
define_undefined_git_prompt_colors() {
40
-
if [[ -z ${GIT_PROMPT_THEME_NAME} ]]; then GIT_PROMPT_THEME_NAME="Single_line_Solarized"; fi
41
-
42
-
# These are the color definitions used by gitprompt.sh
43
-
if [[ -z ${GIT_PROMPT_PREFIX} ]]; then GIT_PROMPT_PREFIX="[ "; fi # start of the git info string
44
-
if [[ -z ${GIT_PROMPT_SUFFIX} ]]; then GIT_PROMPT_SUFFIX=" ]"; fi # the end of the git info string
45
-
if [[ -z ${GIT_PROMPT_SEPARATOR} ]]; then GIT_PROMPT_SEPARATOR=" |"; fi # separates each item
46
-
47
-
if [[ -z ${GIT_PROMPT_BRANCH} ]]; then GIT_PROMPT_BRANCH="${Magenta}"; fi # the git branch that is active in the current directory
48
-
if [[ -z ${GIT_PROMPT_STAGED} ]]; then GIT_PROMPT_STAGED=" ${Yellow}●${ResetColor}"; fi # the number of staged files/directories
49
-
if [[ -z ${GIT_PROMPT_CONFLICTS} ]]; then GIT_PROMPT_CONFLICTS=" ${Red}✖ ${ResetColor}"; fi # the number of files in conflict
50
-
if [[ -z ${GIT_PROMPT_CHANGED} ]]; then GIT_PROMPT_CHANGED=" ${Blue}✚ ${ResetColor}"; fi # the number of changed files
51
-
52
-
if [[ -z ${GIT_PROMPT_REMOTE} ]]; then GIT_PROMPT_REMOTE=" "; fi # the remote branch name (if any) and the symbols for ahead and behind
53
-
if [[ -z ${GIT_PROMPT_UNTRACKED} ]]; then GIT_PROMPT_UNTRACKED=" ${Cyan}…${ResetColor}"; fi # the number of untracked files/dirs
54
-
if [[ -z ${GIT_PROMPT_STASHED} ]]; then GIT_PROMPT_STASHED=" ${BoldMagenta}⚑ ${ResetColor}"; fi # the number of stashed files/dir
55
-
if [[ -z ${GIT_PROMPT_CLEAN} ]]; then GIT_PROMPT_CLEAN=" ${Green}✔ ${ResetColor}"; fi # a colored flag indicating a "clean" repo
56
-
57
-
# For the command indicator, the placeholder _LAST_COMMAND_STATE_
58
-
# will be replaced with the exit code of the last command
59
-
# e.g.
60
-
# GIT_PROMPT_COMMAND_OK="${Green}✔-_LAST_COMMAND_STATE_ " # indicator if the last command returned with an exit code of 0
61
-
# GIT_PROMPT_COMMAND_FAIL="${Red}✘-_LAST_COMMAND_STATE_ " # indicator if the last command returned with an exit code of other than 0
62
-
63
-
if [[ -z ${GIT_PROMPT_COMMAND_OK} ]]; then GIT_PROMPT_COMMAND_OK="${Green}✔"; fi # indicator if the last command returned with an exit code of 0
64
-
if [[ -z ${GIT_PROMPT_COMMAND_FAIL} ]]; then GIT_PROMPT_COMMAND_FAIL="${Red}✘"; fi # indicator if the last command returned with an exit code of other than 0
11
+
override_git_prompt_colors() {
12
+
GIT_PROMPT_THEME_NAME="Single_line_Solarized"
65
13
66
-
# Possible to change which command is used to create git status information
if [[ -z ${GIT_PROMPT_START_ROOT} ]]; then GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}"; fi
87
-
if [[ -z ${GIT_PROMPT_END_USER} ]]; then GIT_PROMPT_END_USER="${BoldBlue} ➭ ${ResetColor}"; fi # Reset color for user
88
-
if [[ -z ${GIT_PROMPT_END_ROOT} ]]; then GIT_PROMPT_END_ROOT="${BoldRed} # "; fi # Bright red for Root
89
-
90
-
# Please do not add colors to these symbols
91
-
if [[ -z ${GIT_PROMPT_SYMBOLS_AHEAD} ]]; then GIT_PROMPT_SYMBOLS_AHEAD="↑·"; fi # The symbol for "n versions ahead of origin"
92
-
if [[ -z ${GIT_PROMPT_SYMBOLS_BEHIND} ]]; then GIT_PROMPT_SYMBOLS_BEHIND="↓·"; fi # The symbol for "n versions behind of origin"
93
-
if [[ -z ${GIT_PROMPT_SYMBOLS_PREHASH} ]]; then GIT_PROMPT_SYMBOLS_PREHASH=":"; fi # Written before hash of commit, if no name could be found
94
-
if [[ -z ${GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING} ]]; then GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING="✭"; fi # This symbol is written after the branch, if the branch is not tracked
95
-
}
96
-
97
-
# call only from theme file
98
-
reload_git_prompt_colors() {
99
-
if [[ "${GIT_PROMPT_THEME_NAME}" != $1 ]]; then
100
-
unset_git_prompt_colors
101
-
define_helpers
102
-
override_git_prompt_colors
103
-
define_undefined_git_prompt_colors
104
-
fi
31
+
GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING="✭"
105
32
}
106
33
107
-
if [[ "${GIT_PROMPT_THEME}" == "Single_line_Solarized" && "${GIT_PROMPT_THEME_NAME}" != "Single_line_Solarized" ]]; then
0 commit comments