The Matrix (1999) screen rain effect of falling green characters in a shell/terminal written in POSIX sh.
Usage: matrix [OPTION...]
OPTIONS
-h, --help Display help
-b, --binary Use binary characters [01]
-d, --digits Use digit characters [0123456789]
-l, --lower Use lower case letters [abcdefghijklmnopqrstuvwxyz]
-u, --upper Use upper case letters [ABCDEFGHIJKLMNOPQRSTUVWXYZ]
-s, --special Use special characters [()[]{}/\]
-t, --testing Activate character testing mode
-c, --custom Use custom characters specified 'inside single quotes'
-m, --message Provide a message to display in the center
-i, --message_int Provide an integer from 0-9 that modifies the message
-k, --halfwidth Use half-width characters of Japanese katakana
[アイウエオカキクケコサスセタチテトナニヌネハヒフホマミムメモヤユヨラリルレロワヲ]
-K, --fullwidth Use full-width Japanese katakana characters.
Will not work, provided as a reference!
[アイウエオカキクケコサスセタチテトナニヌネハヒフホマミムメモヤユヨラリルレロワヲ]
EXAMPLES
matrix -du
matrix -bi 5 -m 'TEST MESSAGE'
matrix -b --custom='!?/\' --testing
# example for st terminal emulator
st -f "NotoSansMono Nerd Font:pixelsize=27" -n opaque -t The-Matrix-Shell -e matrix -du
# define rule in i3/config
for_window [title="The-Matrix-Shell"] fullscreen
For using this script as a screensaver, you can use slock with unlock screen patch.
You can build & patch it from sources yourself, or build & use my already patched slock version.
#!/bin/sh
# specifically for using in command: 'slock "$bname"' (this script base name)
# executes matrix shell in new spawned terminals for each monitor output
# then kills all process-group when 'slock "$bname"' process is finished
bname=$(basename "$0") # get this script base name
spawn_term() {
# add (.0) in title - wm should use this substring as rule to match monitor output
title="The-Matrix-Shell (.$1)"
st -f "NotoSansMono Nerd Font:pixelsize=27" -n opaque -t "$title" -e matrix -du
}
# whole command line runs in the background
# if process exist and then finished -> killall process group | else return 1 (does nothing)
pwait -u "$USER" -f "slock $bname" && killall -g "$bname" &
nummons=$(xrandr --listactivemonitors | sed "1d" | wc -l)
i=0
while [ "$i" -lt "$nummons" ]; do
spawn_term "$i" &
i=$((i + 1))
done
to make it fullscreen/floating/etc. as you like or need.
where N
is number from 0
to the total Number of monitor outputs
.
To place windows with such titles on predefined monitors.
Make sure that slock, matrix, matrixlock files are added to your $PATH
. And can be used independently.
$ slock matrixlock