Skip to content
This repository was archived by the owner on Jul 7, 2026. It is now read-only.

Latest commit

ย 

History

80 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŸข Mastodon Matrix Theme

Mastodon License: Anti-Capitalist Version

๐ŸŽฌ A cyberpunk Matrix-style theme for Mastodon - the decentralized social network.

A complete theme package featuring an interactive terminal landing page, matrix rain animations, custom emojis, and full deployment configurations.

Matrix Theme Preview

๐Ÿ”— Links

โœจ Features

Feature Description
๐ŸŽจ Matrix Theme Full SCSS theme with 3200+ lines of cyberpunk styling
๐ŸŒง๏ธ Matrix Rain Animated falling code background (Web Worker based)
๐Ÿ’ป Terminal Landing Interactive CLI landing page with bot protection
๐Ÿค– Pseudo-AI Chat Chat with Neo, Morpheus, Trinity, Oracle, Smith
๐ŸŽฎ Easter Eggs Hidden Tetris game!
๐ŸŽจ Color Variants Green, Red, Blue, Purple themes
๐Ÿ˜€ 120+ Emojis Custom hacker/tech themed emojis
โŒจ๏ธ Theme Toggle Ctrl+Shift+M to toggle theme
๐Ÿ”’ Bot Protection Terminal challenge before login
๐Ÿณ Docker Ready nginx.conf & systemd service included

๐Ÿ“ File Structure

mastodon-matrix-theme/
โ”œโ”€โ”€ README.md                           # This file
โ”œโ”€โ”€ LICENSE                             # AGPLv3 License
โ”œโ”€โ”€ install.sh                          # Installation helper script
โ”‚
โ”œโ”€โ”€ styles/                             # ๐ŸŽจ SCSS Themes
โ”‚   โ”œโ”€โ”€ matrix_theme.scss               # Full theme (3200+ lines, toggle)
โ”‚   โ””โ”€โ”€ matrix_theme_standalone.scss    # Simple always-on version
โ”‚
โ”œโ”€โ”€ js/                                 # ๐Ÿ’ป JavaScript
โ”‚   โ”œโ”€โ”€ matrix_rain.js                  # Matrix rain + splash screen
โ”‚   โ”œโ”€โ”€ matrix_background.js            # Alternative background effect
โ”‚   โ””โ”€โ”€ matrix_theme.ts                 # Theme toggle controller (TS)
โ”‚
โ”œโ”€โ”€ terminal/                           # ๐Ÿ–ฅ๏ธ Landing Page Terminal
โ”‚   โ”œโ”€โ”€ index.html                      # Interactive terminal page
โ”‚   โ”œโ”€โ”€ main.js                         # Terminal JavaScript
โ”‚   โ”œโ”€โ”€ main.css                        # Terminal styles
โ”‚   โ”œโ”€โ”€ tetris.html                     # ๐ŸŽฎ Easter egg: Tetris!
โ”‚   โ”œโ”€โ”€ tetris-script.js                # Tetris game logic
โ”‚   โ”œโ”€โ”€ tetris-style.css                # Tetris styles
โ”‚   โ””โ”€โ”€ talk_db_*.json                  # Pseudo-AI chat character databases
โ”‚
โ”œโ”€โ”€ emojis/                             # ๐Ÿ˜€ 120+ Custom Emojis
โ”‚   โ”œโ”€โ”€ hacker.svg                      # Hacker face
โ”‚   โ”œโ”€โ”€ matrix_code.svg                 # Matrix code
โ”‚   โ”œโ”€โ”€ terminal.svg                    # Terminal icon
โ”‚   โ”œโ”€โ”€ coffee_code.svg                 # Coding with coffee
โ”‚   โ”œโ”€โ”€ red_pill.svg / blue_pill.svg    # Matrix pills
โ”‚   โ””โ”€โ”€ ... (120+ more)
โ”‚
โ”œโ”€โ”€ rails/                              # ๐Ÿ›ค๏ธ Rails Integration
โ”‚   โ”œโ”€โ”€ matrix_controller.rb            # Terminal routes controller
โ”‚   โ”œโ”€โ”€ initializers/
โ”‚   โ”‚   โ””โ”€โ”€ matrix_theme.rb             # Theme configuration
โ”‚   โ”œโ”€โ”€ entrypoints/
โ”‚   โ”‚   โ””โ”€โ”€ common.ts                   # JS entrypoint example
โ”‚   โ””โ”€โ”€ views/
โ”‚       โ””โ”€โ”€ application_layout_snippet.haml  # Layout modifications
โ”‚
โ”œโ”€โ”€ deploy/                             # ๐Ÿณ Deployment Files
โ”‚   โ”œโ”€โ”€ nginx.conf                      # nginx configuration
โ”‚   โ””โ”€โ”€ mastodon-matrix.service         # systemd service file
โ”‚
โ”œโ”€โ”€ docs/                               # ๐Ÿ“š Documentation
โ”‚   โ””โ”€โ”€ FRONTEND_MAP_MATRIX_AND_STYLES.md
โ”‚
โ””โ”€โ”€ screenshots/
    โ””โ”€โ”€ preview.png                     # Theme preview

