Update core.func

This commit is contained in:
CanbiZ 2025-05-07 14:03:15 +02:00
parent 07efd7b172
commit 09b9f64a4b

View File

@ -8,12 +8,14 @@ load_functions() {
[[ -n "${__FUNCTIONS_LOADED:-}" ]] && return [[ -n "${__FUNCTIONS_LOADED:-}" ]] && return
__FUNCTIONS_LOADED=1 __FUNCTIONS_LOADED=1
color color
formatting
icons
default_vars
# add more # add more
} }
# This function sets various color variables using ANSI escape codes for formatting text in the terminal. # This function sets various color variables using ANSI escape codes for formatting text in the terminal.
color() { color() {
# Colors
YW=$(echo "\033[33m") YW=$(echo "\033[33m")
YWB=$(echo "\033[93m") YWB=$(echo "\033[93m")
BL=$(echo "\033[36m") BL=$(echo "\033[36m")
@ -21,14 +23,16 @@ color() {
BGN=$(echo "\033[4;92m") BGN=$(echo "\033[4;92m")
GN=$(echo "\033[1;92m") GN=$(echo "\033[1;92m")
DGN=$(echo "\033[32m") DGN=$(echo "\033[32m")
}
# Formatting formatting() {
CL=$(echo "\033[m") BFR="\\r\\033[K"
BOLD=$(echo "\033[1m") BOLD=$(echo "\033[1m")
HOLD=" " HOLD=" "
TAB=" " TAB=" "
}
# Icons icons() {
CM="${TAB}✔️${TAB}" CM="${TAB}✔️${TAB}"
CROSS="${TAB}✖️${TAB}" CROSS="${TAB}✖️${TAB}"
INFO="${TAB}💡${TAB}${CL}" INFO="${TAB}💡${TAB}${CL}"
@ -55,6 +59,13 @@ color() {
ADVANCED="${TAB}🧩${TAB}${CL}" 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. # This function displays an informational message with logging support.
declare -A MSG_INFO_SHOWN declare -A MSG_INFO_SHOWN
SPINNER_ACTIVE=0 SPINNER_ACTIVE=0