Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,12 @@ The color for elements related to a warning.
The color for elements that are not very important.


**JOLLY_COLOR_PATH_SHORT** *array<int> = (252 239 0 0 0 15)*
**JOLLY_COLOR_HOSTNAME** *array<int> = ( ${JOLLY_COLOR_LITE[@]} )*

The color for the hostname segment. By default initialized from JOLLY_COLOR_LITE.


**JOLLY_COLOR_PATH_SHORT** *array<int> = (252 239 0 0 0 7)*

The color of the shorten path marker.

Expand Down
17 changes: 10 additions & 7 deletions jolly.theme
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ _lp_jolly_theme_activate() {
JOLLY_COLOR_SEP_LITE=( ${JOLLY_COLOR_SEP_LITE[@]+"${JOLLY_COLOR_SEP_LITE[@]}"} )
[[ ${#JOLLY_COLOR_SEP_LITE[@]} == 0 ]] && JOLLY_COLOR_SEP_LITE=( 15 -2 0 0 15 -2)

JOLLY_COLOR_HOSTNAME=( ${JOLLY_COLOR_HOSTNAME[@]+"${JOLLY_COLOR_HOSTNAME[@]}"} )
[[ ${#JOLLY_COLOR_HOSTNAME[@]} == 0 ]] && JOLLY_COLOR_HOSTNAME=( ${JOLLY_COLOR_LITE[@]} )

# Default line color for unset variables.
LP_COLOR_ENV_VARS_UNSET=${LP_COLOR_ENV_VARS_UNSET:-""}
# Use the background of notes as a foreground for set variables.
Expand Down Expand Up @@ -197,7 +200,7 @@ _lp_jolly_theme_activate() {


_lp_jolly_theme_directory() {
lp_terminal_format ${JOLLY_COLOR_LITE[@]+"${JOLLY_COLOR_LITE[@]}"}
lp_terminal_format ${JOLLY_COLOR_HOSTNAME[@]+"${JOLLY_COLOR_HOSTNAME[@]}"}
__jolly_directory_FS
__jolly_directory_path
}
Expand Down Expand Up @@ -880,10 +883,10 @@ __jolly_activate_hostname() {
hostname="${JOLLY_HOST_LOCAL}"
fi

if __jolly_make_field "$hostname" ${JOLLY_COLOR_LITE[@]+"${JOLLY_COLOR_LITE[@]}"} ; then
if __jolly_make_field "$hostname" ${JOLLY_COLOR_HOSTNAME[@]+"${JOLLY_COLOR_HOSTNAME[@]}"} ; then
_JOLLY_HOSTNAME="${jolly_field}"
else
if __jolly_make_field "$lp_hostname" ${JOLLY_COLOR_LITE[@]+"${JOLLY_COLOR_LITE[@]}"} ; then
if __jolly_make_field "$lp_hostname" ${JOLLY_COLOR_HOSTNAME[@]+"${JOLLY_COLOR_HOSTNAME[@]}"} ; then
_JOLLY_HOSTNAME="${jolly_field}"
else
_JOLLY_HOSTNAME="${lp_hostname}"
Expand All @@ -897,20 +900,20 @@ __jolly_activate_multiplexer() {
if _lp_multiplexer ; then
case "$lp_multiplexer" in
tmux)
__jolly_make_sep_link ${JOLLY_COLOR_LITE[@]+"${JOLLY_COLOR_LITE[@]}"}
__jolly_make_sep_link ${JOLLY_COLOR_HOSTNAME[@]+"${JOLLY_COLOR_HOSTNAME[@]}"}
multiplexer="${jolly_sep}"
;;
screen)
__jolly_make_sep_link ${JOLLY_COLOR_LITE[@]+"${JOLLY_COLOR_LITE[@]}"}
__jolly_make_sep_link ${JOLLY_COLOR_HOSTNAME[@]+"${JOLLY_COLOR_HOSTNAME[@]}"}
multiplexer="${jolly_sep}"
;;
*)
__jolly_make_sep_link ${JOLLY_COLOR_LITE[@]+"${JOLLY_COLOR_LITE[@]}"}
__jolly_make_sep_link ${JOLLY_COLOR_HOSTNAME[@]+"${JOLLY_COLOR_HOSTNAME[@]}"}
multiplexer="${jolly_sep}"
;;
esac
else
__jolly_make_sep_plug ${JOLLY_COLOR_LITE[@]+"${JOLLY_COLOR_LITE[@]}"}
__jolly_make_sep_plug ${JOLLY_COLOR_HOSTNAME[@]+"${JOLLY_COLOR_HOSTNAME[@]}"}
multiplexer="${jolly_sep}"
fi

Expand Down