Skip to content

Commit 091ae20

Browse files
committed
Doc: Manual and usage overhaul
- cmatrix.1 > cmatrix.6 (screensavers traditionally filed as games) - rewrite in mdoc(7) - write document description for visibility in manual searches - maintain synopsis, options, and keystrokes (consisency, organization) -do this in cmatrix.c logic and usage as well - write vendor neutral description of the program - add examples including vendor neutral examples - move homepage to SEE ALSO, link it, and relevant pages - add terse HISTORY Fixes: #87, #105, and #162
1 parent 5c082c6 commit 091ae20

File tree

5 files changed

+233
-184
lines changed

5 files changed

+233
-184
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ add_executable(cmatrix cmatrix.c)
6969
target_link_libraries(cmatrix ${CURSES_LIBRARIES})
7070

7171
install(TARGETS cmatrix DESTINATION ${CMAKE_INSTALL_BINDIR})
72-
install(FILES cmatrix.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
72+
install(FILES cmatrix.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
7373

7474
if (UNIX)
7575
foreach (CONSOLE_FONTS_DIR ${CONSOLE_FONTS_DIRS})

Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
bin_PROGRAMS = cmatrix
22
cmatrix_SOURCES = cmatrix.c
33

4-
man_MANS = cmatrix.1
4+
man_MANS = cmatrix.6
55

66
if MATRIX_FONTS
77
BUILD_FONTS = 1
@@ -11,7 +11,7 @@ endif
1111

1212
EXTRA_DIST = COPYING INSTALL install-sh \
1313
missing mkinstalldirs matrix.fnt \
14-
matrix.psf.gz mtx.pcf cmatrix.1 cmatrix.spec
14+
matrix.psf.gz mtx.pcf cmatrix.6 cmatrix.spec
1515

1616
install-data-local:
1717
@if test $(BUILD_FONTS) = 1; then \

cmatrix.1

Lines changed: 0 additions & 101 deletions
This file was deleted.

cmatrix.6

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
.Dd April 5, 2024
2+
.Dt CMATRIX 6
3+
.Os
4+
.Sh NAME
5+
.Nm cmatrix
6+
.Nd Matrix digital rain terminal screensaver
7+
.Sh SYNOPSIS
8+
.Nm
9+
.Op Fl \&?abBcfhklLmnorsVx
10+
.Op Fl C Ar color
11+
.Op Fl M Ar message
12+
.Op Fl t Ar tty
13+
.Op Fl u Ar delay
14+
.Sh DESCRIPTION
15+
The
16+
.Nm
17+
utility shows random 8-color characters raining down a terminal, at a
18+
user-defined speed, either at the same rate or asyncronously.
19+
.Pp
20+
The following command-line options are available:
21+
.Pp
22+
.Bl -tag -width "-M message" -compact
23+
.It Fl a
24+
Asynchronous scroll
25+
.It Fl b
26+
Bold characters on
27+
.It Fl B
28+
All bold characters, overrides
29+
.Fl b
30+
.It Fl c
31+
Use Japanese characters, requires appropriate font
32+
.It Fl C Ar color
33+
.Sq Ar green
34+
Use one of the eight
35+
.Ar color Ns s in the table below
36+
.It Fl f
37+
Force the
38+
.Va $TERM
39+
type to be on
40+
.It Fl h , Fl \&?
41+
Print usage and exit
42+
.It Fl k
43+
Change characters while scrolling, cannot combine with
44+
.Fl o
45+
.It Fl l
46+
Linux mode, use matrix console font
47+
.It Fl L
48+
Lock mode, can be
49+
.Xr kill 1 Ns ed
50+
from another terminal
51+
.It Fl m
52+
Lambda mode, every character becomes a lambda
53+
.It Fl M Ar message
54+
Add centered
55+
.Ar message
56+
overriding
57+
.Fl L Ns Ap s
58+
default
59+
.It Fl n
60+
No bold characters, overrides
61+
.Fl b
62+
and
63+
.Fl B
64+
.It Fl o
65+
Use old-style scrolling
66+
.It Fl r
67+
Rainbow mode, rainbow colored characters
68+
.It Fl s
69+
Screensaver mode, exits on first keystroke
70+
.It Fl t Ar tty
71+
Set tty to use
72+
.It Fl u Ar delay
73+
.Sq Ar 4
74+
Screen update delay
75+
.Ar 0 Ns Pf - Ar 9
76+
.It Fl V
77+
Print version information and exit
78+
.It Fl x
79+
X window mode, use if your
80+
.Xr xterm 1
81+
is using mtx.pcf
82+
.El
83+
.Pp
84+
The following keystrokes are available during execution:
85+
.Pp
86+
.Bl -tag -width "! @ # $ % ^ & *" -compact
87+
.It Ic "! @ # $ % ^ & *"
88+
Switch scheme to corresponding
89+
.Ar color :
90+
.Pp
91+
.TS
92+
aw10 aw10.
93+
! red @ green
94+
# yellow $ blue
95+
% magenta ^ cyan
96+
& white * black
97+
.TE
98+
.Pp
99+
.It Ic 0 Ns Pf - Ic 9
100+
Set update delay
101+
.It Ic a
102+
Toggle asynchronous scroll
103+
.It Ic b
104+
Random bold characters
105+
.It Ic B
106+
All bold characters
107+
.It Ic m
108+
Lambda mode
109+
.It Ic n
110+
Turn off bold characters
111+
.It Ic p , Ic P
112+
Pause
113+
.It Ic q
114+
Quit
115+
.It Ic r
116+
Rainbow mode
117+
.El
118+
.Sh EXAMPLES
119+
Interactive mode with asynchronous, partially-bold, red rain:
120+
.Dl $ cmatrix -ab -C red -u 2
121+
.Pp
122+
Interactive mode with asynchronous, partially-bold and Japanese rain:
123+
.Dl $ cmatrix -abc
124+
.Pp
125+
Screensaver mode emulating the classic from Windows/Mac:
126+
.Dl $ cmatrix -os
127+
.Pp
128+
Most realistic emulation of original movie:
129+
.Dl $ cmatrix -abcl
130+
.Sh SEE ALSO
131+
.Xr kill 1 ,
132+
.Xr xterm 1 ,
133+
.Xr ncurses 3
134+
.Pp
135+
.Lk http://www.github.com/abishekvashok/cmatrix Homepage
136+
.Sh HISTORY
137+
The
138+
.Nm
139+
utility was originally written by
140+
.An Chris Allegretta Aq Mt [email protected]
141+
for Linux in 1999.
142+
.Sh CAVEATS
143+
This is a fan made project, the Matrix movie is owned by completely
144+
unrelated trademark holders.
145+
.Sh BUGS
146+
The color black does not work.

0 commit comments

Comments
 (0)