NEO(6) | neo User Manual | NEO(6) |
neo - simulate the digital rain from "The Matrix"
neo [OPTIONS]...
neo recreates the digital rain effect from "The Matrix". Streams of random characters will endlessly scroll down your terminal screen. There are many differing depictions of this effect throughout the Matrix franchise. neo attempts to closely mimic the scene from "The Matrix" where Cypher explains the code to Neo. It imitates some of the finer details such as the characters used (half-width katakana), uneven colors, color palette, glitching, and flickering.
The digital rain is made of many "droplets". Each droplet scrolls vertically down a column. There can be multiple droplets in each column. Some characters on the screen are "glitched" - their values will change randomly until they are erased. The bottom of each droplet is a bit brighter than the rest.
You can run neo without any arguments, but it has many options to customize it to your liking. It can also respond to key presses (try pressing a number!), and it accepts a color file (see the "COLOR FILE" section below), which allows neo to display user-defined colors. neo will use Unicode characters by default if it detects a locale that supports UTF.
neo takes options in two forms: short and long. Short options cannot include an equal sign but long options can. Example for -S/--speed:
These will work:
-S 16
--speed 16
--speed=16
These will not:
-S=16
--S 16
neo -m "the message" --speed=12 --density=3 --lingerms=1,1 --rippct=0
You can press keys while neo is running to control its behavior. The key bindings cannot be changed without modifying the program code. Some keys can be held to increase their effect (e.g. holding UP increases speed further).
Here are the available key controls:
´SPACE' - clears the screen
´UP' - increases the scrolling speed
´DOWN' - decreases the scrolling speed
´RIGHT' - increases the number of characters that are glitchy
´LEFT' - decreases the number of characters that are glitchy
´TAB' - toggles the shading mode between random and gradient
´ESC' - exits neo
´+' - increases the number of droplets onscreen
´-' - decreases the number of droplets onscreen
´a' - toggles asynchronous droplet speed
´p' - pauses neo
´q' - exits neo
´1' - sets the color to green
´2' - sets the color to green2
´3' - sets the color to green3
´4' - sets the color to gold
´5' - sets the color to pink2
´6' - sets the color to red
´7' - sets the color to blue
´8' - sets the color to cyan
´9' - sets the color to purple
´0' - sets the color to gray
´!' - sets the color to rainbow
´@' - sets the color to yellow
´#' - sets the color to orange
´$' - sets the color to pink
´%' - sets the color to vaporwave
neo can read a file that specifies the background color and all the foreground colors. The file is given via the -C/--colorfile option.
You can write comments using "//", "#", ";", "*", or "@". Comments can go on separate lines or after the data on any line. The first line that is not blank or a comment should be the version string. The version string line should look like:
neo_color_version N
where "N" is the color file version number, which is currently 1. The version string is optional, and if it is omitted, then neo will assume that the file adheres to the latest version's format. This could potentially break old color files. Ye have been warned! neo will try to maintain backwards compatability with older color file versions so long as their version is actually given.
Each data line in the file describes a color. The first line is the background color. Each subsequent line describes a foreground color. Each file must contain at least two lines: one for the background and one for the foreground. Typically, you will want to put the foreground colors in order of ascending brightness. neo will not sort the colors. The last color should usually be very bright (e.g. white).
Each data line in the file specifies one value or four values. If only one value is given, it is treated as a 16 or 256 terminal color code (e.g. 16 is black). If four values are given, the first is treated as a 16/256 color code and the other three are the RGB components of the 32-bit color. Each component is a value from 0 to 1000, which closely mimics how ncurses handles color. Each value is separated by a comma, and whitespace is allowed.
If more than one value is given on a line, then all four values must be given. Lines do not all have to have the same number of components i.e. some lines can just specify the 16/256 color code while others can specify all four values.
On most systems, if a value of "-1" is provided for the 16/256 color code, this will set the color to the system default. This can be useful if you want to keep the default background.
All ncurses implementations should allow you to override at least the first 256 colors, assuming your terminal supports it. Some will let you override even more than that. ncurses should restore all colors back to their previous state as long as neo exits cleanly.
If either of the 16 or 256 colormode options is used, all 32-bit RGB components in the color file will be parsed if they are given, but they will be unused.
Example 1: Blue text on a red background using only 256 color codes
196
21
Example 2: Different shades of purple text on a yellow background with some 32-bit color components
228,917,888,59
54
92
129,750,963,128
Example 3: Default background and various shades of green using only 256 color codes
-1
34
40
46
82
231
neo can have two main performance issues: high CPU utilization and stuttering. A terminal emulator with GPU acceleration (e.g. Alacritty) may significantly improve these issues. The CPU utilization by neo itself is fairly low, even at high frame rates on large screens. However, your terminal emulator may use substantial CPU resources to draw everything. Without a fast terminal emulator, this application may use up a whole CPU core or three.
Sometimes the text will not scroll smoothly. Again, a fast terminal emulator will probably help. You will also typically want the frame rate (i.e. --fps) to be evenly divisible by the character speed (i.e. -S/--speed). Sometimes, the glitching effect will lead to stuttering because a substantial number of characters onscreen will have to be redrawn. Reducing the glitchiness (i.e. --glitchpct) or disabling glitching (i.e. --noglitch) may help.
If you experience performance issues, here are some things to try:
1. Use a GPU-accelerated terminal emulator
2. Run neo on a smaller screen/window
3. Reduce the frame rate (e.g. --fps=30)
4. Reduce the number of droplets onscreen (e.g. -d 0.5)
5. Reduce the character speed (e.g. --speed=6)
6. Disabling glitching (i.e. --noglitch)
7. Disable colors (i.e. --colormode=0)
8. Disable bold characters (i.e. --bold=0)
9. Disable Unicode characters (i.e. --charset=ascii)
Here is a "potato mode" config that should perform well on most systems:
neo --fps=20 -d 0.5 --speed=5 --noglitch --colormode=0 --bold=0 --charset=ascii
Example 0: Just run it
neo
Example 1: Sets a faster, asynchronous scrolling speed with 256 colors
neo -S 12 -a --color=green3 --colormode=256
Example 2: Red text with a custom message and Cyrillic characters
neo --color=red --charset=cyrillic -m "IN SOVIET RUSSIA, COMPUTER PROGRAMS YOU!"
Example 3: Displays golden Greek characters that are full-width
neo --color=gold --charset=greek -F
Example 4: Uses --chars to draw Unicode dominoes
neo --chars=0x1F030,0x1F093 --fullwidth
Written by Stewart Reive
Create an issue on GitHub: https://github.com/st3w/neo
Copyright © 2021 Stewart Reive
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
This program is not affiliated with "The Matrix", Warner Bros. Entertainment Inc., Village Roadshow Pictures, Silver Pictures, nor any of their parent companies, subsidiaries, partners, or affiliates.
You get used to it. I... I don't even see the code. All I see is blonde, brunette, redhead. Hey! You uh... want a drink? :)
Feb 21 2022 | neo version 0.6.1 |