Skip to content

Commit d378581

Browse files
committed
Single_line_Solarized simplified
1 parent a3ea748 commit d378581

File tree

1 file changed

+17
-97
lines changed

1 file changed

+17
-97
lines changed

themes/Single_line_Solarized.bgptheme

+17-97
Original file line numberDiff line numberDiff line change
@@ -4,111 +4,31 @@
44
# without the indicator of the last command state
55
# tweaked for Ubuntu terminal fonts
66

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-
357
define_helpers() {
368
PathShort="${BoldBlue}\u:${Cyan}\W"
379
}
3810

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"
6513

66-
# Possible to change which command is used to create git status information
67-
# There are three options:
68-
# 1) gitstatus.sh (uses git status --branch --porcelain - fast, requires git > 1.7.10)
69-
# 2) gitstatus_pre-1.7.10.sh (Uses a variety of git commands and pipes - slower, works with older git clients)
70-
# 3) gitstatus.py (Unsupported, lack features found in the bash versions)
71-
if [[ -z ${GIT_PROMPT_STATUS_COMMAND} ]]; then GIT_PROMPT_STATUS_COMMAND="gitstatus.sh"; fi # Point out the command to get the git status from
7214

73-
# template for displaying the current virtual environment
74-
# use the placeholder _VIRTUALENV_ will be replaced with
75-
# the name of the current virtual environment (currently CONDA and VIRTUAL_ENV)
76-
if [[ -z ${GIT_PROMPT_VIRTUALENV} ]]; then GIT_PROMPT_VIRTUALENV="(${Blue}_VIRTUALENV_${ResetColor}) "; fi
15+
GIT_PROMPT_PREFIX="[ "
16+
GIT_PROMPT_SUFFIX=" ]"
17+
GIT_PROMPT_SEPARATOR=" |"
18+
GIT_PROMPT_STAGED=" ${Yellow}●${ResetColor}"
19+
GIT_PROMPT_CONFLICTS=" ${Red}✖ ${ResetColor}"
20+
GIT_PROMPT_CHANGED=" ${Blue}✚ ${ResetColor}"
21+
GIT_PROMPT_UNTRACKED=" ${Cyan}…${ResetColor}"
22+
GIT_PROMPT_STASHED=" ${BoldMagenta}⚑ ${ResetColor}"
23+
GIT_PROMPT_CLEAN=" ${Green}✔ ${ResetColor}"
7724

78-
# template for displaying the current remote tracking branch
79-
# use the placeholder _UPSTREAM_ will be replaced with
80-
# the name of the current remote tracking branch
81-
if [[ -z ${GIT_PROMPT_UPSTREAM} ]]; then GIT_PROMPT_UPSTREAM=" {${Blue}_UPSTREAM_${ResetColor}}"; fi
25+
GIT_PROMPT_COMMAND_FAIL="${Red}✘"
8226

83-
# _LAST_COMMAND_INDICATOR_ will be replaced by the appropriate GIT_PROMPT_COMMAND_OK OR GIT_PROMPT_COMMAND_FAIL
84-
if [[ -z ${GIT_PROMPT_START_USER} ]]; then GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${Yellow}${PathShort}${ResetColor}"; fi
27+
GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${Yellow}${PathShort}${ResetColor}"
28+
GIT_PROMPT_END_USER="${BoldBlue} ➭ ${ResetColor}"
29+
GIT_PROMPT_END_ROOT="${BoldRed} # "
8530

86-
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="✭"
10532
}
10633

107-
if [[ "${GIT_PROMPT_THEME}" == "Single_line_Solarized" && "${GIT_PROMPT_THEME_NAME}" != "Single_line_Solarized" ]]; then
108-
define_helpers
109-
define_undefined_git_prompt_colors
110-
fi
111-
112-
overide_git_prompt_colors() {
113-
GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING="✭"
114-
}
34+
reload_git_prompt_colors "Single_line_Solarized"

0 commit comments

Comments
 (0)