Figlet and Toilet are terminal tools that make it fun and attractive by customising ASCII texts in terminal. let’s see how to use figlet and toilet together.
FIGlet: Figlet is Program for making large letters out of ordinary text.
Toilet: Toilet is a FIGlet-compatible display of large colourful characters in text mode.
Figlet offers different fonts style and and has control files but does not have Filters and a color option. While Toilet offers color and other Filter but does not offer enough font styles.
By installing both you can adapt some feature of Figlet as the Toilet is FIGlet-Compatible.
apt install figlet toilet
pkg i figlet toilet
figlet easymux
Figlet provides numbers of fonts that you can use with figlet -f FONT_NAME. Defaut font is standard.
figlist command lists all available fonts control files and their path.
showfigfonts command shows the figlet fonts with their look.
If you are using toilet tool and also you have installed figlet tool you can use these figlet fonts with toilet.
toilet -f bubble easymux.in
When the text is long the output would be overlap and doesn’t give perfect result. In this case you can use -w option to define width. You can use $COLUMNS variable to use terminal width with -w option.
echo easymux.in | figlet -w $COLUMNS
# toilet has inbuilt option for this -t
echo easymux.in | figlet -t
There are main two color formats in toilet –gay and –metal
metal and gay are two of some toilet filters that gets their own options –gay and –metal. Other filters can be used with option -F. See the list of filters.
toilet -F list
As toilet is FIGlet compatible you can use some of figlet features in toilet. Which features are they check using.
toilet -Ih
date '+%D%n%T'| toilet -f bubble -F border --metal
watch -ctn1 "date '+%D%n%T'| toilet -f bubble -F border --gay"