190 Commits
0.1 ... 0.3

Author SHA1 Message Date
df62d3dab8 0.3 release. 2012-11-02 20:08:27 +01:00
d92ad64017 Make it possible to use the corefont font description too. It is not very
useful, but easy to implement.
2012-11-02 20:07:11 +01:00
dcf0955466 Moving to the dwm config.h variable usage. 2012-11-02 19:56:02 +01:00
48389be574 Adding a FAQ to reference utmp(1). 2012-10-31 20:36:32 +01:00
d84e2978c2 Cleaning up the TODO file. 2012-10-31 20:35:07 +01:00
cb9d92ce51 Removing the now senseless comment in config.def.h. Thanks to bnwe! 2012-10-28 14:13:39 +01:00
32173a11b4 Applying the patch of the little girl <yui@blekksprut.net> to make cjk input
possible. Thanks!
2012-10-28 13:37:11 +01:00
7168d85f97 Applying the tab expansion patch from koga. 2012-10-28 13:35:00 +01:00
53eda6d525 Adding a more flexible fontstring handling, shortcuts and a zoom function. 2012-10-28 13:25:53 +01:00
91804d7227 Applying the patch of Roberto Caballero to set WINDOWID and all the pwuid()
variables. Thanks! xinit() and ttynew() had to be switched in their
call-appearance. Otherwise xw.win is not set.
2012-10-28 06:54:08 +01:00
4abecf9ce4 Applying the patch of Rafa Garcia Gallega <rafael.garcia.gallego@gmail.com> to
not emulate the vt100 behaviour of selecting all whitespaces. Thanks!
2012-10-28 06:32:54 +01:00
5de1468554 Add error control to iofile
write can write less bytes than we request, so it is necessary check the
return value, in case of error print a message and don't continnue writing
in the file.
---
 st.c |   39 ++++++++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 9 deletions(-)
2012-10-28 06:27:42 +01:00
ab40392d08 Well, I was confused. Damn state exams. Instead of discussing this shit I
should really learn opthalmology instead. :O
2012-10-09 19:40:37 +02:00
fa952e1901 If there is really someone without SHELL set, help him/her. 2012-10-09 19:33:26 +02:00
5967a7c0db Add DEC alignment test
This sequence was used by DEC personal in to for verifying the screen adjust
of terminals. It is the unique test sequence implemented by all the
emulators, and I think it is because they want be conforms with vttest which
uses this sequence in some tests.
---
 st.c |   31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)
2012-10-07 11:06:17 +02:00
d627351429 Avoid initialization of vt100_0 in each call to tsetchar
If vt100_0 is a automatic variable then it is initializated in each call to
tsetchar, but if the variable is static it is initializated only in compile
time.
---
 st.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2012-10-07 11:06:08 +02:00
