toilet 小工具
2023年12月31日...大约 1 分钟
toilet 是一个命令行工具,用于在终端上打印 ASCII 字符串。
遇到这种好看的Linux 提示词,你也想拥有,怎么办,来使用 toilet 命令,生成自己的个性提示词吧。
root@xiaoya:~# toilet -f standard "Hello World"
_ _ _ _ __ __ _ _
| | | | ___| | | ___ \ \ / /__ _ __| | __| |
| |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| '__| |/ _` |
| _ | __/ | | (_) | \ V V / (_) | | | | (_| |
|_| |_|\___|_|_|\___/ \_/\_/ \___/|_| |_|\__,_|
你可以使用 toilet -h
命令来查看可用的选项和参数。
root@xiaoya:~# toilet -h
-f, --font <name> select the font
-d, --directory <dir> specify font directory
-s, -S, -k, -W, -o render mode (default, force smushing,
kerning, full width, overlap)
-w, --width <width> set output width
-t, --termwidth adapt to terminal's width
-F, --filter <filters> apply one or several filters to the text
-F, --filter list list available filters
--gay rainbow filter (same as -F gay)
--metal metal filter (same as -F metal)
-E, --export <format> select export format
-E, --export list list available export formats
--irc output IRC colour codes (same as -E irc)
--html output an HTML document (same as -E html)
-h, --help display this help and exit
-I, --infocode <code> print FIGlet-compatible infocode
-v, --version output version information and exit
Usage: toilet [ -hkostvSW ] [ -d fontdirectory ]
[ -f fontfile ] [ -F filter ] [ -w outputwidth ]
[ -I infocode ] [ -E format ] [ message ]
你可以使用 toilet -f
选项来指定字体,例如 toilet -f standard "Hello World"
。
你可以使用 toilet -F
选项来指定样式,例如 toilet -F border "Hello World"
。
你可以使用 toilet -F list
选项来列出可用的字体和样式。
root@xiaoya:~# toilet -F list
Available filters:
"crop": crop unused blanks
"gay": add a rainbow colour effect
"metal": add a metallic colour effect
"flip": flip horizontally
"flop": flip vertically
"180": rotate 180 degrees
"left": rotate 90 degrees counterclockwise
"right": rotate 90 degrees clockwise
"border": surround text with a border
贡献者
change