simplified colorization output

This commit is contained in:
pyr0ball 2023-05-07 23:54:20 -07:00
parent a2aabfb78f
commit adf0fecbdb

View file

@ -2,7 +2,7 @@
# pyr0ball script functions library # pyr0ball script functions library
# Initial Vars # Initial Vars
functionsrev=1.1.11 functionsrev=1.1.12
#scriptname="${BASH_SOURCE[0]##*/}" #scriptname="${BASH_SOURCE[0]##*/}"
#rundir="${BASH_SOURCE[0]%/*}" #rundir="${BASH_SOURCE[0]%/*}"
#rundir_absolute=$(cd $rundir && pwd) #rundir_absolute=$(cd $rundir && pwd)
@ -41,33 +41,33 @@ borderchar="#" # Sets default '#' if not already set
# Colorization options # Colorization options
if [[ "$TERM" != "linux" ]] ; then if [[ "$TERM" != "linux" ]] ; then
red=$(echo -e "${ESC}[38;5;1m") # red red="${ESC}[38;5;1m" # red
grn=$(echo -e "${ESC}[38;5;2m") # green grn="${ESC}[38;5;2m" # green
ylw=$(echo -e "${ESC}[38;5;3m") # yellow ylw="${ESC}[38;5;3m" # yellow
blu=$(echo -e "${ESC}[38;5;27m") # blue blu="${ESC}[38;5;27m" # blue
lbl=$(echo -e "${ESC}[38;5;69m") # light blue lbl="${ESC}[38;5;69m" # light blue
mag=$(echo -e "${ESC}[38;5;5m") # magenta mag="${ESC}[38;5;5m" # magenta
cyn=$(echo -e "${ESC}[38;5;6m") # cyan cyn="${ESC}[38;5;6m" # cyan
pur=$(echo -e "${ESC}[38;5;135m") # purple pur="${ESC}[38;5;135m" # purple
ong=$(echo -e "${ESC}[38;5;166m") # orange ong="${ESC}[38;5;166m" # orange
lyl=$(echo -e "${ESC}[38;5;228m") # light yellow lyl="${ESC}[38;5;228m" # light yellow
lrd=$(echo -e "${ESC}[38;5;196m") # light red lrd="${ESC}[38;5;196m" # light red
gry=$(echo -e "${ESC}[38;5;240m") # Grey gry="${ESC}[38;5;240m" # Grey
norm=$(echo -e "${ESC}[39m") # default/normal norm=$"${ESC}[39m" # default/normal
# #
bld=$(echo -e "${ESC}[1m") # bold bld="${ESC}[1m" # bold
unb=$(echo -e "${ESC}[21m") # un-bold unb="${ESC}[21m" # un-bold
dim=$(echo -e "${ESC}[2m") # dim dim="${ESC}[2m" # dim
und=$(echo -e "${ESC}[22m") # un-dim und="${ESC}[22m" # un-dim
unl=$(echo -e "${ESC}[4m") # underline unl="${ESC}[4m" # underline
nln=$(echo -e "${ESC}[24") # not-underline nln="${ESC}[24" # not-underline
blk=$(echo -e "${ESC}[5") # blinking blk="${ESC}[5" # blinking
unbl=$(echo -e "${ESC}[25") # stop blinking unbl="${ESC}[25" # stop blinking
inv=$(echo -e "${ESC}[7m") # invert inv="${ESC}[7m" # invert
rsinv=$(echo -e "${ESC}[27") # reset http://www.endmemo.com/unicode/unicodeconverter.phpnvert rsinv="${ESC}[27" # reset http://www.endmemo.com/unicode/unicodeconverter.phpnvert
hid=$(echo -e "${ESC}[8") # hidden hid="${ESC}[8" # hidden
unh=$(echo -e "${ESC}[28") # unhide unh="${ESC}[28" # unhide
dfl=$(echo -e "${ESC}[0m") # restore default dfl="${ESC}[0m" # restore default
fi fi
# Extra Unicode Character Manipulation # Extra Unicode Character Manipulation