976b34d1fc Fix Identification sequences
Do not send NUL character in the identification (use (sizeof(VT102ID) - 1),
and finish  the sequence once you execute it.
---
 st.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
2012-10-07 11:06:00 +02:00
f0ee36878c Add DA and DECID sequences
These sequences are used by the host in order to can detect which kind of
terminal is connected. St will answer like a vt102 terminal with this patch.
---
 st.c |    9 +++++++++
 1 file changed, 9 insertions(+)
2012-10-06 21:19:56 +02:00
a90662fdcf Fixing a typo. 2012-10-06 21:02:25 +02:00
852db9e9b0 Fixing a off-by-one error in the new border clearing code. 2012-10-06 20:52:22 +02:00
a9092bc48b Print control codes only in graphic mode
Non handled codes must be ignored, except in graphic mode. Also STR
sequences have higher priority than control codes, so they must be handled
before of them.
---
 st.c |  160 ++++++++++++++++++++++++++++++++++++------------------------------
 1 file changed, 87 insertions(+), 73 deletions(-)
2012-10-06 19:15:30 +02:00
506b8ea0c6 Add SI and SO control codes
SI and SO allows change the G0 and G1 selection. This implementation is not
full vt100 compatible, but it is complatible with linux virtual terminal
implementation. For full vt100 compatibility we need remake a lot of stuff
relate to the different charmaps.
---
 st.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
2012-10-06 19:13:36 +02:00
3fce3392ac Add SUB and CAN control codes
These control codes reset any escape sequence already initialised.
---
 st.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
2012-10-06 19:13:08 +02:00
70aeaf7f2f Add documentation to control codes
Add the documentation from the vt100 manual programmer:

Control 	Octal      Action Taken
Character	Code
-------------------------------------------
NUL		000	Ignored on input (not stored in input buffer;
			see full duplex protocol).
ENQ		005	Transmit answerback message.
BEL		007	Sound bell tone from keyboard.
BS		010	Move the cursor to the left one character position,
			unless it is at the left margin,
			in which case no action occurs.
HT		011	Move the cursor to the next tab stop,
			or to the right margin if no further tab stops
			are present on the line.
LF		012	This code causes a line feed or
			a new line operation. (See new line mode).
VT		013	Interpreted as LF.
FF		014	Interpreted as LF.
CR		015	Move cursor to the left margin on the current line.
SO		016	Invoke G1 character set, as designated by SCS
			control sequence.
SI		017	Select G0 character set, as selected by ESC ( sequence.
XON		021	Causes terminal to resume transmission.
XOFF		023	Causes terminal to stop transmitted all codes
			except XOFF and XON.
CAN		030	If sent during a control sequence, the sequence is
			immediately terminated and not executed. It also causes
			the error character to be displayed.
SUB		032	Interpreted as CAN.
ESC		033	Invokes a control sequence.
DEL		177	Ignored on input (not stored in input buffer).
--------------------------------------------
---
 st.c |   28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)
2012-10-06 19:12:46 +02:00
ec9fe428b8 Forgot to remove the xclearborders() definition from the last commit. 2012-10-06 13:45:14 +02:00
82437818c5 Removing the xclearborders() hack. St now cleans up the parts of the border,
if something needs to be drawn close to it.
2012-10-06 13:43:01 +02:00
b86451bf74 The style inquisition was here. Yes, making it a unified style. The last
infidels will be squashed too!
2012-10-06 09:58:45 +02:00
b9f239abe6 Adding the patch of David Dufberg Töttrup to implement WM_DELETE_WINDOW. Thank you! 2012-10-05 22:59:08 +02:00
2549840ed7 Fixing the brightening on bold. For the 256 colors and greyscale I assumed a
reasonable solution.
2012-10-05 22:51:08 +02:00
0ddbb0c6cc Turning on antialias by default really makes it more unreadable. Maybe if once
the majority has bigger screens, this can be turned on by default again.
Thanks pancake, for the hint.
2012-10-05 11:07:55 +02:00
c1ef12591b When the drawing behaviour was changed underline was not corrected.
Thanks to Peter A. Shevtsov!
2012-10-05 09:38:10 +02:00
639104946a This adds the fontcache dependency to try something out. Additionally the
invert mode now works as expected. In the config.def.h autohint is set to
false, so the fonts are drawn correctly, without any overlapping.
2012-10-04 22:59:45 +02:00
5ef7457266 Thanks to c00kiemon5ter. Not changing bold to bright colors seems to be the
right choice.
2012-10-02 12:48:55 +02:00
b5982e284d Removing the now obsolete definitions from the config.def.h file. 2012-09-30 20:23:45 +02:00
a07db5787a This changes -f to be the parameter for the font. Now -f is -o.
The parameters were reordered according to the alphabet too.
2012-09-30 20:23:10 +02:00
4497d2125c Remove the cruft of the user to have to define the different font styles. 2012-09-30 20:10:58 +02:00
e496602135 We need all the colors to be available, so die() on some not available.
This is a new opportunity to see if X11 somewhen handled colors in a strange
way.
2012-09-29 11:23:34 +02:00
15cd4ff84a All xcolors are not Xft colors and the clearing of the borders has been
optimized. There is a speedup when resizing windows.
2012-09-29 11:17:16 +02:00
5e5c3b8cf3 Vt escape sequences allow escape sequences in escape sequences and escape
sequences, so we have to support escape sequences in escape sequences that
escape sequences in escape sequences – setting a title won't notify you
anymore.
2012-09-27 19:28:44 +02:00
bcbf5156be Allow control characters inside escape sequences
Taken from vt100 manual programmer:

	Control characters (codes \0 to \37 inclusive) are specifically
	excluded from the control sequence syntax, but may be embedded
	within a control sequence. Embedded control characters are executed
	as soon as they are encountered by the VT100. The processing of the
	control sequence then continues with the next character received.
---
 st.c |   68 +++++++++++++++++++++++++++++++++---------------------------------
 1 file changed, 34 insertions(+), 34 deletions(-)
2012-09-26 20:55:18 +02:00
18e2def342 Ignore all control characters not handled
Taken from vt100 programmer manual:

	Control characters have values of \000 - \037, and \177. The control
	characters recognized by the VT100 are shown in Table 3-10. All
	other control codes cause no action to be taken.

We have to take attention when we are using alternate charset, because in
this cases they are not used as control characters.
---
 st.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
2012-09-26 20:53:46 +02:00
1ad0b11415 Switching to Liberation Mono as default solely because of line drawing. A next
patch to fix the font symbols in all fonts should make it easier to choose a
better font.
2012-09-26 20:21:59 +02:00
23d1b03d4e Implementing line drawing right. 2012-09-26 20:21:08 +02:00
d8cf33c207 A reset should reset the line drawing too. 2012-09-25 21:39:25 +02:00
efe3937183 Enabling enacs and adding compatibility to xterm and urxvt for alternative
charsets.
2012-09-25 21:17:43 +02:00
2ca5d9463d Fix bug in tputc writing to io file
If -f options is enabled then tputc() writes all the data to a file. Actual
code assumes that all the strings in 'c' parameters have always 1 byte
length, but this is not always true, because due to utf-8 encoding some
characters can have a diferent length. So it is necessary pass string length
to tputc in order it can call to write() correctly.
---
 st.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
2012-09-25 21:04:35 +02:00
33eaeacaa4 Changing the default font to DejaVu Sans Mono, which is more appealing and
activating antialiasing.
2012-09-24 14:01:59 +02:00
d68253ec75 The xinit() call needs to be behind all the tty init, otherwise all the
allocated structures are wrong. The xclear() is now done on purpose. Please
keep X11 calls out of the way of pure tty-related calls.
2012-09-24 11:04:26 +02:00
71fc293de2 Adding a TODO for xft fallback. 2012-09-24 10:31:35 +02:00
656c43b4c7 Add some documentetion to tsetmode
The names of the terminal modes supported by vt102 are (taken from the VT220
programmer reference manual):

Table 4-7 ANSI-Standardized Modes
Name  Mnemonic		    Parameter (Ps)
Error (ignored)		    -         0 (3/0)
Keyboard action		    KAM	      2 (3/2)
Insert/replace		    IRM	      4 (3/4)
Send/receive		    SRM	      12 (3/1 3/2)
Line feed/new line	    LNM       20 (3/2 3/0)

Table 4-8 ANSI-Compatible DEC Private Modes
Name  Mnemonic		  Parameter (Ps)
Error (ignored)		  -	    0 (3/0)
Cursor key		  DECCKM    1 (3/1)
ANSI/VT52		  DECANM    2 (3/2)
Column			  DECCOLM   3 (3/3)
Scroll			  DECSCLM   4 (3/4)
Screen			  DECSCNM   5 (3/5)
Origin			  DECOM	    6 (3/6)
Auto wrap		  DECAWM    7 (3/7)
Auto repeat		  DECARM    8 (3/8)
Printer form feed	  DECPFF    18 (3/1 3/8)
Printer extent		  DECPEX    19 (3/1 3/9)
Text cursor enable	  DECTCEM   25 (3/2 3/5)
National replacement character sets DECNRCM 42 (3/4 3/2)

This patch adds a comment for each one of these sequences.
---
 st.c |   26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)
