Skip to content

4ster-light/pmatrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PMatrix

Python 3.10+ License: MIT Sponsor

A Matrix digital rain effect terminal application, written in Python


Overview

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.

Features

  • 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

Running

Execute without installing using nix run or uvx:

nix run github:4ster-light/pmatrix
uvx git+https://github.com/4ster-light/pmatrix

Installation

Using Nix (recommended)

Install directly from GitHub:

nix profile add github:4ster-light/pmatrix

Or add the flake to your system config if you use NixOS.

Using UV

Install directly from GitHub:

uv tool install git+https://github.com/4ster-light/pmatrix

Using pip

Install directly from GitHub:

pip install git+https://github.com/4ster-light/pmatrix

Podman/Docker

Run 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 pmatrix

This 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.

Requirements

  • Python 3.10 or later
  • A terminal that supports ANSI escape codes (most modern terminals)
  • Linux, macOS, or compatible terminal

License

MIT

About

An alternative to the famous cmatrix C++ program written in Python

Topics

Resources

License

Stars

Watchers

Forks

Contributors