Authentic Matrix digital rain effect as a tmux screensaver. Activates automatically after idle timeout.
Uses encoding hack to create authentic glitchy Matrix effect:
# Install cmatrix
apt install cmatrix
# Create glitch wrapper
cat > /usr/local/bin/cmatrix-glitch << 'EOF'
#!/bin/bash
# Force broken encoding for glitch effect
LC_ALL=C cmatrix -c "$@"
EOF
chmod +x /usr/local/bin/cmatrix-glitch
# Add to ~/.tmux.conf
echo '
set -g lock-after-time 60
set -g lock-command "cmatrix-glitch -s -b -u 4"
' >> ~/.tmux.conf
# Reload
tmux source-file ~/.tmux.conf# Install
apt install cmatrix
# Add to ~/.tmux.conf
echo '
set -g lock-after-time 60
set -g lock-command "cmatrix -s -b -u 4"
' >> ~/.tmux.conf
# Reload
tmux source-file ~/.tmux.confFlags:
-s— screensaver mode (any key to exit)-b— bold characters-u 4— update delay (1-9, higher = slower)-c— Japanese katakana characters
The glitch effect is achieved through an encoding hack:
LC_ALL=C cmatrix -c-cenables Japanese katakana characters (wide characters)LC_ALL=Cforces basic C locale (breaks UTF-8)- Terminal can't render wide chars properly → glitch effect
Included matrix.sh for systems without cmatrix:
# Download
curl -o ~/.local/bin/matrix.sh https://raw.githubusercontent.com/nglain/matrix/main/matrix.sh
chmod +x ~/.local/bin/matrix.sh
# Add to ~/.tmux.conf
set -g lock-after-time 60
set -g lock-command '~/.local/bin/matrix.sh'# Change timeout (seconds)
set -g lock-after-time 120 # 2 minutes
# Disable
set -g lock-after-time 0| Name | Install | tmux lock-command | Description |
|---|---|---|---|
| cmatrix | apt install cmatrix |
cmatrix -s -b |
Matrix rain |
| cmatrix-glitch | see above | cmatrix-glitch -s -b -u 4 |
Glitchy Matrix |
| pipes.sh | apt install pipes.sh |
pipes.sh |
Animated pipes |
| cbonsai | apt install cbonsai |
cbonsai -l -i -w 5 |
Growing bonsai tree |
| asciiquarium | apt install asciiquarium |
asciiquarium |
Aquarium with fish |
| tty-clock | apt install tty-clock |
tty-clock -s -c |
Terminal clock |
MIT
