|
|
@@ -3,16 +3,16 @@ _CC() { |
|
|
|
local f="39" |
|
|
|
local b="49" |
|
|
|
local s="0" |
|
|
|
if [ "$1" ]; then |
|
|
|
f="${1}" |
|
|
|
fi |
|
|
|
if [ "$2" ]; then |
|
|
|
b="${2}" |
|
|
|
fi |
|
|
|
if [ "$3" ]; then |
|
|
|
s="${3}" |
|
|
|
fi |
|
|
|
echo -n "\[\e[${s};${f};${b}m\]" |
|
|
|
if [ "$1" ]; then |
|
|
|
f="${1}" |
|
|
|
fi |
|
|
|
if [ "$2" ]; then |
|
|
|
b="${2}" |
|
|
|
fi |
|
|
|
if [ "$3" ]; then |
|
|
|
s="${3}" |
|
|
|
fi |
|
|
|
echo "\[\e[${s};${b};${f}m\]" |
|
|
|
} |
|
|
|
|
|
|
|
_CFG() { |
|
|
@@ -20,7 +20,66 @@ _CFG() { |
|
|
|
if [ "$1" ]; then |
|
|
|
f="${1}" |
|
|
|
fi |
|
|
|
echo -n "\[\e[${f}m\]" |
|
|
|
echo "\[\e[${f}m\]" |
|
|
|
} |
|
|
|
|
|
|
|
_CBG2FG() { |
|
|
|
case "$1" in |
|
|
|
$BG_DEFAULT) |
|
|
|
echo $DEFAULT |
|
|
|
;; |
|
|
|
$BG_BLACK) |
|
|
|
echo $BLACK |
|
|
|
;; |
|
|
|
$BG_RED) |
|
|
|
echo $RED |
|
|
|
;; |
|
|
|
$BG_GREEN) |
|
|
|
echo $GREEN |
|
|
|
;; |
|
|
|
$BG_YELLOW) |
|
|
|
echo $YELLOW |
|
|
|
;; |
|
|
|
$BG_BLUE) |
|
|
|
echo $BLUE |
|
|
|
;; |
|
|
|
$BG_PURPLE) |
|
|
|
echo $PURPLE |
|
|
|
;; |
|
|
|
$BG_CYAN) |
|
|
|
echo $CYAN |
|
|
|
;; |
|
|
|
$BG_GREY) |
|
|
|
echo $GREY |
|
|
|
;; |
|
|
|
$BG_DGREY) |
|
|
|
echo $DGREY |
|
|
|
;; |
|
|
|
$BG_LRED) |
|
|
|
echo $LRED |
|
|
|
;; |
|
|
|
$BG_LGREEN) |
|
|
|
echo $LGREEN |
|
|
|
;; |
|
|
|
$BG_LYELLOW) |
|
|
|
echo $LYELLOW |
|
|
|
;; |
|
|
|
$BG_LBLUE) |
|
|
|
echo $LBLUE |
|
|
|
;; |
|
|
|
$BG_LPURPLE) |
|
|
|
echo $LPURPLE |
|
|
|
;; |
|
|
|
$BG_LCYAN) |
|
|
|
echo $LCYAN |
|
|
|
;; |
|
|
|
$BG_WHITE) |
|
|
|
echo $WHITE |
|
|
|
;; |
|
|
|
*) |
|
|
|
echo $1 |
|
|
|
;; |
|
|
|
esac |
|
|
|
} |
|
|
|
|
|
|
|
DEFAULT='39' |
|
|
@@ -59,5 +118,6 @@ BG_LPURPLE='105' |
|
|
|
BG_LCYAN='106' |
|
|
|
BG_WHITE='107' |
|
|
|
|
|
|
|
NORMAL="\[\033[0m\]" |
|
|
|
#NORMAL="\[\033[0m\]" |
|
|
|
NORMAL="\[\e[0m\]" |
|
|
|
CLEAR=$(_CFG $DEFAULT) |