๐Ÿš€ Installation

Method 1: Standalone Theme (Always On)

Best for instances that want Matrix as the default look.

# 1. Copy standalone SCSS
cp styles/matrix_theme_standalone.scss \
   /path/to/mastodon/app/javascript/styles/

# 2. Import in Mastodon's main SCSS
echo '@import "matrix_theme_standalone";' >> \
   /path/to/mastodon/app/javascript/styles/application.scss

# 3. Copy Matrix rain JS
cp js/matrix_rain.js \
   /path/to/mastodon/app/javascript/errordon/matrix/index.js

# 4. Rebuild assets
cd /path/to/mastodon
RAILS_ENV=production bundle exec rails assets:precompile

Method 2: Toggleable Theme (Ctrl+Shift+M)

Best for instances that want theme as an option.

# 1. Copy full theme SCSS
cp styles/matrix_theme.scss \
   /path/to/mastodon/app/javascript/styles/errordon_matrix.scss

# 2. Copy theme controller
mkdir -p /path/to/mastodon/app/javascript/mastodon/features/errordon/
cp js/matrix_theme.ts \
   /path/to/mastodon/app/javascript/mastodon/features/errordon/

# 3. Copy Matrix rain
mkdir -p /path/to/mastodon/app/javascript/errordon/matrix/
cp js/matrix_rain.js js/matrix_background.js \
   /path/to/mastodon/app/javascript/errordon/matrix/

# 4. Update common.ts entrypoint
# Add to app/javascript/entrypoints/common.ts:
# import { initMatrixTheme } from 'mastodon/features/errordon/matrix_theme';
# import '@/errordon/matrix/index.js';
# initMatrixTheme();

# 5. Rebuild assets
cd /path/to/mastodon
RAILS_ENV=production bundle exec rails assets:precompile

๐Ÿ–ฅ๏ธ Terminal Landing Page Installation

The Matrix Terminal is a separate landing page with interactive CLI.

Install Terminal

# 1. Copy terminal files to public folder
cp -r terminal/ /path/to/mastodon/public/matrix/

# 2. Copy Rails controller
cp rails/matrix_controller.rb \
   /path/to/mastodon/app/controllers/

# 3. Add routes to config/routes.rb
cat << 'EOF' >> /path/to/mastodon/config/routes.rb

# Matrix Terminal
get '/matrix', to: 'matrix#index'
post '/matrix/pass', to: 'matrix#pass'
EOF

# 4. Restart Mastodon
systemctl restart mastodon-web mastodon-sidekiq

Terminal Commands

Command Effect
enter matrix Proceed to main site
help Show available commands
neo / morpheus / trinity Chat with characters
oracle / smith More characters
tetris ๐ŸŽฎ Play hidden Tetris game!
clear Clear terminal
exit Close terminal

๐ŸŽจ Color Variants

Set via environment variable:

# In .env.production
MATRIX_COLOR=green    # Classic (default)
MATRIX_COLOR=red      # Aggressive red
MATRIX_COLOR=blue     # Cyber blue
MATRIX_COLOR=purple   # Cyberpunk purple

๐Ÿ˜€ Custom Emojis Installation

Recommended: Use install.sh which automatically converts SVGs to high-quality PNGs.

Automatic Installation (Recommended)

# Requires ImageMagick for best quality
apt install imagemagick

# Run installer - converts all SVGs to 128x128 PNGs
./install.sh /path/to/mastodon

Manual Installation

