Matrix in linux terminal

Эффект Матрицы на любом Linux-дистрибутиве

Разбавим череду постов про программы, игры и альтернативы Windows-софту чем-то маленьким, но приятным. Я фанат трилогии Матрица (да, признаю только первые три части), потому одной из мини-утилит, которая всегда устанавливается на дистрибутив Linux является Cmatrix. Софтинка имитирует код из фильма в терминале. Вначале расскажу (и покажу), как установить, потом объясняю зачем.

Установка Cmatrix

Для установки понадобится терминал. Открываем его и вводим команду, зависящую от выбранного дистрибутива:

  • Ubuntu/Debian/Linux Mint — sudo apt install cmatrix
  • Archlinux — sudo pacman -S cmatrix
  • Fedora — sudo dnf install cmatrix

Запускаем Cmatrix

Утилитка работает только через терминал, поэтому для запуска открываем/не закрываем консоль и вводим простую команду:

Видимый на экране эффект является стандартным. Чтобы разнообразить его, можно добавить в команду аргументов. Узнать какие аргументы поддерживает утилита можно используя ключ -h (help)

В выводе видим какие аргументы можно использовать. Например после ввода следующей команды в терминале появится обратно направленный жирный текст синего цвета, который будет обновляться каждые 4 секунды.

Сценарий использования

У меня два монитора и иногда один не используется (например, при просмотре фильма). Тогда я запускаю на нем терминал, после Cmatrix и оставляю работать в фоне. Или когда нужно отдохнуть от ПК, просто стартую Cmatrix как экранную заставку.

Может кому-то такая программка зайдет, кто знает. Вещь интересная, пусть и не несет в себе большого смысла. В последующих материалах расскажу о более полезных консольных утилитах, которые делают жизнь Linux-пользователя проще и позволяют экономить время.

Если материал показался интересным или даже полезным, то поддержите его лайком и подпиской. Напишите в комментариях, как вы относитесь к фильму Матрица и считаете ли последнюю вышедшую часть достойной быть в рядах трилогии.

Источник

DESCRIPTION

-a Asynchronous scroll -b Bold characters on -B All bold characters (overrides -b) -f Force the linux $TERM type to be on -l Linux mode (sets «matrix.fnt» font in console) -o Use old-style scrolling -h, -? Print usage and exit -n No bold characters (overrides -b and -B) -s «Screensaver» mode, exits on first keystroke -m «Lambda» mode, every character becomes a lambda -x X window mode, use if your xterm is using mtx.pcf -V Print version information and exit -u delay Screen update delay 0 — 9, default 4 -C color Use this color for matrix (default green). Valid colors are green, red, blue, white, yellow, cyan, magenta and black.

KEYSTROKES

The following keystrokes are available during execution (unavailable in -s mode)

a Toggle asynchronous scroll b Random bold characters B All bold characters n Turn off bold characters 0-9 Adjust update speed ! @ # $ % ^ & ) Change the color of the matrix to the corresponding color: ! — red, @ — green, # — yellow, $ — blue, % — magenta, ^ — cyan, & — white, ) — black. q Quit the program

Читайте также:  Ibm db2 client linux

BUGS

This program is very CPU intensive. Don’t be surprised if it eats up over 40% of your CPU at times.

HOMEPAGE

Package name: extra/cmatrix Version: 2.0-2 Upstream: https://www.asty.org/cmatrix/ Licenses: GPL3 Manuals: /listing/extra/cmatrix/ Table of contents

Powered by archmanweb, using mandoc for the conversion of manual pages.

The website is available under the terms of the GPL-3.0 license, except for the contents of the manual pages, which have their own license specified in the corresponding Arch Linux package.

Источник

Ubuntu Linux : get matrix effect on terminal

This time I made a thought to share something interesting.It is not related to system admin but it is just for fun.

I generally use ubuntu most of the time for my desktop purposes. Hope you will like this matrix effect on your terminal.

First you have to install cmatrix package into your system. It is already available on Ubuntu repo, so no additional repo require to add. Run the command

sudo apt-get install cmatrix

It will install the cmatrix package.

Now on terminal run the command

matrix

You can find more options in cmatrix by typing command cmatrix —help . In given below output, you can see available help options.

sharad@sharadchhetri:~$ cmatrix --help Usage: cmatrix -[abBfhlsVx] [-u delay] [-C color] -a: Asynchronous scroll -b: Bold characters on -B: All bold characters (overrides -b) -f: Force the linux $TERM type to be on -l: Linux mode (uses matrix console font) -o: Use old-style scrolling -h: Print usage and exit -n: No bold characters (overrides -b and -B, default) -s: "Screensaver" mode, exits on first keystroke -x: X window mode, use if your xterm is using mtx.pcf -V: Print version information and exit -u delay (0 - 10, default 4): Screen update delay -C [color]: Use this color for matrix (default green) sharad@sharadchhetri:~$

Enjoy cmatrix! It is really cool.

Share this:

Reader Interactions

Comments

Nice effect. Some issues though, the characters don’t fade out like in the matrix film, and the text is too fast and frequent

sharad@sharadchhetri:~$ cmatrix --help Usage: cmatrix -[abBfhlsVx] [-u delay] [-C color] -a: Asynchronous scroll -b: Bold characters on -B: All bold characters (overrides -b) -f: Force the linux $TERM type to be on -l: Linux mode (uses matrix console font) -o: Use old-style scrolling -h: Print usage and exit -n: No bold characters (overrides -b and -B, default) -s: "Screensaver" mode, exits on first keystroke -x: X window mode, use if your xterm is using mtx.pcf -V: Print version information and exit -u delay (0 - 10, default 4): Screen update delay -C [color]: Use this color for matrix (default green) sharad@sharadchhetri:~$

