From b4df4b83c3a9104b58fe8cc7887f76e5da90f674 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 29 Jan 2023 21:05:29 +0100 Subject: [PATCH] armbian-next: logging: detect `TERM=alacritty` and use normal instead of gray --- lib/functions/logging/logging.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/functions/logging/logging.sh b/lib/functions/logging/logging.sh index c5dca6eafa..fba575b393 100644 --- a/lib/functions/logging/logging.sh +++ b/lib/functions/logging/logging.sh @@ -20,11 +20,18 @@ function logging_init() { declare -g bright_magenta_color="\e[1;35m" magenta_color="\e[0;35m" declare -g ansi_reset_color="\e[0m" declare -g -i logging_section_counter=0 # -i: integer - declare -g tool_color="${gray_color}" # default to gray... (should be ok on terminals, @TODO: I've seen it too dark on a few random screenshots though - if [[ "${CI}" == "true" ]]; then # ... but that is too dark for Github Actions + declare -g tool_color="${gray_color}" # default to gray... (should be ok on terminals) + + # @TODO: more terminals might have a bit... impaired... default themes. correct. + if [[ "${TERM}" == "alacritty" ]]; then + declare -g tool_color="${normal_color}" + fi + + if [[ "${CI}" == "true" ]]; then # ... but that is too dark for Github Actions declare -g tool_color="${normal_color}" declare -g SHOW_LOG="${SHOW_LOG:-"yes"}" # if in CI/GHA, default to showing log fi + if [[ "${ARMBIAN_RUNNING_IN_CONTAINER}" == "yes" ]]; then # if in container, add a cyan "whale emoji" to the left marker wrapped in dark gray brackets local container_emoji="🐳" # 🐳 or 🐋 declare -g left_marker="${gray_color}[${container_emoji}|${normal_color}"