# 1. Convert SVG emojis to PNG (128x128) for best display
mkdir -p /path/to/mastodon/public/emoji/custom
for svg in emojis/*.svg; do
    name=$(basename "$svg" .svg)
    convert -background none -resize 128x128 "$svg" \
        "/path/to/mastodon/public/emoji/custom/${name}.png"
done

# 2. OPTIONAL: Copy political emojis (pre-converted PNGs)
# These include: :acab: :antifa: :fcknzs: :no_nazis: :resist: :anarchist: :antifascist: :naturfreund:
cp emojis/*.png /path/to/mastodon/public/emoji/custom/

# 3. Import via Rails console (or tootctl)
cd /path/to/mastodon
RAILS_ENV=production bin/rails c

# In Rails console:
Dir.glob('public/emoji/custom/*.png').each do |path|
  shortcode = File.basename(path, '.png')
  CustomEmoji.find_or_create_by!(shortcode: shortcode) do |e|
    e.image = File.open(path)
    e.visible_in_picker = true
  end
end

Note: The install.sh script will ask if you want to include political emojis.

Popular Emojis Included

Emoji Shortcode Description
๐Ÿ’Š :red_pill: :blue_pill: Matrix pills
๐Ÿ‘จโ€๐Ÿ’ป :hacker: Hacker face
๐Ÿฑ :hacker_cat: Hacker cat
โ˜• :coffee_code: Code & coffee
๐Ÿ–ฅ๏ธ :terminal: Terminal
๐Ÿง :linux: :tux: Linux
๐Ÿณ :docker: Docker
๐Ÿ”’ :vpn: :tor: Privacy
๐Ÿ’€ :skull_matrix: Matrix skull
๐Ÿค– :robot: :cyborg: Robots

๐Ÿด Political Emojis (Optional)

These are included but optional during installation:

Emoji Shortcode Description
๐Ÿด :acab: 1312
๐Ÿด :antifa: Antifascist Action logo
๐Ÿด :fcknzs: FCK NZS
๐Ÿด :no_nazis: NO NZS
๐Ÿด :resist: RESIST
๐Ÿด :anarchist: ANARCHY
๐Ÿด :antifascist: ANTIFA
๐ŸŒฟ :naturfreund: Naturfreunde

๐Ÿณ Docker / nginx Deployment

nginx Configuration

# Copy nginx config
sudo cp deploy/nginx.conf /etc/nginx/sites-available/mastodon-matrix

# Edit and replace 'example.com' with your domain
sudo nano /etc/nginx/sites-available/mastodon-matrix

# Enable site
sudo ln -sf /etc/nginx/sites-available/mastodon-matrix \
            /etc/nginx/sites-enabled/

# Get SSL certificate
sudo certbot --nginx -d yourdomain.com

# Test and reload
sudo nginx -t && sudo systemctl reload nginx

systemd Service

# Copy service file
sudo cp deploy/mastodon-matrix.service \
        /etc/systemd/system/mastodon.service

# Edit paths if needed
sudo nano /etc/systemd/system/mastodon.service

# Enable and start
sudo systemctl daemon-reload
sudo systemctl enable mastodon
sudo systemctl start mastodon

โš™๏ธ Environment Variables

# Theme settings
MATRIX_THEME_ENABLED=true            # Enable Matrix theme by default
MATRIX_THEME=matrix                  # Theme name
MATRIX_COLOR=green                   # Color variant

# Terminal protection
MATRIX_TERMINAL_ENABLED=true         # Require terminal before login

๐Ÿ”ง Customization

Modify Colors

Edit styles/matrix_theme.scss:

// Near the top of the file
$matrix-primary: #00ff00;        // Main green
$matrix-background: #000000;     // Background
$matrix-text: #00ff00;           // Text color

Disable Matrix Rain

Comment out in rails/entrypoints/common.ts:

// import '@/errordon/matrix/index.js';

Change Terminal Messages

Edit terminal/talk_db_*.json files for character responses.


๐Ÿท๏ธ Rebrand to Your Instance Name

Want to change "Matrix" to your own instance name? Use the rebrand scripts:

Linux/macOS

./rebrand.sh "YourInstanceName"

Windows PowerShell

.\rebrand.ps1 -NewName "YourInstanceName"

What Gets Changed

Category Before After
Display names MATRIX TERMINAL YOURNAME TERMINAL
Terminal prompt guest@matrix:~$ guest@yourname:~$
Environment vars MATRIX_THEME YOURNAME_THEME
Ruby namespace Matrix:: Yourname::
File names matrix_theme.rb yourname_theme.rb

๐Ÿ“– See docs/BRANDING.md for detailed manual instructions.


๐Ÿ“ License

Theme & Code: Anti-Capitalist Software License 1.4

Emojis:

OpenMoji emojis by the OpenMoji project (https://openmoji.org). License: CC BY-SA 4.0


๐Ÿ™ Credits

  • Mastodon - Original software by Eugen Rochko & contributors
  • OpenMoji - Open source emoji library (CC BY-SA 4.0) - Created by students at HfG Schwรคbisch Gmรผnd
  • Matrix Theme - Developed by the Errordon team
  • Inspiration - "The Matrix" (1999) by the Wachowskis

๐Ÿ†˜ Support

  • GitHub Issues: Report bugs
  • Mastodon: Open an issue on GitHub for support

โญ Star History

If you like this theme, please give it a star! It helps others discover it.


Built for Mastodon

About

๐ŸŸข Cyberpunk Matrix theme for Mastodon - Terminal landing page, matrix rain animation, Pseudo-AI chat, 120+ custom emojis, and full deployment configs. Compatible with Mastodon v4.3+

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages