I'm Creating a Login Screen when I start my CLI Arch Linux and I build a script on the file
/etc/bash.bashrc
Like as it follows below:
#COMMANDS CREATED INSIDE /ETC/BASH.BASHRC FILE
# USING ANSI COLORS
RED="\e[31m"
ORANGE="\e[33m"
BLUE="\e[94m"
GREEN="\e[92m"
STOP="\e[0m"
# LOGIN SCREEN MESSAGE
screenfetch
printf "${GREEN}"
printf "=================================\n"
printf "${ORANGE}"
figlet -w 200 -f standard "F4NT0 ARCH LINUX"
printf "${BLUE}"
figlet -w 200 -f small "CLI Operational System"
printf "${GREEN}"
printf "=================================\n"
printf "${STOP}"
In the code above, I build the variables who calls the colors and I let "leak" on the messages created with the figlet program using the printf.
This way I can color the messages until the last variable call(the message below stay with the color i call in the variable above), when I call the next variable,the code change the color from the next message and so on until the STOP variable who stop the leaking of the colors.
I like how it works in my Arch, but programable way I find it "dirty"...
There is a way to add colors(ANSI,tput or others) in the figlet command to become more adequate to add colors inside Scripts in Unix/Linux?