2012-09-24 10:29:37 +02:00
448a25dbc8 Fix LNM sequence
LNM sequence is a standard ANSI mode, not a DEC private mode.
---
 st.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
2012-09-24 10:28:35 +02:00
4dfbf487bf Add KAM sequence
This sequence lock/unlock the keyboard ignoring all the key pressing events
from X server.
---
 st.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
2012-09-24 10:28:05 +02:00
e2fbd25f51 Remove unused parameters in ttyresize
---
 st.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
2012-09-24 10:27:22 +02:00
57e9f03059 Clear X window in tsetreset()
tsetreset() is called when it is necessary a full initialization of the
terminal, so it also should clean the full X window and not only the
terminal content. It is necessary change the order of the
initialization in main(), and put xinit before of tnew(), because tnew()
calls to tsetreset(), and  this can cause a call to xreset() with
incorrect values.
---
 st.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
2012-09-24 10:26:50 +02:00
61ffa628ff Merging xft and current st heads. 2012-09-24 10:24:36 +02:00
a0b0b8f694 Initial Xft support for st. More to follow. 2012-09-24 10:20:45 +02:00
eb837afafa use typedef'd unsigned type and regular bool type. 2012-09-19 16:03:16 +02:00
3f482f4758 config.def.h: typo in comment. 2012-09-18 19:13:19 +02:00
d181afe094 LEGACY: typo. 2012-09-18 19:08:03 +02:00
9c7579deea Redrawing is fixed. 2012-09-17 23:14:40 +02:00
8b0167b596 Fixing the redrawing patch of k0ga, so it's using xclear() in redraw() too. 2012-09-17 22:44:27 +02:00
5e32f3c2f4 Clean windows display after resizing
Some times the size after a resizing is not an exact multiply of a number of
characters, so redrawn the screen using the lines and columns of the neww
size can cause that some old graphics keep in the screen. Solution is clean
all the windows with the background color.
---
 st.c |    3 +++
 1 file changed, 3 insertions(+)
2012-09-17 22:13:17 +02:00
40be64cff8 Copy non set positions as spaces
st selection don't insert in the selection position whose value is not
set. This is correct for the positions in the end of the line, but cause
some problems in the beginning. For example echo -e 'a\tb' will print in the
screen:

a	b

but after selecting and copying in some place you get:

ab

because positions from 1 to 7 don't have any value. This patch deals all
positions without value as blank (even at the end of the line).
---
 st.c |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
2012-09-17 22:13:09 +02:00
63cab32d05 Add newline in error messages
---
 st.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
2012-09-17 22:11:28 +02:00
cf7edb2641 Add xcalloc wrapper
malloc and realloc are called through xmalloc and xrealloc, so calloc should
be called through xcalloc.
---
 st.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
2012-09-17 22:11:20 +02:00
8a9c8b7502 Applying a shortening proposal for the run loop of k0ga. 2012-09-16 20:43:51 +02:00
7d54d35a95 Remove call to draw in resize
In previous commits draw was removed from all the X events, but I forgot do
it in resize.
---
 st.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
2012-09-16 14:02:35 +02:00
1c316bedce Adding some more fields to the manpage, like authors, license etc. 2012-09-16 13:59:10 +02:00
851b15293a Remove some solved issues and add some new. 2012-09-16 13:50:07 +02:00
d41d383aad Preliminary solution to the stuttering problem. 2012-09-16 13:22:23 +02:00
6bf6ef46f2 Fix selection bug
After the commit named "Remove timeout in the main loop", selection is not
working in the proper way. After selecting something, press mouse button in
a line outside of selection causes an incorrect highlight. This patch fix
the problem forcing a draw after the press event, but this is only a fast
hack. Real solution means rewriting selection code.
---
 st.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
2012-09-16 10:49:12 +02:00
c624bb5703 Render only once in each main loop iteration
draw() runs over all lines of the screen and renders only the dirty lines,
this avoids render lines which are not modified since last draw() call. In
this moment the main loop is something like:

     - Wait something to read from file descriptors
     - Read from pseudo tty
     - Call draw() for rending
     - Read X events

This cause the problem that all the X events that have to update the screen
have to call draw() (because draw() is called before of X events handling),
so you can have multiples renderings in only one iteration, that will waste
a lot of resources.

This patch change the main loop to:

     - Wait something to read from file descriptors
     - Read from pseudo tty
     - Read X events
     - Call draw() for rending

So X events don't have to worry about rendering, because draw() is called
after them.

The only place where draw is called outside of the main loop is in redraw(),
but it is necessary for getting a good tput flash.
---
 st.c |   29 ++++++-----------------------
 1 file changed, 6 insertions(+), 23 deletions(-)
2012-09-16 10:48:38 +02:00
f3704e6553 Remove timeout in the main loop
The main loop waits until there is some data to read in file descriptors of
the X server or the pseudo tty. But it uses a timeout in select(), which
causes that st awake each 20 ms, even it doesn't have something to do. This
patch removes this problem removing the timeout, which is not needed.
---
 TODO |    1 -
 st.c |   27 +++------------------------
 2 files changed, 3 insertions(+), 25 deletions(-)
2012-09-16 10:47:21 +02:00
9c04eb529f Call XSync in redraw
It is necessary call to XSync if you want a good tput flash, because in
other way you can not be sure that white screen will be shown.
---
 st.c |    1 +
 1 file changed, 1 insertion(+)
2012-09-16 10:46:08 +02:00
6b42002e1a Call XdbeQueryExtension before of calling any Xdbe function
XdbeQueryExtension() tells to the caller if the Xdbe extension is present in
the X server, so it should be called for sanity. But like is said in
XdbeQueryExtension(3):

	No other Xdbe functions may be called before this function.  If a
	client violates this rule, the effects of all subsequent Xdbe calls
	that it makes are undefined.

it is mandatory call this function.
---
 st.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
