mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2025-12-06 11:50:38 +01:00
Removes standout logic (no longer used)
This commit is contained in:
@@ -208,9 +208,7 @@ prompt_segment() {
|
|||||||
local bg fg
|
local bg fg
|
||||||
[[ -n $1 ]] && bg="%K{$1}" || bg="%k"
|
[[ -n $1 ]] && bg="%K{$1}" || bg="%k"
|
||||||
[[ -n $2 ]] && fg="%F{$2}" || fg="%f"
|
[[ -n $2 ]] && fg="%F{$2}" || fg="%f"
|
||||||
if [[ $CURRENT_BG != 'NONE' && $CURRENT_BG == 'standout' ]]; then
|
if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
|
||||||
echo -n "%{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
|
|
||||||
elif [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
|
|
||||||
echo -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
|
echo -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
|
||||||
else
|
else
|
||||||
echo -n "%{$bg%}%{$fg%} "
|
echo -n "%{$bg%}%{$fg%} "
|
||||||
@@ -219,14 +217,6 @@ prompt_segment() {
|
|||||||
[[ -n $3 ]] && echo -n $3
|
[[ -n $3 ]] && echo -n $3
|
||||||
}
|
}
|
||||||
|
|
||||||
# Begins and ends an standout segment
|
|
||||||
# A standout segment is one with the background and foreground colors inverted
|
|
||||||
# Standout segment is only possible as the first segment
|
|
||||||
prompt_standout_segment() {
|
|
||||||
CURRENT_BG="standout"
|
|
||||||
echo -n "%S "$1" %s"
|
|
||||||
}
|
|
||||||
|
|
||||||
# End the prompt, closing any open segments
|
# End the prompt, closing any open segments
|
||||||
prompt_end() {
|
prompt_end() {
|
||||||
if [[ -n $CURRENT_BG ]]; then
|
if [[ -n $CURRENT_BG ]]; then
|
||||||
@@ -369,11 +359,7 @@ prompt_time() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $BULLETTRAIN_TIME_BG == '' && $BULLETTRAIN_TIME_FG == '' ]] then
|
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%H:%M:%S}
|
||||||
prompt_standout_segment %D{%H:%M:%S}
|
|
||||||
else
|
|
||||||
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%H:%M:%S}
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Status:
|
# Status:
|
||||||
|
|||||||
Reference in New Issue
Block a user