blob: 9c7b529991e358fe4dd7b15a333c186ea69c43d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
---
title: The Matrix digital rain
date: 2024-01-12
author: Wickramage Don Sadeep Madurange
thumbnail: thumb.png
layout: post
---
The famous digital rain from the movie The Matrix implemented in C for
the Unix terminal without using any GUI/TUI kits:
<video style="max-width:100%;" controls="" poster="thumb.png">
<source src="matrix.mp4" type="video/mp4">
</video>
Domsson's <a href="https://github.com/domsson/fakesteak" class="external"
target="_blank" rel="noopener noreferrer">Fakesteak</a> inspired
this project. I added the following features while trying to keep the original
project's simplicity intact as much as possible:
- Customize the rain color to match the theme of the setup.
- Support for UTF-32 characters.
- The ghosting effect of old monochrome displays.
- The rain more closely resembles the original from the first movie.
To use them, you need a terminal emulator that supports 24-bit RGB colors and
Unicode characters.
The background, head, and tail colors of the rain can be configured via
`COLOR_BG_*`, `COLOR_HD_*`, and `COLOR_TL_*` settings. The `UNICODE_MIN` and
`UNICODE_MAX` values control the character set used for the rain. For instance,
use `0x30A1` and `0x30F6` for Katakana:
<img style="width: 100%;" src="katakana.png" />
Happy ricing!
Files: [source.tar.gz](source.tar.gz)
|