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
__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