From 09b9f64a4b56680e7795902deb6a502a018ed49c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 7 May 2025 14:03:15 +0200 Subject: [PATCH] Update core.func --- misc/core.func | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/misc/core.func b/misc/core.func index 053a716..eb855c2 100644 --- a/misc/core.func +++ b/misc/core.func @@ -8,12 +8,14 @@ load_functions() { [[ -n "${__FUNCTIONS_LOADED:-}" ]] && return __FUNCTIONS_LOADED=1 color + formatting + icons + default_vars # add more } # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { - # Colors YW=$(echo "\033[33m") YWB=$(echo "\033[93m") BL=$(echo "\033[36m") @@ -21,14 +23,16 @@ color() { BGN=$(echo "\033[4;92m") GN=$(echo "\033[1;92m") DGN=$(echo "\033[32m") +} - # Formatting - CL=$(echo "\033[m") +formatting() { + BFR="\\r\\033[K" BOLD=$(echo "\033[1m") HOLD=" " TAB=" " +} - # Icons +icons() { CM="${TAB}✔️${TAB}" CROSS="${TAB}✖️${TAB}" INFO="${TAB}💡${TAB}${CL}" @@ -55,6 +59,13 @@ color() { ADVANCED="${TAB}🧩${TAB}${CL}" } +default_vars() { + # System + RETRY_NUM=10 + RETRY_EVERY=3 + i=$RETRY_NUM +} + # This function displays an informational message with logging support. declare -A MSG_INFO_SHOWN SPINNER_ACTIVE=0