-
Notifications
You must be signed in to change notification settings - Fork 0
/
st.1
376 lines (376 loc) · 9.11 KB
/
st.1
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
.\" st(1) manual page
.\" See LICENSE file for copyright and license details.
.Dd September 12, 2023
.Dt ST 1
.Os
.\" ==================================================================
.Sh NAME
.Nm st
.Nd simple terminal emulator for X
.\" ==================================================================
.Sh SYNOPSIS
.Nm
.Op Fl aiv
.Op Fl c Ar class
.Op Fl f Ar font
.Op Fl g Ar geometry
.Op Fl n Ar name
.Op Fl o Ar iofile
.Op Fl T Ar title
.Op Fl t Ar title
.Op Fl l Ar line
.Op Fl w Ar windowid
.Oo
.Op Fl e
.Ar command
.Op Ar arguments ...
.Oc
.Nm
.Op Fl aiv
.Op Fl c Ar class
.Op Fl f Ar font
.Op Fl g Ar geometry
.Op Fl n Ar name
.Op Fl o Ar iofile
.Op Fl T Ar title
.Op Fl t Ar title
.Op Fl w Ar windowid
.Fl l Ar line
.Op Ar stty_args ...
.\" ==================================================================
.Sh DESCRIPTION
.Nm
is a simple terminal emulator for X.
.\" *** Options description: ***
.Pp
The options are as follows:
.Pp
.Bl -tag -width Ds -compact
.\" *** -a
.It Fl a
Disable alternate screens in terminal.
.\" *** -c class
.Pp
.It Fl c Ar class
Define the window class (default $TERM).
.\" *** -f font
.Pp
.It Fl f Ar font
Define the
.Ar font
to use when
.Nm
is run.
.\" *** -g geometry
.Pp
.It Fl g Ar geometry
Define the X11 geometry string.
The form is
.Dq [=][<cols>{xX}<rows>][{+-}<xoffset>{+-}<yoffset>] .
See
.Xr XParseGeometry 3
for further details.
.\" *** -i
.Pp
.It Fl i
Fixate the position given with the
.Fl g
option.
.\" *** -n name
.Pp
.It Fl n Ar name
Define the window instance name (default $TERM).
.\" *** -o iofile
.Pp
.It Fl o Ar iofile
Write all the I/O to
.Ar iofile .
This feature is useful when recording
.Nm
sessions.
A value of
.Ql \&-
means standard output.
.\" *** -T title
.Pp
.It Fl T Ar title
.It Fl t Ar title
Define the window title
.Pq Dq st .
.\" *** -w windowid
.Pp
.It Fl w Ar windowid
Embed
.Nm
within the window identified by
.Ar windowid .
.\" *** -l line
.Pp
.It Fl l Ar line
Use a tty
.Ar line
instead of a pseudo terminal.
.Ar line
should be a (pseudo-)serial device (e.g. /dev/ttyS0 on Linux for
serial port 0).
When this flag is given remaining arguments are used as flags for
.Xr stty 1 .
By default
.Nm
initializes the serial line to 8 bits, no parity, 1 stop bit and a
38400 baud rate.
The speed is set by appending it as last argument
.Po
.Dq st -l /dev/ttyS0 115200
.Pc .
Arguments before the last one are
.Xr stty 1
flags.
If you want to set odd parity on 115200 baud use for example
.Dq st -l /dev/ttyS0 parenb parodd 115200 .
Set the number of bits by using for example
.Dq st -l /dev/ttyS0 cs7 115200 .
See
.Xr stty 1
for more arguments and cases.
.\" *** -v
.Pp
.It Fl v
Print version information to stderr, then exits.
.\" *** -e command [arguments ...]
.Pp
.It Fl e Ar command Op arguments ...
Execute
.Ar command
instead of the shell.
If this is used it
.Sy must be the last option
on the command line, as in xterm / rxvt.
This option is only intended for compatibility, and all the remaining
arguments are used as a command even without it.
.El
.\" ==================================================================
.Ss Shortcuts
.\" *** Shortcuts description: ***
.Bl -tag -width Ds
.\" Break
.It Sy Break
Send a break in the serial line.
Break key is obtained in PC keyboards pressing at the same time
control and pause.
.\" Ctrl-PrintScreen
.It Sy Ctrl-PrintScreen
Toggle if st should print to the
.Ar iofile .
.\" Shift-PrintScreen
.It Sy Shift-PrintScreen
Print the full screen to the
.Ar iofile .
.\" PrintScreen
.It Sy PrintScreen
Print the selection to the
.Ar iofile .
.\" Ctrl-Shift-PageUp
.It Sy Ctrl-Shift-PageUp
Increase font size.
.\" Ctrl-Shift-PageDown
.It Sy Ctrl-Shift-PageDown
Decrease font size.
.\" Ctrl-Shift-Home
.It Sy Ctrl-Shift-Home
Reset to default font size.
.\" Ctrl-Shift-y
.It Sy Ctrl-Shift-y
Paste from primary selection (middle mouse button).
.\" Ctrl-Shift-c
.It Sy Ctrl-Shift-c
Copy the selected text to the clipboard selection.
.\" Ctrl-Shift-v
.It Sy Ctrl-Shift-v
Paste from the clipboard selection.
.El
.\" ==================================================================
.Ss Vim-Browse Shortcuts
The vim-browse patch offers the possibility to move through the
terminal history-buffer, search for strings and use VIM-like motions,
operations and quantifiers.
.Pp
It operates on top of the history-patch, which comes with a set of
optional features that can be compiled-in as separate patches.
It is possible to move through terminal history while an application
currently writes to the terminal buffer and comes with an overlay
highlighting the current search results on screen and showing current
operation / motions / search string.
.Pp
.\" *** Shortcuts description: sublist start ***
.Bl -tag -width Ds -compact
.\" ------------------------------------------------------------------
.It Sy Enter/Leave Different modes
.\" ****** Enter/Leave Different modes: sublist start.
.Bl -tag -width Ds
.\" ********* Alt-c
.It Sy Alt-c
Enter normal mode (give input control to the vim/history patch).
.\" ********* Escape, Enter, i
.It Sy Escape , Enter , i
Enter insert mode
.Po
return control back to
.Nm
.Pc
and abort resp. terminate operation.
.Pp
Operation/Motion active (see below): yes.
.\" ********* Escape, Enter
.It Sy Escape , Enter
Abort resp. terminate the current operation / motion.
.Pp
Operation/Motion active (see below): no.
.El
.\" ****** Enter/Leave Different modes: sublist end.
.\" ------------------------------------------------------------------
.It Sy Operations
.\" ****** Operations: sublist start.
.Bl -tag -width Ds
.\" ********* y
.It Sy y
Yank mode (yank 'till the next motion).
Terminated via a motion or as described above.
.\" ********* v
.It Sy v
Visual mode (start selection of characters in REGULAR mode, that can
be toggled to RECTANGULAR selection mode via motion t).
Terminated by yanking or as described above.
.\" ********* V
.It Sy V
Visual line mode (start selection of entire lines).
Terminated by yanking or as described above.
.El
.\" ****** Enter/Leave Different modes: sublist end.
.\" ------------------------------------------------------------------
.It Sy Motions
.\" ****** Motions: sublist start
.Bl -tag -width Ds
.\" ********* [0-9]
.It Sy [0-9]
Quantifier.
.\" ********* i, a
.It Sy i , a
Inner / around
.Po
used for motions like
.Sy yiw
.Pq [operation]{i/a}{w/W/}/}/[/]/(/)/"/'
.Pc
Matching parenthesis is not as sophisticated as in vim.
.Pp
Operation active: yes.
.\" ********* Backspace
.It Sy Backspace
Remove last-inserted character from search string / quantifier.
.\" ********* .
.It Sy \&.
Reexecute last command.
.\" ********* c
.It Sy c
Clear search string, last command.
.\" ********* r
.It Sy r
Manual repaint.
.\" ********* /, ?
.It Sy \&/ , \&?
Start forward / backward search.
.\" ********* K, J
.It Sy K , J
Scroll buffer up / down.
.\" ********* k, j
.It Sy k , j
Move cursor up / down.
.\" ********* h, l
.It Sy h , l
Move cursor left / right.
.\" ********* H, M, L
.It Sy H , M , L
Move cursor to first line, center, last line on screen.
.\" ********* s
.It Sy s
Toggle MODE_ALTSCREEN (e.g. if vim/htop are currently running, press
.Sy s
in order to go to the history buffer filled by previous commands.
.\" ********* S
.It Sy S
Toggle MODE_ALTSCREEN once.
.\" ********* G
.It Sy G
Move (history) cursor to the current insert cursor.
.\" ********* g
.It Sy g
Move (history) scroll offset to the offset of the insert-cursor.
.\" ********* 0, $
.It Sy 0 , \&$
Move cursor to the begin / end of the current line.
.\" ********* t
.It Sy t
Toggle visual select mode.
.Pp
Operation active: visual.
.\" ********* n, N
.It Sy n , N
Move cursor to the next / previous occurrence of the search string.
.\" ********* w, W
.It Sy w , W
Move cursor to the beginning of the next word (with different word
delimiters).
.\" ********* b, B
.It Sy b , B
Move cursor to the beginning of the previous word.
.\" ********* e, E
.It Sy e , E
Move cursor to the next word-end.
.\" ********* Ctrl-u, Ctrl-d
.It Sy Ctrl-u , Ctrl-d
Scroll buffer half a screen up / down.
.\" ********* Ctrl-b, Ctrl-f
.It Sy Ctrl-b , Ctrl-f
Move cursor to the first / last line on the screen and scroll the
buffer up / down.
.\" ********* y
.It Sy y
Yank selection.
.Pp
Operation active: yank.
.\" ********* Ctrl-h
.It Sy Ctrl-h
Hide cursor.
.El
.\" ****** Motions: sublist end.
.\" ------------------------------------------------------------------
.El
.\" *** Shortcuts: sublist end.
.Pp
Custom commands can be added to the variable
.Sy nmKeys
in the config.def.h combining the aforementioned commands.
.\" ==================================================================
.Sh CUSTOMIZATION
.Nm
can be customized by creating a custom config.h file and (re)compiling
the source code.
This keeps it fast, secure and simple.
.\" ==================================================================
.Sh SEE ALSO
.Xr scroll 1 ,
.Xr stty 1 ,
.Xr tabbed 1 ,
.Xr utmp 1
.\" ==================================================================
.Sh AUTHORS
See the LICENSE file for the authors.
.\" ==================================================================
.Sh LICENSE
See the LICENSE file for the terms of redistribution.
.\" ==================================================================
.Sh BUGS
See the TODO file in the distribution.
.\" vim: cc=72 tw=70
.\" End of file.