This program creates a digital rain effect, similar to the iconic Matrix movie visuals, with falling characters in the terminal. Written in modern Python with improved features including variable drop speeds, intensity-based coloring, and optimized rendering.
- Dynamic drop speeds: Each drop falls at a random speed for more variety
- Intensity-based coloring: Leading characters are brighter green
- Smooth animations: Optimized rendering at ~30 FPS
- Terminal resize support: Automatically adjusts to window size changes
- Graceful shutdown: Handles Ctrl+C cleanly
- No external dependencies: Uses Python standard library only
Execute without installing using nix run or uvx:
nix run github:4ster-light/pmatrixuvx git+https://github.com/4ster-light/pmatrixInstall directly from GitHub:
nix profile add github:4ster-light/pmatrixOr add the flake to your system config if you use NixOS.
Install directly from GitHub:
uv tool install git+https://github.com/4ster-light/pmatrixInstall directly from GitHub:
pip install git+https://github.com/4ster-light/pmatrixRun the application in a container:
git clone https://github.com/4ster-light/pmatrix.git
cd pmatrix
nix build .#container
podman load < result
podman run -it --rm pmatrixThis will build the container image and run it interactively in your terminal using the provided image in the nix flake.
Note
The container image is built using Nix, so you will need Nix installed to build it. You may load it with either Podman or Docker. A prebuilt image will be published in the future.
- Python 3.10 or later
- A terminal that supports ANSI escape codes (most modern terminals)
- Linux, macOS, or compatible terminal
MIT