forked from pipeseroni/pipes.sh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipes.sh.6
255 lines (230 loc) · 4.99 KB
/
pipes.sh.6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
.\" Manpage for pipes.sh
.\" Report errors or typos to https://github.com/pipeseroni/pipes.sh
.TH pipes.sh 6 "25 Feb 2018" "1.3.0" "pipes.sh man page"
.SH NAME
pipes.sh \- animated pipes terminal screensaver
.SH SYNOPSIS
.B pipes.sh
[\fIOPTION\fR]...
.SH DESCRIPTION
A bash script which draws randomly pathed pipes over the terminal. Generally used either as a functional screensaver or for amusement.
.SH OPTIONS
.TP 5
.B -p [1-]
Number of pipes. (default is 1)
.TP
.B -t [0-9]
Determines the type of pipes to be drawn. Multiple arguments can be used. (default is 0)
Due to the manpage limitation, the following list describes types in text,
please see
.UR https://github.com/pipeseroni/pipes.sh#-t--pipe-types
README
.UE
for actual Unicode characters and screenshots.
.RS
.TP
.B -t 0
"BOX DRAWING HEAVY"
.TP
.B -t 1
"BOX DRAWING LIGHT" and "BOX DRAWING LIGHT ARC"
.TP
.B -t 2
"BOX DRAWING LIGHT"
.TP
.B -t 3
"BOX DRAWING DOUBLE"
.TP
.B -t 4
"|+ ++-+ +|++ +-"
.TP
.B -t 5
"|/ \\/-\\ \\|/\\ /-"
.TP
.B -t 6
".. .... .... .."
.TP
.B -t 7
".o oo.o o.oo o."
.TP
.B -t 8
"-\\ /\\|/ /-\\/ \\|" (railway)
.TP
.B -t 9
"BOX DRAWING HEAVY AND LIGHT" (knobby)
.RE
.TP
.B -t c[16 chars]
Use custom type of pipes.
The following table describes the order of characters and what they represent.
Four of the characters are not applicable as the pipes does not perform a
180-turn.
.RS
.TP
.B Index
Going
.TP
.B 1
Straight up
.TP
.B 2
Up and going right
.TP
.B 3
Not applicable (up and back down), use space
.TP
.B 4
Up and going left
.TP
.B 5
Right and going up
.TP
.B 6
Stright right
.TP
.B 7
Right and going down
.TP
.B 8
Not applicable (right and back left), use space
.TP
.B 9
Not applicable (down and back up), use space
.TP
.B 10
Down and going right
.TP
.B 11
Straight down
.TP
.B 12
Down and going left
.TP
.B 13
Left and going up
.TP
.B 14
Not applicable (left and back right), use space
.TP
.B 15
Left and going down
.TP
.B 16
Straight left
.RE
.TP
.B -c [0-(COLORS-1)]
Color index of pipes. Multiple arguments can be used. (default is 1 2 3 4 5 6 7
0)
\fICOLORS\fR is the available colors depending on \fB$TERM\fR capability. For
examples, \fBxterm\fR has 8 colors, \fBxterm-256color\fR has 256 colors, and
\fBxterm-direct\fR -- requires ncurses 6.1+ -- has 16,777,216 colors.
The color index is used to generate escape code using \fBtput setaf
color_index\fR.
For 256 colors, you may use 0 to 255 as color index. For 16,777,216 colors,
the index can be calculated with three color components, R * 65536 + G * 256 +
B (0 <= R, G, B < 256).
You can also use hexadecimal, for examples:
.RS 8
.TP 12
-c\fB#ffff\fR
# cyan color
.TP
-c\fB#FFA500\fR
# orange color
.TP
-c\fB#64\fR
# for 256color index 100
.RE
.RS
See also
.UR https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
Wikipedia
.UE .
.RE
.TP
.B -f [20-100]
Frame rate. (default is 75)
.TP
.B -s [5-15]
Probability of straight fitting. (default is 13)
.TP
.B -r [LIMIT]
Resets the drawing after [LIMIT] characters. If no limit is specified then it takes the value 0. (default is 2000)
.TP
.B -R
Randomize starting position and direction.
.TP
.B -B
No bold effect.
.TP
.B -C
No color.
.TP
.B -K
No change of colors and types when hitting screen edges.
.TP
.B -h
Displays a help message.
.TP
.B -v
Prints the version number.
.SH KEYBOARD CONTROLS
Press any key to quit pipes.sh, except the following \fBShift\fR + \fBKey\fR:
.TP
\fBP\fR / \fBO\fR
Increase/decrease probability of straight pipes
.TP
\fBF\fR / \fBD\fR
Increase/decrease frame rate
.TP
.B B
Toggle bold effect
.TP
.B C
Toggle no colors
.TP
.B K
Toggle keeping pipe color and type when crossing edges
.SH HISTORY
\fIpipes.sh\fR was originally created by Matthew Simpson and posted to the
.UR https://bbs.archlinux.org/viewtopic.php?pid=728932#p728932
Arch Linux Forums
.UE
in early 2010. It was also later posted to
.UR https://gist.github.com/msimpson/1096939
Gist
.UE
released in the public domain.
In early 2013, Yu-Jie Lin posted a modification of the script to Gist after
reading about it on a
.UR https://inconsolation.wordpress.com/2013/02/01/pipes-sh-a-little-bit-of-fun/
blog
.UE .
It was maintained on Gist independently for a period of a few months.
In 2014, the script was given its own GitHub repository as a project which
encouraged contributions from other developers. As the project gained more
popularity the decision was made to combine forces with developers of similar
projects.
Finally in 2015, the MIT License was added and the Pipeseroni collective was
formed (see \fBLINKS\fR below) to maintain the project.
.SH LINKS
.UR https://pipeseroni.github.io/
\fBWebsite\fR
.UE
.UR https://github.com/pipeseroni/pipes.sh
\fBRepository\fR
.UE
.SH BUGS
Please see current issues on
.UR https://github.com/pipeseroni/pipes.sh/issues
issue tracker
.UE ,
and report any bugs or request feature you'd like.
.SH AUTHORS
.UR https://github.com/pipeseroni/pipes.sh/graphs/contributors
Pipeseroni/pipes.sh contributors
.UE .
.SH COPYRIGHT
Copyright (c) 2010-2018 Pipeseroni/pipes.sh contributors.
\fIpipes.sh\fR is licensed under the MIT License, see LICENSE file.