2012-09-16 10:45:36 +02:00
dccba949b5 Implementing italic-bold. This will require an increase of the avgWdth. 2012-09-14 19:46:07 +02:00
30e167c457 Ignore NUL character as a padding character. Telnet may use this. Patch of
Roberto Vargas.
2012-09-13 23:21:40 +02:00
184c38c88b Importing the patch of Roberto Vargas to inherit signal handlers. 2012-09-13 23:19:57 +02:00
12516e2181 Reset window title on terminal reset too. 2012-09-13 07:16:38 +02:00
81283df211 Adding a statemant on legacy support. 2012-09-13 07:04:59 +02:00
42ebd8ef7f Adding another bold off sequence. 2012-09-13 07:04:34 +02:00
d254935875 Remove buffering to fileio instead of calling fflush
By default text files are line buffered, and this means that -f option will
not write the line until a \n is printed. This is not very useful for
debugging, so a call to fflush was added. This patch substitute this call
(which will be done by each character painted) by the full remove of the
buffering in the file.
---
 st.c |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
2012-09-12 21:51:55 +02:00
adc4631574 Add xmalloc and xrealloc wrappers
If malloc  or realloc fail they return NULL. Theorically this condition
should be tested in the code, but it's a strange condition today (basically
if this is hapenning thenyou have a big problem), and even Linux never returns
NULL in the default configuration (only if the process don't have room in
the space address, something a bit impossible in the case of st). But stis
enough small for being executed in low resources computers where this can be
a real problem. So the easy way is creating a wrappers function for them and
call to die in case of error.
---
 st.c |   44 +++++++++++++++++++++++++++++++-------------
 1 file changed, 31 insertions(+), 13 deletions(-)
2012-09-12 21:25:35 +02:00
91d32161fc Make nyancat(1) work. Important release feature! 2012-09-12 13:20:10 +02:00
04b6bee980 Add preliminary blink stubs. Real implementation is still missing. 2012-09-12 13:08:26 +02:00
1e334a1469 Add another obscure way to set a window title. 2012-09-12 13:00:39 +02:00
10cb169ede Fixing the too small window in non-tiling window managers. 2012-09-10 13:39:41 +02:00
e5588098c0 Making the selection work again. 2012-09-06 08:02:56 +02:00
25cdfc8483 Allow simpler stdout -f handling. 2012-09-06 00:00:50 +02:00
b576d2c551 Adding instantenous debug output and fixing italic with a reset. 2012-09-05 23:38:57 +02:00
f48c2b1484 Adding the removal of the timeouts to the TODO. 2012-09-05 23:06:59 +02:00
fd7f78f2c7 Removing masks for unhandled enter and leaving events. 2012-09-05 22:39:09 +02:00
001b0152a4 If the selection is cleared, draw() and do it on button press too. 2012-09-05 22:17:42 +02:00
62c5abf2a7 Unhighlight selection when selection is owner by other window
st marks the active selection using reverse colors in the box selection, but
once that another window becomes owner of the selection, it is very
confusing that st keeps highlight the old selection. Usually terminal
emulators remove the highlight when it is not valid anymore.

X sends a SelectionClear event in this situation, so we only have to add a
callback which unhighlight the selectin box.
---
 st.c |    9 +++++++++
 1 file changed, 9 insertions(+)
2012-09-05 21:55:45 +02:00
a683de5364 Forcing the parameter limit to xcopy() and selpaste(). Thanks to Rob Pilling. 2012-09-05 21:54:52 +02:00
d0973d19da Removing unneeded arguments to copy(). Thanks to Andrew Hills. 2012-09-05 21:52:01 +02:00
f5c6bcf03a Implement italic font support. 2012-09-05 21:48:26 +02:00
0e0a7f9130 Add to TODO to make function keys work. 2012-09-05 01:32:42 +02:00
c238dbae5f Enable keypad set and unset commands. 2012-09-05 01:25:37 +02:00
245a6418b4 Disable BCE again. 2012-09-05 00:58:17 +02:00
1afbb7799f Removing the resize issue from the TODO file. 2012-09-05 00:09:13 +02:00
76a86e1612 Fixing the resizing behaviour. 2012-09-05 00:08:13 +02:00
a9550744b5 Forgot one line. It's late. 2012-09-04 22:51:29 +02:00
b9567a9b18 Cleaning up the fixed window size and the resizing of clients. 2012-09-04 22:44:33 +02:00
6cd52d6c2f Another thing for TODO – resize. 2012-09-04 22:06:54 +02:00
7815df826a Updating the TODO and enabling BCE. 2012-09-04 22:05:24 +02:00
870be23e28 CUP == HVP; CHA == HPA; 2012-09-04 21:56:55 +02:00
1f7896ae9c Unifying the old style. 2012-09-04 20:34:43 +02:00
ec8262e106 Check alternative screen before drawing box selection
Some programs use the alternative screen (vi, less, ...), whose
content is different of the main screen. If you select text in one of
the screen, you don't wait the box selection is painted in the other
screen, so it is necessary check if the selection was done in the same
screen we are going to paint. Before to this commit, you could do
something like:

	$ LESS="" ls | less
	(select some code)
	q

and selection box remains drawing in the main screen, but the content
of selection keeps text of the alternate screen.
---
 st.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
2012-09-04 20:33:01 +02:00
684a6b59ee Add newline to stderr message
---
 st.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2012-09-04 20:31:21 +02:00
59eaf3ce56 Fixing the border pixel when there is a negative position. 2012-09-03 23:09:34 +02:00
31c71cddb9 Add -g geometry to st and the manpage. 2012-09-03 23:02:29 +02:00
07c282d229 Fixing a type in in2 in the st.info. 2012-09-03 21:54:40 +02:00
e135e96f35 Force redisplay of all lines in DECSCNM
When it is called DECSCNM all lines become dirty, because it is necessary
redraw all lines for getting the new colors. It is easy see the problem
running 'echo ^[[?5h'.

