-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathslterm.1
433 lines (421 loc) · 12.9 KB
/
slterm.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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
.\" Man page generated from reStructuredText.
.
.TH SLTERM "" "" ""
.SH NAME
slterm \-
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.sp
(sl)im (term)inal
.SH SYNOPSIS
.sp
\fBslterm\fP \fB\-I\fP \fB\-H\fP \fB\-L\fP \fB\-h\fP
.sp
\fBslterm\fP [\fB\-aivVx\fP] [\fB\-c\fP \fIclass\fP] [\fB\-f\fP \fIfont\fP] [\fB\-g\fP \fIgeometry\fP]
[\fB\-n\fP \fIname\fP] [\fB\-o\fP \fIiofile\fP] [\fB\-T\fP \fItitle\fP] [\fB\-t\fP \fItitle\fP]
[\fB\-l\fP \fIline\fP] [\fB\-w\fP \fIwindowid\fP] [\fB\-X\fP]
[[\fB\-e\fP] \fIcommand\fP] [\fIarguments\fP\&...]]
.sp
\fBslterm\fP [\fB\-aivVx\fP] [\fB\-c\fP \fIclass\fP] [\fB\-f\fP \fIfont\fP] [\fB\-g\fP \fIgeometry\fP]
[\fB\-n\fP \fIname\fP] [\fB\-o\fP \fIiofile\fP] [\fB\-T\fP \fItitle\fP] [\fB\-t\fP \fItitle\fP]
[\fB\-w\fP \fIwindowid\fP] \-l \fIline\fP [\fIstty_args\fP\&...]
.sp
\fBslterm\fP [\-f regularfont] [\-fb boldfont] [\-fi italicfont] [\-fbi bolditalicfont]
[\-fw fontwidth] [\-fh fontheight] [cmd ...]
.SH DESCRIPTION
.sp
\fBslterm\fP is a virtual terminal emulator for X
.sp
slterm is highly optimized for fast text output and slim memory usage,
while having several addons like switchable codepages or advanced
history browsing.
.sp
The focus is on stability and performance, for tabs or split screen I suggest to use
either screen/tmux or i3/dmux/tabbed.
.sp
In favor of compatibility with terminal programs and performance utf8
support is stripped. Communication with the x clipboard is however
automatically converted from and to utf8.
.SH USAGE
.INDENT 0.0
.TP
.B \fBCtrl+F1\fP
Show a help screen with all shortcuts.
.UNINDENT
.sp
The usage of slterm differs to other terminal emulators by its three different main modes.
.SS normalmode
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
The codepage can be changed via hotkeys. (\(gaCtrl+Shift+0..9\(ga).
Paste from the clipbard with \(gaShift+Insert\(ga.
Set Bookmarks to the current line with \(gaCtrl+Shift+0..9\(ga
Scroll back to a bookmark with \(gaCtrl+0..9\(ga
Retmarks are atomatically stored, and can be browsed to later.
Every time, a command is entered with return, a retmark is stored.
Switch into lessmode, and browse to the location of the
last entered command with \(gaShift+backspace\(ga.
\(gaCtrl+Shift\(ga + \(gaUp\(ga/\(gaDown\(ga/\(gaPageUp\(ga/\(gaPageDown\(ga switch to lessmode.
.ft P
.fi
.UNINDENT
.UNINDENT
.SS lessmode
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
In lessmode it is possible to browse the scrollback buffer via
the standard less like keybindings.
\(gaAlt+Shift Up/Down/PgUp/PdDown\(ga enter lessmode
\(gaShift+Backspace\(ga enters lessmode and browses back to the last line,
a command has been entered.
In lessmode, it is possible to browse between the marks of commands,
comfirmed with \(gaEnter\(ga in the shell via \(gaBackspace\(ga/\(gaTab left\(ga
and \(gaTab\(ga.
\(ga1\(ga to \(ga9\(ga scroll back to the according numbered retmark.
\(gaShift+Enter\(ga in Normal mode enters lessmode, if the output
of a command is more than a screen.
\(gaq\(ga leaves lessmode and switches to normalmode again.
.ft P
.fi
.UNINDENT
.UNINDENT
.SS selectionmode
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
In selection mode it is possible to select lines or areas
(either by lines, or rectangular areas).
enter with \(gaAlt+S\(ga, start selecting with \(gav\(ga, \(gas\(ga or
\(gaV\(ga (rectangular selection) and the cursor keys,
switch between rectangular selection and line selection with \(gat\(ga,
copy to the clipboard with \(gaEnter\(ga.
\(gay\(ga selects the current line, \(gay\(ga with a active selection yanks the
selection to the clipboard and exits selection mode,
\(gayy\(ga (sort of vim binding) selects the current line
and yanks it to the clipboard.
\(gap\(ga copies the selection and pastes it into the terminal.
\(gaq\(ga or \(gaESC\(ga exit selection mode.
.ft P
.fi
.UNINDENT
.UNINDENT
.SS all modes
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
Ctrl+Shift + I: Inverse colors
Ctrl+F1: Show this help
Set font width/size:
Ctrl+Shift + Insert/Delete: Enlarge/Shrink width
Ctrl+Shift + Home/End: Enlarge/Shrink height
Ctrl+Shift + PageUp/PageDown: Zoom in / out
Ctrl+Shift + Backspace: Reset font display
Select Codepage: \(gaCtrl+Win\(ga +
0 CP1250
1 CP1251
2 CP1252 this is mostly ANSI, and the 1. page of Unicode
3 CP1253
4 CP437 Old IBM codetable, borders and tables
5 CP850 DOS Standard table
6 CP4002 Custom table, mix of 1252 and 437,
with German umlauts and box drawing chars
.ft P
.fi
.UNINDENT
.UNINDENT
.SH TERMINAL
.sp
slterm is mostly VT100 compatible, please look in question for the according manuals.
Here only some of the vt100 or slterm additions are described.
.sp
slterm starts either the env variable SHELL, /bin/sh, or a command supplied with
\fIslterm [\-e] command options\fP\&.
.sp
All \fIoptions\fP are forwarded to command without changes.
.sp
The already set environmental variables are kept,
further variables are exported into the environment:
.sp
COLUMNS, LINES, TERMCAP, LOGNAME, USER, SHELL, HOME, TERM.
.sp
Color Ansi escapesequences are set.
.SS Colors
.sp
The basic 8 colors, accessable in the shell as:
$BLACK, $RED, $GREEN, $YELLOW, $BLUE, $MAGENTA, $CYAN, $WHITE.
.sp
\fIecho $RED red text\fP
.sp
They can be combined with prefixes: L(ight), D(ark), LD(light\-dark), BG(background), BGL(ight background).
Example: $LGREEN, D: $DRED, $LD: $LDCYAN, BG: $BGBLUE, BGLCYAN.
.sp
These Colors cannot be combined: ORANGE, ORANGERED, BROWN, BGBROWN, PURPLE, GRAY, MINT, TURQUOISE
.sp
Other text attributes are: $BOLD, $FAINT, $CURSIVE, $UNDERLINE, $BLINK, $REVERSE, $STRIKETHROUGH, $DOUBLEUNDERLINE.
.sp
The text attributes can be combined, with some special combinations:
BLINK and REVERSE blinks by reversing colors.
STRIKETHROUGH and UNDERLINE get a double underline.
.sp
The default foreground and background color and attributes can be reset with $NORMAL.
.sp
255 Colors can be set with:
.INDENT 0.0
.IP \(bu 2
foreground: echo \-e "e[38;5;XXm", XX one of 0 \- 255.
.IP \(bu 2
background: echo \-e "e[48;5;XXm", XX one of 0 \- 255.
.UNINDENT
.SS Cursor
.sp
There are several cursor shapes, set with: echo \-e "e[X q".
X one of 0..12:
.INDENT 0.0
.IP \(bu 2
1,2: block cursor
.IP \(bu 2
3,4: underline
.IP \(bu 2
5,6: vertical bar
.UNINDENT
.SS slterm additions:
.INDENT 0.0
.IP \(bu 2
7: \(aqX\(aq
.IP \(bu 2
7;Y: Y is the ascii code of the char, used as cursor
.IP \(bu 2
8: double underline
.IP \(bu 2
9: empty block
.IP \(bu 2
10: underline, two lines at the sides
.IP \(bu 2
11: underline and overline, lines right and left
.IP \(bu 2
12: overline, lines right and left
.UNINDENT
.SS Bell
.sp
Sending a bell to the terminal (echo \-e "007") sends
the according notification (XBell) to the window manager.
.SH INSTALL
.sp
If obtained from source, edit the files config.make and config.h
to customize slterm. Type \fImake\fP, and \fImake install\fP\&.
.sp
If you downloaded the statically linked binary,
.INDENT 0.0
.IP 1. 3
copy the binary to a suitable place (/usr/local/bin)
.IP 2. 3
install the terminal info file: (for curses) \fIslterm \-I | tic \-sx \-\fP
( the netbsd version of tic, the terminal info compiler, is supplied as source in
tools/tic, and should be compatible with other curses versions )
.IP 3. 3
If needed, download this man page in its man format (slterm.1)
from github (github.com/michael105/slterm),
copy into the appropiate directory (/usr/local/share/man/man1)
.UNINDENT
.sp
Interestingly, the statically linked binary seems to use even less memory
than the shared binary.
.SS CURSES
.INDENT 0.0
.INDENT 3.5
To be used with curses, the installation of the terminfo database file is needed.
slterm.terminfo is supplied in the sources, within the folder src.
It can be installed with \fItic \-sx slterm.terminfo\fP\&.
Alternatively, the termcap database "linux" is mostly compatible.
Set with \fIexport TERM=linux\fP
.sp
The terminfo database of slterm is also displayed, when slterm was compiled with
EMBEDRESOURCES. Type \fIslterm \-I\fP, to install: \fIslterm \-I | tic \-sx \-\fP\&.
The key combination \fICtrl+Shift+Win+ALT+I\fP will dump the terminal info to
the terminal as well, and can be used, to install the terminal info within
a remote shell. ( type \fItic \-sx \-\fP, hit \fICtrl+Shift+Win+Alt+I\fP, and \fICtrl+D\fP )
.sp
Tic is the terminfo compiler, available from the curses distributions,
the netbsd tic implementation is supplied within tools/tic.
There is a statically linked binary for linux, 64bit of tic at
github.com/michael105/static\-bin
Sources of tic and netbsd curses: github.com/oasislinux/netbsd\-curses/
.UNINDENT
.UNINDENT
.SH OPTIONS
.sp
\-h show short option usage
.sp
\-H Display this manpage as text
.sp
\-L show license
.INDENT 0.0
.TP
.B \-a
disable alternate screens in terminal
.TP
.BI \-c \ class
defines the window class (default $TERM).
.TP
.BI \-f \ font
defines the font to use when slterm is run.
example: slterm \-f \(aqLiberation Mono:Bold:pixelsize=13:antialias=true:autohint=true\(aq
the parameters are described in the fontconfig documentation,
an overview is supplied in doc/fontconfig.txt
.UNINDENT
.INDENT 0.0
.TP
.B \-fb boldfont \-fi italicfont \-fI bolditalicfont
Set bold/italic/bolditalic fonts.
Supply \(aq0\(aq to disable the according font and to display
the text attributes by color changes only
.TP
.B \-fh fontheight
Set the char height in pixel
.TP
.B \-fw fontwidth
Set the char width in pixel
.UNINDENT
.INDENT 0.0
.TP
.BI \-g \ geometry
defines the X11 geometry string. The form is
[=][<cols>{xX}<rows>][{+\-}<xoffset>{+\-}<yoffset>]. See
XParseGeometry (3) for further details.
.TP
.B \-i
will fixate the position given with the \-g option.
.TP
.BI \-n \ name
defines the window instance name (default $TERM).
.TP
.BI \-o \ iofile
writes all the I/O to iofile. This feature is useful when recording
slterm sessions. A value of "\-" means standard output.
.TP
.BI \-T \ title
defines the window title (default \(aqslterm\(aq).
.TP
.BI \-t \ title
defines the window title (default \(aqslterm\(aq).
.TP
.BI \-w \ windowid
embeds slterm within the window identified by windowid
.TP
.BI \-l \ line
use a tty line instead of a pseudo terminal. 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
stty(1). By default slterm 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 (e.g. \(aqslterm \-l /dev/ttyS0 115200\(aq).
Arguments before the last one are stty(1) flags. If you want to
set odd parity on 115200 baud use for example \(aqslterm \-l /dev/ttyS0
parenb parodd 115200\(aq. Set the number of bits by using for example
\(aqslterm \-l /dev/ttyS0 cs7 115200\(aq. See stty(1) for more arguments and
cases.
.TP
.B \-v
prints version information, then exits.
.TP
.B \-V
prints version and compile information, then exits
.UNINDENT
.INDENT 0.0
.TP
.B \-e command [ arguments ... ]
slterm executes command instead of the shell. If this is used it 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.
.UNINDENT
.INDENT 0.0
.TP
.B \-x
enable reading of the XResources database for the configuration
slterm must had been compiled with the XRESOURCES flag in config.make set to 1
.TP
.B \-X
lock all memory pages into memory, prevent swapping.
Secrets could be revealed, also years later, if the memory
is swapped to disk. Worse, with flash disks also erasing
the contents will not necessarily erase the written cells.
This option locks all memory pages into ram.
.UNINDENT
.SH AUTHORS
.sp
(2020\-2025) Michael (misc147), www.github.com/michael105
.sp
The code is based on st, the suckless terminal emulator,
fetched from git 1.1.2020, which was originally written by Aurelien Aptel.
.sp
The included patches to st had been provided by:
.sp
Tonton Couillon,
dcat,
Jochen Sprickerhof,
M Farkas\-Dyck,
Ivan Tham,
Ori Bernstein,
Matthias Schoth,
Laslo Hunhold,
Paride Legovini,
Lorenzo Bracco,
Kamil Kleban,
Avi Halachmi,
Jacob Prosser,
Augusto Born de Oliveira,
Kai Hendry,
Laslo Hunhold,
Matthew Parnell,
Doug Whiteley,
Aleksandrs Stier,
Devin J. Pohly,
Sai Praneeth Reddy
.SH LICENSE
.sp
MIT, see the LICENSE file for the terms of redistribution or type slterm \-L
.SH SEE ALSO
.sp
\fBi3\fP(1), \fBdwm\fP(1), \fBscreen\fP(1), \fBtmux\fP (1),
\fBtabbed\fP(1), \fButmp\fP(1), \fBstty\fP(1)
.SH BUGS
.sp
See the README in the distribution.
.\" Generated by docutils manpage writer.
.