How to use the command 'unimatrix' (with examples)
The ‘unimatrix’ command allows you to simulate the Matrix look with Unicode characters. It provides a similar experience to the ‘cmatrix’ command, but with the ability to customize the output using Unicode characters. This article will explore different use cases of the ‘unimatrix’ command.
Use case 1: Mimic the default output of cmatrix (no unicode, works in a TTY)
Code:
unimatrix --no-bold --speed 96 --character-list o
Motivation: This use case is useful when you want to reproduce the default output of the ‘cmatrix’ command but with the added flexibility of being able to run it in a TTY (teletypewriter) environment.
Explanation:
--no-bold
: Disables bold characters, resulting in a similar output as the ‘cmatrix’ command.--speed 96
: Sets the scrolling speed to 96, controlling the rate at which the characters move across the screen.--character-list o
: Specifies the character set to use, in this case, the letter ‘o’. This produces a stream of ‘o’ characters as the output.
Example output:
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
Use case 2: No bold characters, slowly, with emojis, numbers, and a few symbols
Code:
unimatrix --no-bold --speed 50 --character-list ens
Motivation: This use case is suitable when you want to have a slower scrolling speed and a more visually diverse output by using emojis, numbers, and symbols.
Explanation:
--no-bold
: As before, disables bold characters.--speed 50
: Sets the scrolling speed to 50, resulting in a slower animation.--character-list ens
: Specifies the character set to use, combining letters ’e’, ’n’, and ’s’. This generates a mixture of emojis, numbers, and symbols as the output.
Example output:
⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡
Use case 3: Change the color of characters
Code:
unimatrix --color red
Motivation: This use case is helpful when you want to modify the color of the characters to give a different visual appearance to the output.
Explanation:
--color red
: Sets the color of the characters to red. Other colors such as green, blue, and white are also supported.
Example output:
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooo
Use case 4: Select character set(s) using letter codes
Code:
unimatrix --character-list character_sets
Motivation: This use case allows you to choose specific character sets to use in the output, providing different visual styles.
Explanation:
--character-list character_sets
: Specifies the character set to use. The ‘character_sets’ argument should be replaced with the desired letter codes. You can refer to theunimatrix --help
command for available character sets.
Example output:
...
Use case 5: Change the scrolling speed
Code:
unimatrix --speed number
Motivation: This use case allows you to adjust the scrolling speed of the characters, creating different effects and animations.
Explanation:
--speed number
: Sets the scrolling speed. The ’number’ parameter should be replaced with the desired integer value that represents the speed.
Example output:
...
Conclusion:
The ‘unimatrix’ command offers a versatile way to simulate the Matrix look using Unicode characters. With options to customize colors, character sets, and scrolling speed, you can create unique and visually striking displays. Whether you want to mimic the default output of ‘cmatrix’, add emojis and symbols, change colors, or experiment with different character sets, ‘unimatrix’ provides the flexibility to achieve your desired effect.