I am from MAC OS (pls don’t hate me), and when I type it down it says “command not found”. I’m new to the terminal. Can u pls halp?

Hi Bob, In Ubuntu 16.04 LTS Desktop, run given below two command. I am not sure if you are trying the command in Linux or MacOS.

sudo apt update sudo apt install cmatrix
sharad@linuxworld:~$ sudo apt install cmatrix Reading package lists. Done Building dependency tree Reading state information. Done The following packages were automatically installed and are no longer required: libpango1.0-0 libpangox-1.0-0 Use 'sudo apt autoremove' to remove them. Suggested packages: cmatrix-xfont The following NEW packages will be installed: cmatrix 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 15.8 kB of archives. After this operation, 50.2 kB of additional disk space will be used. Get:1 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 cmatrix amd64 1.2a-5build2 [15.8 kB] Fetched 15.8 kB in 0s (35.8 kB/s) Selecting previously unselected package cmatrix. (Reading database . 205813 files and directories currently installed.) Preparing to unpack . /cmatrix_1.2a-5build2_amd64.deb . Unpacking cmatrix (1.2a-5build2) . Processing triggers for man-db (2.7.5-1) . Setting up cmatrix (1.2a-5build2) . sharad@linuxworld:~$

umm.. it says “unable to locate package” im connect to the internet and everything, but it doesnt seem to work :/

Читайте также:  Linux for loop find

Hi, Not sure which OS version you are using. But you can check with below given command , if the package is available in repo or not.

sudo apt-get update apt-cache policy cmatrix

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Terminal based «The Matrix» like implementation

License

abishekvashok/cmatrix

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Matrix like effect in your terminal

-----------------------------------------------------

-----------------------------------------------------

CMatrix is based on the screensaver from The Matrix website. It shows text flying in and out in a terminal like as seen in «The Matrix» movie. It can scroll lines all at the same rate or asynchronously and at a user-defined speed.

CMAtrix is inspired from ‘The Matrix’ movie. If you haven’t seen this movie and you are a fan of computers or sci-fi in general, go see this movie.

❕ Disclaimer : We are in no way affiliated in any way with the movie «The Matrix», «Warner Bros» nor any of its affiliates in any way, just fans.

-----------------------------------------------------

You’ll probably need a decent ncurses library to get this to work. On Windows, using mingw-w64-ncurses is recommended (PDCurses will also work, but it does not support colors or bold text).

Читайте также:  Linux automount usb flash

Run this command to check the version of ncurses.

If you get no output then you need to install ncurses. Click below to install ncurses in Linux.

-----------------------------------------------------

💾 Building and installing cmatrix

To install cmatrix, Clone this repo in your local system and use either of the following methods from within the cmatrix directory.

🔹 Using configure (recommended for most linux/mingw users)

autoreconf -i # skip if using released tarball ./configure make make install

Here we also show an out-of-source build in the sub directory «build». (Doesn’t work on Windows, for now).

mkdir -p build cd build # to install to "/usr/local" cmake .. # OR # to install to "/usr" #cmake -DCMAKE_INSTALL_PREFIX=/usr .. make make install

-----------------------------------------------------

After you have installed cmatrix just type the command cmatrix to run it 🙂

Run with different arguments to get different effects.

cmatrix [-abBflohnsmVx] [-u update] [-C color]

For more options and help run cmatrix -h
OR
Read Manual Page by running command man cmatrix

To get the program to look most like the movie, use cmatrix -lba To get the program to look most like the Win/Mac screensaver, use cmatrix -ol

📍 Note: cmatrix is probably not particularly portable or efficient, but it won’t hog too much CPU time.

-----------------------------------------------------

cmatrix screenshot

-----------------------------------------------------

  • Chris Allegrettachrisa@asty.org for writing cmatrix up in a fortnight and giving us the responsibility to further improve it.
  • Krisjon Hanson and Bjoern Ganslandt for helping with bold support and Bjoern again for the cursor removal code, helping with the -u and -l modes/flags, and Makefile improvements.
  • Adam Gurno for multi-color support.
  • Garrick West for debian consolefont dir support.
  • Nemo for design thoughts and continuous help and support.
  • John Donahue for helping with transparent term support
  • Ben Esacove for Redhat 6 compatibility w/matrix.psf.gz
  • jwz for the xmatrix module to xscreensaver at http://www.jwz.org/xscreensaver.
  • Chris Allegretta’s girlfriend Amy for not killing him when he stayed up till 3 AM writing code.
  • Sumit Kumar Soni for beautifying the README.
  • The makers of the Matrix for one kickass movie!
  • ➤ Everyone who has sent (and who will send) us and Chris mails regarding bugs, comments, patches or just a simple hello.
  • ➤ Everyone who has contributed to the project by opening issues and PRs on the github repository.

-----------------------------------------------------

If you have any suggestions/flames/patches to send, please feel free to:

  • Open issues and if possible label them, so that it is easy to categorise features, bugs etc.
  • If you solved some problems or made some valuable changes, Please open a Pull Request on Github.
  • See contributing.md for more details.

-----------------------------------------------------

This software is provided under the GNU GPL v3. View License

Источник

Оцените статью
Adblock
detector