How to use Figlet and Toilet together in Terminal?

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.

digital clock using watch figlet and toilet

What are Figlet and Toilet?

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.

Installation on Linux

apt install figlet toilet

installation on Termux

pkg i figlet toilet

Usage

figlet easymux
figlet command

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.

figlist command

showfigfonts command shows the figlet fonts with their look.

showfigfonts command
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

Control the overlap

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

Color effect in toilet

There are main two color formats in toilet –gay and –metal

toilet –gay and –metal options

Other Toilet Filters

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
toilet filters

Figlet options in toilet

As toilet is FIGlet compatible you can use some of figlet features in toilet. Which features are they check using.

toilet -Ih

How to use Figlet and Toilet together in terminal with other commands?

date '+%D%n%T'| toilet -f bubble -F border --metal

Create digital clock using watch Figlet and Toilet commands

watch -ctn1 "date '+%D%n%T'| toilet -f bubble -F border --gay"
digital clock using watch figlet and toilet

Discover more from Easymux

Subscribe now to keep reading and get access to the full archive.

Continue reading