chaftrix
This program written in C will render the matrix effect in the terminal window in the background, while rendering an image in the foreground, allowing animation of this image in one or two dimensions.
Summary
| Latest Version | Unknown |
|---|---|
| License | Unknown |
| CI Status | Failing |
| Stars | 7 |
| Forks | 0 |
| Open Issues | 0 |
| Last Commit | 2024-11-05 |
| Downloads | 0 |
| Last Indexed | 2026-09-06 06:05 |
Tags
Installation
nimble install chaftrix
choosenim install chaftrix
git clone https://gitlab.com/christosangel/chaftrix
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| chaftrix | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://gitlab.com/christosangel/chaftrix |
|---|---|
| Homepage | https://gitlab.com/christosangel/chaftrix |
| Registry Source | gitlab |
README
chaftrix
This program written in C will render the matrix effect in the terminal window in the background, while rendering an image in the foreground, allowing animation of this image in one or two dimensions.
Dependencies
-
In order to compile
chaftrix.c,gcc(gnu c compiler) is needed. -
This program renders images with the help of
chafa:To install
chafain a Debian-based OS:
$ apt-get install chafa
Install
To install chaftrix, just clone the repo:
git clone https://gitlab.com/christosangel/chaftrix
Change directory to chaftrix/, and then compile the executable chaftrix fromchaftrix.c:
cd chaftrix/ && gcc chaftrix.c -Wall -o chaftrix
Usage
While in the chaftrix/ directory, run:
./chaftrix -f path/to/your/image.png
The user may add flags according to preference.
Flags
The user can either use the short or the long flag version
(i.e. ./chaftrix -h and ./chaftrix --help are the same).
| n | Short flag | Long flag | Explanation | Default |
|---|---|---|---|---|
| 1 | -h |
--help |
Shows this help text. | |
| 2 | -f |
--file |
Defines the path to the image file to render in the center of the matrix window. If this flag isn't used, the command will still render a matrix screen with no image. | |
| 3 | -s |
--speed |
Defines the speed of the matrix falling digits. Acceptable values: 0-9 | 5 |
| 4 | -d |
--dense |
Defines the density of the matrix lines. Acceptable values: 0-9 | |
| 5 | -m1 |
--matrix1 |
Defines the color of first matrix digits. | yellow |
| 6 | -m2 |
--matrix2 |
Defines the color of matrix digits. | green |
| Color Acceptable values | ||||
black, maroon, green, olive, navy,purple, teal, silver, grey, red, lime, yellow, blue, fuchsia, aqua and white. |
||||
| 7 | -H |
--hide |
Hides matrix effect, only image animation is produced. | |
| 8 | -a |
--animation |
Defines the animation of the image in the terminal window. | pong |
| Animation Acceptable values | ||||
horizontal |
Image bounces horizontally. | |||
vertical |
Image bounces vertically. | |||
bounce |
Image bounces up and down in the terminal window. | |||
scroll |
Image scrolls towards right direction. | |||
scrollleft |
Image scrolls towards left direction. | |||
scrollup |
Image scrolls upwards. | |||
scrolldown |
Image scrolls downwards. | |||
hop |
Image hops and bounces under gravity. | |||
hopscroll |
Image scrolls right while bouncing under gravity. | |||
hopscrollleft |
Image scrolls left while bouncing under gravity. | |||
saw |
Image scrolls right while bouncing up and down. | |||
sawleft |
Image scrolls left while bouncing up and down. | |||
sawup |
Image scrolls up while bouncing left and right . | |||
sawdown |
Image scrolls down while bouncing left and right . | |||
pong |
Image bounces around in the terminal window. | |||
slide |
Image slides right in the terminal window. | |||
slideleft |
Image slides left in the terminal window. | |||
demo |
Alternating all animation modes one by one. | |||
shuffle |
Alternating all animation modes randomly. | |||
none |
No animation, the image remains stable and centered. | |||
| 9 | -D |
--duration |
Defines the duration of each animation during shuffle or demo mode, in cycles. Acceptable values: minimum 10 | 300 |
| 10 | -S |
--slide |
Defines the duration of the image staying still in slide mode, in cycles. Acceptable values: minimum 1 | 20 |
Limitations
Maximum terminal window sizes are defined 160 rows x 600 columns.
Maximum image glyph characters :20000 characters.
When the window resizes, the image will resize also to the default values:
max rows: window rows - 5
max columns: 2 x max rows
If the user wishes to get a different image size in the resized terminal window, the program should be launched again with the desired image size.
If the image size given is too big, default image sizes are applied.
This program is the continuation and evolution of other projects:
https://gitlab.com/christosangel/matrix_clone
{height=200}