In order to get a correct flash when running tput flash is necessary wait
after DECSCNM, until the changes are displayed, because in other case the
switch between reverse on/reverse off will be too much fast and nothing will
happen.
---
 st.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
2012-09-03 21:52:34 +02:00
ee4a9934ab Add write I/O to file
This is a theorical feature listed in http://st.suckless.org/goals. All the
input/output of the terminal will be written to a file, which can be very
useful for debugging, and also allow interconnect st to other process
through named pipes.
---
 st.1 |    6 ++++++
 st.c |   14 +++++++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)
2012-09-03 21:52:21 +02:00
eeb26ec316 Patch from Roberto Vargas. »Add initialization strings in terminfo«
Taken from the description:

When tput init is executed the list of task performed are (taken from
terminfo(5)):

              run the program
                     iprog

              output is1 is2

              set the margins using
                     mgc, smgl and smgr

              set tabs using
                     tbc and hts

              print the file
                     if

              and finally
                     output is3.

When reset is executed, a more stronger initialization process is performed,
so the terminal can return from an unknown state. rs1, rs2 and rs3 are used
in this case instead of
using is1, is2 and is3.

This patch makes is2 = rs2, resets insert mode and set normal keypad
mode. For rs1 it performs a full initilization using ^[c.
2012-09-03 21:50:22 +02:00
b3d8986489 Add standout mode. 2012-09-02 19:53:50 +02:00
6f336ce8f2 Cleaning up lonely tabs. 2012-09-02 19:43:29 +02:00
e2f6df0d17 Make it more obvious where the wrong attribute is used. 2012-09-02 19:42:00 +02:00
7988713b35 Enable multiple arguments in SM and RM
SM and RM can receive multiple parameters, but the code only was accepting
only one. This patch join the code of set and reset modes (SM and RM) in a
common function and uses a loop which deals with all the arguments of the
sequence. This patch improves xterm and vt100 compability.
---
 st.c |  180 ++++++++++++++++++++++++++++--------------------------------------
 1 file changed, 76 insertions(+), 104 deletions(-)
2012-09-02 19:09:35 +02:00
499671f3bf Add vpa terminfo capability
---
 st.info |    2 ++
 1 file changed, 2 insertions(+)
2012-09-02 19:08:52 +02:00
1da81ff23e Silencing the compiler but keeping strparse.
This will really be needed when there is a full 256 color support.
2012-08-30 21:19:53 +02:00
4675c14758 Applying the CBT patch of Roberto Vargas. Thanks. 2012-08-30 21:17:54 +02:00
1175c4be7a Never trust terminfo fata morganas. And adding other xterm compatibility. 2012-08-30 07:38:47 +02:00
06963a1dc7 Add OSC, DSC, PM, APC and settitle. 2012-08-29 23:14:20 +02:00
5843cbeae7 Adding setb and setf and a comment about terminfo installation. 2012-08-29 21:13:47 +02:00
6590664fa0 Add CHT sequence
This sequence performs "Cursor Forward Tabulation <n> tab stops", which
although is not present in vt100 or vt102, xterm accepts it.
---
 st.c |    5 +++++
 1 file changed, 5 insertions(+)
2012-08-29 20:05:25 +02:00
e049533ca7 Applying the patches of k0ga and changing the LICENSE file in the appropriate
way.
2012-08-29 20:01:34 +02:00
67d809776f Add TBC sequence
This sequence clears tab stops in the terminal. If the argument is not present
or is zero, then removes the tab stop of the current horizontal position. If
the argument is 3 then removes all the tab stops of the terminal. It was
necessary modify the terminfo entry tbc, because it has \E[2g instead of the
correct \E[3g.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
---
 st.c    |   12 ++++++++++++
 st.info |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)
2012-08-29 19:59:47 +02:00
94ce8a7184 Add HTS sequence
This sequence adds a new tab stop in the current horizontal position. This
means that tputtab must be look for the next tab stop in the tabs array
instead of using a hard coded value offset. Also, CHT sequence XXX message
is removed because it is not a vt10x sequence (as far as I know it is a
vt50x sequence), and it is not implemented by linux virtual terminal neither
by xterm.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
---
 st.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
2012-08-29 19:59:43 +02:00
2d061761f9 Add tabs field into Term struct
Tabs stop are simulated in st using a fixed size of 8, always, without be
worried about sequences changing the tab stops. A user can put a tab stop in
each horizontal position of the screen, so we need at least one flag for
each column of the screen. In the same way as dirty flags is used for the
rows, it is used a bool dinamic array.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
---
 st.c |   22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
2012-08-29 19:59:37 +02:00
4eeb3aded3 apply post-XDBE patch BORDER fix 2012-08-03 14:46:40 +02:00
9e48ff64e2 Implement Xdbe-based double-buffering 2012-07-28 14:27:26 +02:00
5991c6d7d3 update TODO. 2012-02-27 12:48:13 +01:00
0e2bd2db06 cleanup. refactored dirt-related function. 2012-02-27 12:44:02 +01:00
62c5a5a60a use SHELL as default shell. 2012-02-16 19:24:46 +01:00
332c2a22fb revert to "tip" in VERSION. 2012-02-16 01:06:45 +01:00
012f7fac29 Added tag 0.2.1 for changeset 108926a0fe61 2012-02-16 01:05:26 +01:00
80a46b1270 bump version. 2012-02-16 01:05:14 +01:00
664c40f6bc replace fwrite by printf. 2012-02-16 00:59:26 +01:00
6cd5c3dab7 rewrite csidump(). 2012-02-16 00:58:16 +01:00
8ebab41592 clean and name enum definitions. 2012-02-16 00:33:11 +01:00
1ec0515e75 fix default color overwriten bug. 2012-02-16 00:10:32 +01:00
adf5d2e32a show dark cursor when unfocused. 2012-02-15 19:33:48 +01:00
62d380947e document possible configuration. 2012-02-15 19:11:07 +01:00
5705e5dfd1 handle dim/bright colors. 2012-02-15 19:10:31 +01:00
45971204a2 merge 2012-02-13 01:01:41 +01:00
e478f91c10 some minor fixes 2012-02-11 10:48:18 +01:00
284430538d reduce size of each glyph for faster copy. 2012-02-08 16:45:52 +01:00
c7ed0d1bad Added tag 0.2 for changeset 3c2f9f2ab5e4 2012-02-07 23:53:45 +01:00
ae0966484c cosmetic, whitespace, etc. 2012-01-21 23:43:03 +01:00
156ce77645 fix PRINT/DRAW _TIMEOUT and fix redrawing bug. 2012-01-21 23:26:53 +01:00
96c22e1604 copy dirty lines to screen, add select() timeout & min time between draw() calls.
* add a timeout value (SELECT_TIMEOUT) of 20ms in the select() call
* wait at least 20ms (DRAW_TIMEOUT) between draw() calls
* only copy dirty lines from the buffer to the screen

what draw() does:
* clears dirty lines in the buffer
* draws the longest same-attributes string of each
  dirty line to the buffer with multiple xdraws() call
* copies the current dirty line from buffer to the screen with a single
  xcopy() call

this changeset makes st run ~10x faster.
2012-01-21 23:14:41 +01:00
281174445b fix segfault in selection. (thx Martti Kühne) 2012-01-10 22:21:03 +01:00
197c466864 merge. 2011-11-01 16:37:16 +01:00
5ca0d3d2fa fix selection. (thx Tarmo Heiskanen) 2011-11-01 16:33:43 +01:00
b1b9dc7eb5 drawregion() only copies region on screen. 2011-10-20 23:26:58 +02:00
44c83397af add dirty flag for lines 2011-10-20 23:20:59 +02:00
7c350025b2 no palette limit (thx Nick) 2011-10-06 21:32:34 +02:00
4a421ffbbc simplify version format. 2011-09-22 10:04:58 +02:00
62a92ca1aa selection is removed or scrolled properly. (thx Rafa Garcia Gallego) 2011-09-16 18:48:16 +02:00
98042a1a2d working on old repo, merging recent changesets. 2011-09-16 18:24:13 +02:00
5c6df8b3c3 move xembedatom in XWindow struct, add link to xembed specs. 2011-09-16 18:21:48 +02:00
43a4c5ebb2 tweak focus to support XEMBED client message and remove focus on EnterNotify. (thx Adrian) 2011-09-16 18:03:44 +02:00
bf2e23f535 remove dup of default window size. 2011-09-16 17:57:56 +02:00
5d1c52bf5c change "op" cap in terminfo entry to xterm/rxvt value. 2011-08-14 17:15:19 +02:00
54adc7ee50 fix custom key handling. 2011-08-14 17:13:59 +02:00
e2809f3976 fix focus state when embed in another window. 2011-06-09 18:25:56 +02:00
ce547d3060 fix segfault with mouse selection. (thx anonymous) 2011-06-09 14:27:07 +02:00
4259a3ba3a add -w option to embed st. (thx nodus cursorius) 2011-06-08 21:35:58 +02:00
fb32d01a18 applied parts of "anonymous" cleanup patch. 2011-06-08 20:26:00 +02:00
986670d080 add altscreen escseq alias & caps to terminfo entry. (thx Bert Münnich) 2011-06-08 20:22:38 +02:00
6eaec4732f disable mouse highlight when mouse report enabled. (thx Bert Münnich) 2011-06-08 19:32:10 +02:00
2edb412b6b reverse video mode. (thx Bert Münnich) 2011-06-08 12:40:35 +02:00
bf6a11a482 add status bar (window title) to terminfo. (thx Rafa Gallego) 2011-06-01 19:57:48 +02:00
a05423cb6a set title before mapping window (thx Kamil Cholewiński). 2011-05-22 16:57:27 +02:00
cdd993c39e applied parts of Connor Lane Smith's cleanup patch. 2011-05-14 17:47:37 +02:00
a7f4af0139 macro cleanup. 2011-05-10 22:55:35 +02:00
225fc7cbcf add mouse report escape to terminfo entry. 2011-05-10 22:54:30 +02:00
9760a7a831 support for x11 xterm mouse reporting 2011-05-10 22:22:44 +02:00
9a3cc64f9d whitespace. 2011-04-26 20:29:28 +02:00
3d0eeac7a8 cleanup. 2011-04-26 20:22:15 +02:00
31ba817cc3 update TODO 2011-04-22 00:42:58 +02:00
e4dd367a4f selection clicks, shift+arrow keys, fast(er) redraw, key mask in config.h (thx Magnus Leuthner) 2011-04-22 00:18:53 +02:00
043fb982c5 update README. 2011-04-03 21:40:33 +02:00
7f3ea64d61 quick bug-fixing 0.1.1 release. 2011-04-03 21:05:41 +02:00
d343f5847b update VERSION. 2011-04-03 21:04:45 +02:00
55c8d82eb1 take BORDER into account for selection. (thx Petr Sabata) 2011-04-03 21:03:48 +02:00
d679267c46 fix utf8 clipboard. (thx Petr Sabata) 2011-04-03 21:00:55 +02:00
bdd3246271 Added tag 0.1 for changeset cbc18c988236 2011-04-03 02:02:31 +02:00
12 changed files with 1893 additions and 756 deletions

4
.hgtags Normal file
View File

@ -0,0 +1,4 @@
cbc18c988236c63a58ed24031805e8d36a3ad01a 0.1
f245ac2efd8ac2f1ac6bffae876c2663e794f79d 0.1.1
3c2f9f2ab5e433db1401047760ec31d66939b74b 0.2
108926a0fe610b92c0296148721c3225932f39aa 0.2.1

8
FAQ Normal file
View File

@ -0,0 +1,8 @@
--
Why does st not handle utmp entries?
Use the excellent tool of utmp[0] for this task.
[0] http://hg.suckless.org/utmp/
--

17
LEGACY Normal file
View File

@ -0,0 +1,17 @@
A STATEMENT ON LEGACY SUPPORT
In the terminal world there is much cruft that comes from old and unsup
ported terminals that inherit incompatible modes and escape sequences
which noone is able to know, except when he/she comes from that time and
developed a graphical vt100 emulator at that time.
One goal of st is to only support what is really needed. When you en
counter a sequence which you really need, implement it. But while you
are at it, do not add the other cruft you might encounter while sneek
ing at other terminal emulators. History has bloated them and there is
no real evidence that most of the sequences are used today.
Christoph Lohmann <20h@r-36.net>
2012-09-13T07:00:36.081271045+02:00

View File

@ -1,4 +1,6 @@
Copyright (c) 2009, Aurélien APTEL <aurelien dot aptel at gmail dot com>
Copyright (c) 2009-2012, Aurélien APTEL <aurelien dot aptel at gmail dot com>
Copyright (c) 2012, Roberto E. Vargas Caballero <k0ga at shike2 dot com>
Copyright (c) 2012, Christoph Lohmann <20h at r-36 dot net>
Copyright (c) 2009, Anselm R Garbe <garbeam at gmail dot com>
Redistribution and use in source and binary forms, with or without

View File

@ -48,6 +48,8 @@ install: all
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1
@echo If things do not seem to work, be sure that there is no \
floating st terminfo in the .terminfo directory in your home dir.
@tic -s st.info
uninstall:

9
README
View File

@ -21,7 +21,14 @@ necessary as root):
Running st
----------
See the man page for details.
If you don't install st, define TNAME to "xterm" in config.h or make sure to at
least compile st terminfo entry with the following command:
tic -s st.info
It should print the path of the compiled terminfo entry. You can
safely remove it if you don't plan to use st anymore.
See the man page for additional details.
Credits
-------

34
TODO
View File

@ -1,15 +1,33 @@
vt emulation
------------
* screen erased with background color ## capname:bce
* back tab ## capname:cbt ## seq:CSI Z
* ...
* implement BCE right
* color definition in CSI
* implement CSI parsing
* make the keypad keys really work
* kf0 .. kf44
* kend, kel, kent, kfnd, ked, kext
* kNXT, kPRV
* ka1, ka3, kb2
* add arrow keys handling
code & interface
----------------
* clean selection code
* use the real x11 clipboard
* clean terminfo entry
* utf8
* ...
* clean and complete terminfo entry
* add fallback fonts for the restricted xft code
bugs
----
* handle XOpenMI() errors
* fix shift up/down (shift selection in emacs)
* fix selection paste for xatom STRING
* fix umlaut handling in settitle
* fix rows and column definition in fixed geometry
misc
----
$ grep -nE 'XXX|TODO' st.c

View File

@ -1,12 +1,23 @@
#define TAB 8
#define TNAME "st-256color"
#define FONT "-*-*-medium-r-*-*-*-120-75-75-*-60-*-*"
#define BOLDFONT "-*-*-bold-r-*-*-*-120-75-75-*-60-*-*"
#define BORDER 2
#define SHELL "/bin/sh"
/* See LICENSE file for copyright and license details. */
/* Terminal colors */
/* appearance */
static char font[] = "Liberation Mono:pixelsize=12:antialias=false:autohint=false";
static unsigned int borderpx = 2;
static char shell[] = "/bin/sh";
/* double-click timeout (in milliseconds) between clicks for selection */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
/* TERM value */
static char termname[] = "st-256color";
static unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
"black",
"red3",
"green3",
@ -15,6 +26,8 @@ static const char *colorname[] = {
"magenta3",
"cyan3",
"gray90",
/* 8 bright colors */
"gray50",
"red",
"green",
@ -22,42 +35,63 @@ static const char *colorname[] = {
"#5c5cff",
"magenta",
"cyan",
"white"
};
"white",
/* Default colors (colorname index) */
/* foreground, background, cursor */
#define DefaultFG 7
#define DefaultBG 0
#define DefaultCS 1
/* Special keys */
static Key key[] = {
{ XK_BackSpace, "\177" },
{ XK_Insert, "\033[2~" },
{ XK_Delete, "\033[3~" },
{ XK_Home, "\033[1~" },
{ XK_End, "\033[4~" },
{ XK_Prior, "\033[5~" },
{ XK_Next, "\033[6~" },
{ XK_F1, "\033OP" },
{ XK_F2, "\033OQ" },
{ XK_F3, "\033OR" },
{ XK_F4, "\033OS" },
{ XK_F5, "\033[15~" },
{ XK_F6, "\033[17~" },
{ XK_F7, "\033[18~" },
{ XK_F8, "\033[19~" },
{ XK_F9, "\033[20~" },
{ XK_F10, "\033[21~" },
{ XK_F11, "\033[23~" },
{ XK_F12, "\033[24~" },
};
/* Line drawing characters (sometime specific to each font...) */
static char gfx[] = {
['f'] = 'o',
['g'] = '+',
['i'] = '#',
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#333333",
};
/*
* Default colors (colorname index)
* foreground, background, cursor, unfocused cursor
*/
static unsigned int defaultfg = 7;
static unsigned int defaultbg = 0;
static unsigned int defaultcs = 256;
static unsigned int defaultucs = 257;
/*
* Special keys (change & recompile st.info accordingly)
* Keep in mind that kpress() in st.c hardcodes some keys.
*
* Mask value:
* * Use XK_ANY_MOD to match the key no matter modifiers state
* * Use XK_NO_MOD to match the key alone (no modifiers)
*/
/* key, mask, output */
static Key key[] = {
{ XK_BackSpace, XK_NO_MOD, "\177" },
{ XK_Insert, XK_NO_MOD, "\033[2~" },
{ XK_Delete, XK_NO_MOD, "\033[3~" },
{ XK_Home, XK_NO_MOD, "\033[1~" },
{ XK_End, XK_NO_MOD, "\033[4~" },
{ XK_Prior, XK_NO_MOD, "\033[5~" },
{ XK_Next, XK_NO_MOD, "\033[6~" },
{ XK_F1, XK_NO_MOD, "\033OP" },
{ XK_F2, XK_NO_MOD, "\033OQ" },
{ XK_F3, XK_NO_MOD, "\033OR" },
{ XK_F4, XK_NO_MOD, "\033OS" },
{ XK_F5, XK_NO_MOD, "\033[15~" },
{ XK_F6, XK_NO_MOD, "\033[17~" },
{ XK_F7, XK_NO_MOD, "\033[18~" },
{ XK_F8, XK_NO_MOD, "\033[19~" },
{ XK_F9, XK_NO_MOD, "\033[20~" },
{ XK_F10, XK_NO_MOD, "\033[21~" },
{ XK_F11, XK_NO_MOD, "\033[23~" },
{ XK_F12, XK_NO_MOD, "\033[24~" },
};
/* Internal shortcuts. */
#define MODKEY Mod1Mask
static Shortcut shortcuts[] = {
/* modifier key function argument */
{ MODKEY|ShiftMask, XK_Prior, xzoom, {.i = +1} },
{ MODKEY|ShiftMask, XK_Next, xzoom, {.i = -1} },
};

View File

@ -1,5 +1,5 @@
# st version
VERSION = 0.0
VERSION = 0.3
# Customize below to fit your system
@ -11,13 +11,13 @@ X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# includes and libs
INCS = -I. -I/usr/include -I${X11INC}
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lutil
INCS = -I. -I/usr/include -I${X11INC} -I/usr/include/freetype2
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lutil -lXext -lXft -lfontconfig
# flags
CPPFLAGS = -DVERSION=\"${VERSION}\"
CFLAGS += -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS += -s ${LIBS}
CFLAGS += -g -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS += -g ${LIBS}
# compiler and linker
CC ?= cc

63
st.1
View File

@ -1,32 +1,71 @@
.TH ST 1 st-VERSION
.TH ST 1 st\-VERSION
.SH NAME
st \- simple terminal
.SH SYNOPSIS
.B st
.RB [ \-c
.IR class ]
.RB [ \-f
.IR font ]
.RB [ \-g
.IR geometry ]
.RB [ \-o
.IR file ]
.RB [ \-t
.IR title ]
.RB [ \-w
.IR windowid ]
.RB [ \-v ]
.RB [ \-e
.IR cmd ]
.IR command ...]
.SH DESCRIPTION
.B st
is a simple terminal emulator.
.SH OPTIONS
.TP
.B \-t title
Overrides the default title (st)
.BI \-c " class"
defines the window class (default $TERM).
.TP
.B \-c class
Overrides the default class ($TERM)
.BI \-f " font"
defines the
.I font
to use when st is run.
.TP
.BI \-g " geometry"
defines the X11 geometry string, which will fixate the height and width of st.
.TP
.BI \-o " file"
writes all the I/O to
.I file.
This feature is useful when recording st sessions. A value of "-" means
standard output.
.TP
.BI \-t " title"
defines the window title (default 'st').
.TP
.BI \-w " windowid"
embeds st within the window identified by
.I windowid
.TP
.B \-v
Prints version information to standard output, then exits.
prints version information to stderr, then exits.
.TP
.B \-e cmd [arguments]
Execute cmd instead of the shell. Type your command as you would on your
shell. If this option is used, it
.BI "must be the last"
on the command-line. This is the same behaviour as xterm/rxvt.
.BI \-e " program " [ " arguments " "... ]"
st executes
.I program
instead of the shell. If this is used it
.B must be the last option
on the command line, as in xterm / rxvt.
.SH CUSTOMIZATION
.B st
can be customized by creating a custom config.h and (re)compiling the source
code. This keeps it fast, secure and simple.
.SH AUTHORS
See the LICENSE file for the authors.
.SH LICENSE
See the LICENSE file for the terms of redistribution.
.SH SEE ALSO
.BR tabbed (1)
.SH BUGS
See the TODO file in the distribution.

2197
st.c

File diff suppressed because it is too large Load Diff

31
st.info
View File

@ -33,8 +33,12 @@ st| simpleterm,
ed=\E[J,
el=\E[K,
el1=\E[1K,
enacs=\E)0,
flash=\E[?5h\E[?5l,
fsl=^G,
home=\E[H,
hpa=\E[%i%p1%dG,
hs,
ht=^I,
hts=\EH,
ich=\E[%p1%d@,
@ -43,12 +47,17 @@ st| simpleterm,
ind=^J,
indn=\E[%p1%dS,
invis=\E[8m,
is2=\E[4l\E>,
it#8,
kbs=\177,
kcub1=\E[D,
kcud1=\E[B,
kcuf1=\E[C,
kcuu1=\E[A,
kLFT=\E[d,
kRIT=\E[c,
kind=\E[a,
kri=\E[b,
kdch1=\E[3~,
kich1=\E[2~,
kend=\E[4~,
@ -66,30 +75,44 @@ st| simpleterm,
kf9=\E[20~,
khome=\E[1~,
knp=\E[6~,
kmous=\E[M,
kpp=\E[5~,
lines#24,
mir,
msgr,
ncv#3,
op=\E[37;40m,
op=\E[39;49m,
pairs#64,
rc=\E8,
rev=\E[7m,
ri=\EM,
ritm=\E[23m,
rmacs=\E(B,
rmso=\E[m,
rmcup=\E[?1049l,
# rmkx=\E>,
rmso=\E[23m,
rmul=\E[m,
rs1=\Ec,
rs2=\E[4l\E>,
sc=\E7,
setab=\E[4%p1%dm,
setaf=\E[3%p1%dm,
setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
sgr0=\E[0m,
sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
sitm=\E[3m,
smacs=\E(0,
smso=\E[7m,
smcup=\E[?1049h,
# smkx=\E=,
smso=\E[3m,
smul=\E[4m,
tbc=\E[2g,
tbc=\E[3g,
tsl=\E]0;,
ul,
xenl,
vpa=\E[%i%p1%dd,
st-256color| simpleterm with 256 colors,
use=st,