Skip to content

Commit 0c7e946

Browse files
authored
Merge pull request #133 from diogocavilha/feat/human-dracula-color-scheme
✨ Add human dracula color scheme
2 parents 1730a29 + 0d4ba3d commit 0c7e946

File tree

6 files changed

+53
-2
lines changed

6 files changed

+53
-2
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
> Any trouble, please visit the [troubleshooting page](https://github.com/diogocavilha/fancy-git/blob/master/TROUBLESHOOTING.md)
44
5+
## v7.5.0
6+
- Add `fancygit --color-scheme-human-dracula` command to select the color scheme human dracula. (Available for theme-human).
7+
8+
## v7.4.0
9+
- Add `fancygit --enable-host-name` command to show host name on prompt.
10+
- Add `fancygit --disable-host-name` command to hide host name on prompt.
11+
- Add `fancygit --enable-user-symbol` command to show user symbol on prompt (human theme).
12+
- Add `fancygit --disable-user-symbol` command to hide user symbol on prompt (human theme).
13+
514
## v7.3.0
615
- Add `fancygit --enable-bold-prompt` command to show prompt in bold font.
716
- Add `fancygit --disable-bold-prompt` command to show prompt in regular font.

color_schemes/human_dracula

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Use color values in the range [0-255] for 256 bit colors.
2+
# Themes will handle the color values properly.
3+
# You can check how that works here: https://misc.flogisoft.com/bash/tip_colors_and_formatting
4+
5+
# Blank variables are not used. They are assigned to blank because when we switch
6+
# between themes all colors must be reset.
7+
8+
# TIME
9+
FANCYGIT_COLOR_SCHEME_TIME_BACKGROUND=""
10+
FANCYGIT_COLOR_SCHEME_TIME_FOREGROUND="201"
11+
12+
# USER AT HOST
13+
FANCYGIT_COLOR_SCHEME_USER_AT_HOST_BACKGROUND=""
14+
FANCYGIT_COLOR_SCHEME_USER_FOREGROUND="221"
15+
FANCYGIT_COLOR_SCHEME_AT_FOREGROUND="250"
16+
FANCYGIT_COLOR_SCHEME_HOST_FOREGROUND="177"
17+
18+
# USER SYMBOL
19+
FANCYGIT_COLOR_SCHEME_USER_SYMBOL_BACKGROUND=""
20+
FANCYGIT_COLOR_SCHEME_USER_SYMBOL_FOREGROUND="231"
21+
22+
# PATH
23+
FANCYGIT_COLOR_SCHEME_WORKDIR_BACKGROUND=""
24+
FANCYGIT_COLOR_SCHEME_WORKDIR_FOREGROUND="81"
25+
26+
# BRANCH
27+
FANCYGIT_COLOR_SCHEME_BRANCH_BACKGROUND=""
28+
FANCYGIT_COLOR_SCHEME_BRANCH_FOREROUND="190"
29+
30+
# BRANCH WITH STAGED FILES
31+
FANCYGIT_COLOR_SCHEME_BRANCH_STAGED_FILES_BACKGROUND=""
32+
FANCYGIT_COLOR_SCHEME_BRANCH_STAGED_FILES_FOREGROUND="220"
33+
34+
# BRANCH WITH CHANGED FILES
35+
FANCYGIT_COLOR_SCHEME_BRANCH_CHANGED_FILES_BACKGROUND=""
36+
FANCYGIT_COLOR_SCHEME_BRANCH_CHANGED_FILES_FOREGROUND="202"
37+
38+
FANCYGIT_COLOR_SCHEME_PREPOSITION_FOREGROUND="250"

commands-handler.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ case "$1" in
6868
# Color schemes.
6969
"--color-scheme-simple") fancygit_theme_color_scheme_set "simple_simple";;
7070
"--color-scheme-human") fancygit_theme_color_scheme_set "human_human";;
71+
"--color-scheme-human-dracula") fancygit_theme_color_scheme_set "human_dracula";;
7172
"--color-scheme-default") fancygit_theme_color_scheme_set "default_default";;
7273
"--color-scheme-dracula") fancygit_theme_color_scheme_set "default_dracula";;
7374
"--color-scheme-batman") fancygit_theme_color_scheme_set "default_batman";;

fancygit-completion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ _fancygit() {
4848
--theme-simple \
4949
--color-scheme-simple \
5050
--color-scheme-human \
51+
--color-scheme-human-dracula \
5152
--color-scheme-default \
5253
--color-scheme-dracula \
5354
--color-scheme-batman \

help.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ THEME COMMANDS:
4646
COLOR SCHEME COMMANDS:
4747
fancygit --color-scheme-simple Available for theme-simple.
4848
fancygit --color-scheme-human Available for theme-human.
49+
fancygit --color-scheme-human-dracula Available for theme-human.
4950
fancygit --color-scheme-default Available for theme-default.
5051
fancygit --color-scheme-dracula Available for theme-default.
5152
fancygit --color-scheme-batman Available for theme-default.

themes/human.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ fancygit_theme_builder() {
2727
local user_color_font_tag="\\[\\e[38;5;${FANCYGIT_COLOR_SCHEME_USER_FOREGROUND}m\\]"
2828
local host_color_font_tag="\\[\\e[38;5;${FANCYGIT_COLOR_SCHEME_HOST_FOREGROUND}m\\]"
2929
local at_color_font_tag="\\[\\e[38;5;${FANCYGIT_COLOR_SCHEME_AT_FOREGROUND}m\\]"
30+
local preposition_color="\\[\\e[38;5;${FANCYGIT_COLOR_SCHEME_PREPOSITION_FOREGROUND}m\\]"
3031
local user_symbol_color_font_tag="\\[\\e[38;5;${FANCYGIT_COLOR_SCHEME_USER_SYMBOL_FOREGROUND}m\\]"
3132
local workdir_color_font_tag="\\[\\e[38;5;${FANCYGIT_COLOR_SCHEME_WORKDIR_FOREGROUND}m\\]"
3233
local branch_color_staged_files_font_tag="\\[\\e[38;5;${FANCYGIT_COLOR_SCHEME_BRANCH_STAGED_FILES_FOREGROUND}m\\]"
@@ -113,7 +114,7 @@ fancygit_theme_builder() {
113114

114115
if fancygit_config_is "show_host_prompt" "false"
115116
then
116-
prompt_user_at_host="${user}${user_name}${color_reset} in "
117+
prompt_user_at_host="${user}${user_name}${color_reset}${preposition_color} in "
117118
fi
118119

119120
if fancygit_config_is "bold_prompt" "true"
@@ -134,7 +135,7 @@ fancygit_theme_builder() {
134135
then
135136
prompt_path="${path_git}${path_sign}${path_end}"
136137
prompt_branch="${branch}${branch_name}${branch_end}"
137-
PS1="${prompt_time}${prompt_user_at_host}${prompt_path}${venv_name} on ${prompt_branch} $(fancygit_get_notification_area "$is_rich_notification")"
138+
PS1="${prompt_time}${prompt_user_at_host}${prompt_path}${venv_name}${preposition_color} on ${prompt_branch} $(fancygit_get_notification_area "$is_rich_notification")"
138139
PS1="${bold_prompt}${PS1}${prompt_symbol}${is_double_line}${normal_prompt} "
139140
return
140141
fi

0 commit comments

Comments
 (0)