はじめに

コマンドライン上でマトリックスの文字がいっぱい流れるかっこいいやつが見られるコマンドがあるので使ってみる。

環境

1
2
Mac OS Sonoma 14.4.1
Homebrew 4.2.19

cmatrixのインストール

1
brew install cmatrix
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
brew install cmatrix
==> Downloading https://ghcr.io/v2/homebrew/core/cmatrix/manifests/2.0
################################################################################################################################################# 100.0%
==> Fetching cmatrix
==> Downloading https://ghcr.io/v2/homebrew/core/cmatrix/blobs/sha256:68d9ab783759a41f8c263c9b1d63e77056978571e738018a45ce1e3f7d9a48d7
################################################################################################################################################# 100.0%
==> Pouring cmatrix--2.0.sonoma.bottle.tar.gz
🍺  /usr/local/Cellar/cmatrix/2.0: 10 files, 77KB
==> Running `brew cleanup cmatrix`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

cmatrixを使う

1
cmatrix

か、かっこいい・・・!

ヘルプを見てみるといろいろオプションがあるので使ってみる。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
cmatrix --help
 Usage: cmatrix -[abBcfhlsmVx] [-u delay] [-C color]
 -a: Asynchronous scroll
 -b: Bold characters on
 -B: All bold characters (overrides -b)
 -c: Use Japanese characters as seen in the original matrix. Requires appropriate fonts
 -f: Force the linux $TERM type to be on
 -l: Linux mode (uses matrix console font)
 -L: Lock mode (can be closed from another terminal)
 -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)
 -r: rainbow mode
 -m: lambda mode

虹色+太字での実行

1
cmatrix -rB
matrix-02

manを見てみる

cmatrixの実行中に下記のキーを押すことで、色々な変化が楽しめるようだ。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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

おわりに

スクリーンセーバとして機能させるとおしゃれかもしれない。
自分、マトリックスいけます。で一発芸にもなるかも。