refactor prompt colors for improved visibility

Updated color definitions in bashrc and gitstatus-custom.sh
to enhance clarity of the prompt display, using bright white
for branch names and modified/untracked statuses.
This commit is contained in:
Ray Elliott 2025-09-30 20:28:56 +01:00
parent 37dce8fa0b
commit 67b2f6ed25
2 changed files with 4 additions and 5 deletions

1
bashrc
View File

@ -15,7 +15,6 @@ _NC='\033[0m' # Get the current day of the week, day of the month, and year
*) day_suffix="th";;
esac
# Determine the color based on the classification # No Color / Reset
_RED='\033[0;31m' # Red
_GREEN='\033[01;32m' # Bright Green
_YELLOW='\033[0;33m' # Yellow

View File

@ -13,7 +13,7 @@ function my_gitstatus_prompt_update() {
[[ "$VCS_STATUS_RESULT" == ok-sync ]] || return 0 # not a git repo
local reset=$'\001\e[0m\002' # no color
local green=$'\001\e[38;5;076m\002' # green - clean branch name only
local bright_white=$'\001\e[1;37m\002' # bright white - branch name and modified/untracked
local red=$'\001\e[38;5;196m\002' # red - urgent attention (conflicts, merge)
local p
@ -32,7 +32,7 @@ function my_gitstatus_prompt_update() {
# Truncate long branch names and tags
(( ${#where} > 32 )) && where="${where:0:12}${where: -12}"
p+="${green}${where}"
p+="${bright_white}${where}"
# Remote tracking status (no color - less distracting)
(( VCS_STATUS_COMMITS_BEHIND )) && p+=" ${reset}behind:${VCS_STATUS_COMMITS_BEHIND}"
@ -51,8 +51,8 @@ function my_gitstatus_prompt_update() {
[[ -n "$VCS_STATUS_ACTION" ]] && p+=" ${red}${VCS_STATUS_ACTION}"
(( VCS_STATUS_NUM_CONFLICTED )) && p+=" ${red}conflicts:${VCS_STATUS_NUM_CONFLICTED}"
(( VCS_STATUS_NUM_STAGED )) && p+=" ${reset}staged:${VCS_STATUS_NUM_STAGED}"
(( VCS_STATUS_NUM_UNSTAGED )) && p+=" ${reset}modified:${VCS_STATUS_NUM_UNSTAGED}"
(( VCS_STATUS_NUM_UNTRACKED )) && p+=" ${reset}untracked:${VCS_STATUS_NUM_UNTRACKED}"
(( VCS_STATUS_NUM_UNSTAGED )) && p+=" ${bright_white}modified:${VCS_STATUS_NUM_UNSTAGED}"
(( VCS_STATUS_NUM_UNTRACKED )) && p+=" ${bright_white}untracked:${VCS_STATUS_NUM_UNTRACKED}"
GITSTATUS_PROMPT="${p}${reset}"
}