Skip to content

Commit 7f9f5dc

Browse files
committed
Doc: Manual, usage, and logic cleanup
- cmatrix.1 > cmatrix.6 (other screensavers seem filed as games) - rewrite manual in mdoc(7) according to its best practices - write document description for visibility in manual searches - maintain synopsis, options, and keystrokes (consisency, organization, nits) -do this in cmatrix.c usage for consistency - do this in cmatrix.c logic for maintainability - write vendor neutral description of the program - add EXAMPLES including updated readme and vendor neutral examples - add SEE ALSO, including homepage as well as relevant manual pages - add HISTORY mentioning original author, date, and vendor - add CAVEATS mentioning trademarks - revise BUGS, black doesn't work, and cmatrix no longer has high utilization Fixes: #87, #105, and #162
1 parent 5c082c6 commit 7f9f5dc

File tree

5 files changed

+235
-184
lines changed

5 files changed

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

0 commit comments

Comments
 (0)