52 Commits
Author SHA1 Message Date
Aurélien Aptel 80a46b1270 bump version. 2012-02-16 01:05:14 +01:00
Aurélien Aptel 664c40f6bc replace fwrite by printf. 2012-02-16 00:59:26 +01:00
Aurélien Aptel 6cd5c3dab7 rewrite csidump(). 2012-02-16 00:58:16 +01:00
Aurélien Aptel 8ebab41592 clean and name enum definitions. 2012-02-16 00:33:11 +01:00
Aurélien Aptel 1ec0515e75 fix default color overwriten bug. 2012-02-16 00:10:32 +01:00
Aurélien Aptel adf5d2e32a show dark cursor when unfocused. 2012-02-15 19:33:48 +01:00
Aurélien Aptel 62d380947e document possible configuration. 2012-02-15 19:11:07 +01:00
Aurélien Aptel 5705e5dfd1 handle dim/bright colors. 2012-02-15 19:10:31 +01:00
Aurélien Aptel 45971204a2 merge 2012-02-13 01:01:41 +01:00
anselm@garbe.us e478f91c10 some minor fixes 2012-02-11 10:48:18 +01:00
Aurélien Aptel 284430538d reduce size of each glyph for faster copy. 2012-02-08 16:45:52 +01:00
Aurélien Aptel c7ed0d1bad Added tag 0.2 for changeset 3c2f9f2ab5e4 2012-02-07 23:53:45 +01:00
Aurélien Aptel ae0966484c cosmetic, whitespace, etc. 2012-01-21 23:43:03 +01:00
Aurélien Aptel 156ce77645 fix PRINT/DRAW _TIMEOUT and fix redrawing bug. 2012-01-21 23:26:53 +01:00
Aurélien Aptel 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
Aurélien Aptel 281174445b fix segfault in selection. (thx Martti Kühne) 2012-01-10 22:21:03 +01:00
Aurélien Aptel 197c466864 merge. 2011-11-01 16:37:16 +01:00
Aurélien Aptel 5ca0d3d2fa fix selection. (thx Tarmo Heiskanen) 2011-11-01 16:33:43 +01:00
Aurélien Aptel b1b9dc7eb5 drawregion() only copies region on screen. 2011-10-20 23:26:58 +02:00
Aurélien Aptel 44c83397af add dirty flag for lines 2011-10-20 23:20:59 +02:00
Aurélien Aptel 7c350025b2 no palette limit (thx Nick) 2011-10-06 21:32:34 +02:00
Aurélien Aptel 4a421ffbbc simplify version format. 2011-09-22 10:04:58 +02:00
Aurélien Aptel 62a92ca1aa selection is removed or scrolled properly. (thx Rafa Garcia Gallego) 2011-09-16 18:48:16 +02:00
Aurélien Aptel 98042a1a2d working on old repo, merging recent changesets. 2011-09-16 18:24:13 +02:00
Aurélien Aptel 5c6df8b3c3 move xembedatom in XWindow struct, add link to xembed specs. 2011-09-16 18:21:48 +02:00
Aurélien Aptel 43a4c5ebb2 tweak focus to support XEMBED client message and remove focus on EnterNotify. (thx Adrian) 2011-09-16 18:03:44 +02:00
Aurélien Aptel bf2e23f535 remove dup of default window size. 2011-09-16 17:57:56 +02:00
Aurélien Aptel 5d1c52bf5c change "op" cap in terminfo entry to xterm/rxvt value. 2011-08-14 17:15:19 +02:00
Aurélien Aptel 54adc7ee50 fix custom key handling. 2011-08-14 17:13:59 +02:00
Aurélien Aptel e2809f3976 fix focus state when embed in another window. 2011-06-09 18:25:56 +02:00
Aurélien Aptel ce547d3060 fix segfault with mouse selection. (thx anonymous) 2011-06-09 14:27:07 +02:00
Aurélien Aptel 4259a3ba3a add -w option to embed st. (thx nodus cursorius) 2011-06-08 21:35:58 +02:00
Aurélien Aptel fb32d01a18 applied parts of "anonymous" cleanup patch. 2011-06-08 20:26:00 +02:00
Aurélien Aptel 986670d080 add altscreen escseq alias & caps to terminfo entry. (thx Bert Münnich) 2011-06-08 20:22:38 +02:00
Aurélien Aptel 6eaec4732f disable mouse highlight when mouse report enabled. (thx Bert Münnich) 2011-06-08 19:32:10 +02:00
Aurélien Aptel 2edb412b6b reverse video mode. (thx Bert Münnich) 2011-06-08 12:40:35 +02:00
Aurélien Aptel bf6a11a482 add status bar (window title) to terminfo. (thx Rafa Gallego) 2011-06-01 19:57:48 +02:00
Aurélien Aptel a05423cb6a set title before mapping window (thx Kamil Cholewiński). 2011-05-22 16:57:27 +02:00
Aurélien Aptel cdd993c39e applied parts of Connor Lane Smith's cleanup patch. 2011-05-14 17:47:37 +02:00
Aurélien Aptel a7f4af0139 macro cleanup. 2011-05-10 22:55:35 +02:00
Aurélien Aptel 225fc7cbcf add mouse report escape to terminfo entry. 2011-05-10 22:54:30 +02:00
Aurélien Aptel 9760a7a831 support for x11 xterm mouse reporting 2011-05-10 22:22:44 +02:00
Aurélien Aptel 9a3cc64f9d whitespace. 2011-04-26 20:29:28 +02:00
Aurélien Aptel 3d0eeac7a8 cleanup. 2011-04-26 20:22:15 +02:00
Aurélien Aptel 31ba817cc3 update TODO 2011-04-22 00:42:58 +02:00
Aurélien Aptel 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
Aurélien Aptel 043fb982c5 update README. 2011-04-03 21:40:33 +02:00
Aurélien Aptel 7f3ea64d61 quick bug-fixing 0.1.1 release. 2011-04-03 21:05:41 +02:00
Aurélien Aptel d343f5847b update VERSION. 2011-04-03 21:04:45 +02:00
Aurélien Aptel 55c8d82eb1 take BORDER into account for selection. (thx Petr Sabata) 2011-04-03 21:03:48 +02:00
Aurélien Aptel d679267c46 fix utf8 clipboard. (thx Petr Sabata) 2011-04-03 21:00:55 +02:00
Aurélien Aptel bdd3246271 Added tag 0.1 for changeset cbc18c988236 2011-04-03 02:02:31 +02:00
9 changed files with 559 additions and 204 deletions

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
cbc18c988236c63a58ed24031805e8d36a3ad01a 0.1
f245ac2efd8ac2f1ac6bffae876c2663e794f79d 0.1.1
3c2f9f2ab5e433db1401047760ec31d66939b74b 0.2
+1 -1
View File
@@ -1,4 +1,4 @@
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) 2009, Anselm R Garbe <garbeam at gmail dot com> Copyright (c) 2009, Anselm R Garbe <garbeam at gmail dot com>
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
+8 -1
View File
@@ -21,7 +21,14 @@ necessary as root):
Running st 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 Credits
------- -------
+14 -3
View File
@@ -9,7 +9,18 @@ code & interface
---------------- ----------------
* clean selection code * clean selection code
* use the real x11 clipboard * clean and complete terminfo entry
* clean terminfo entry * fast drawing
* utf8
* ... * ...
bugs
----
* handle XOpenMI() errors
* fix shift up/down (shift selection in emacs)
misc
----
$ grep -nE 'XXX|TODO' st.c
+56 -27
View File
@@ -1,12 +1,16 @@
#define TAB 8
#define TNAME "st-256color"
#define FONT "-*-*-medium-r-*-*-*-120-75-75-*-60-*-*" #define FONT "-*-*-medium-r-*-*-*-120-75-75-*-60-*-*"
#define BOLDFONT "-*-*-bold-r-*-*-*-120-75-75-*-60-*-*" #define BOLDFONT "-*-*-bold-r-*-*-*-120-75-75-*-60-*-*"
/* Space in pixels around the terminal buffer */
#define BORDER 2 #define BORDER 2
/* Default shell to use if SHELL is not set in the env */
#define SHELL "/bin/sh" #define SHELL "/bin/sh"
/* Terminal colors */ /* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = { static const char *colorname[] = {
/* 8 normal colors */
"black", "black",
"red3", "red3",
"green3", "green3",
@@ -15,6 +19,8 @@ static const char *colorname[] = {
"magenta3", "magenta3",
"cyan3", "cyan3",
"gray90", "gray90",
/* 8 bright colors */
"gray50", "gray50",
"red", "red",
"green", "green",
@@ -22,38 +28,55 @@ static const char *colorname[] = {
"#5c5cff", "#5c5cff",
"magenta", "magenta",
"cyan", "cyan",
"white" "white",
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#333333",
}; };
/* Default colors (colorname index) */ /* Default colors (colorname index)
/* foreground, background, cursor */ foreground, background, cursor, unfocused cursor */
#define DefaultFG 7 #define DefaultFG 7
#define DefaultBG 0 #define DefaultBG 0
#define DefaultCS 1 #define DefaultCS 256
#define DefaultUCS 257
/* Special keys */ /* 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[] = { static Key key[] = {
{ XK_BackSpace, "\177" }, { XK_BackSpace, XK_NO_MOD, "\177" },
{ XK_Insert, "\033[2~" }, { XK_Insert, XK_NO_MOD, "\033[2~" },
{ XK_Delete, "\033[3~" }, { XK_Delete, XK_NO_MOD, "\033[3~" },
{ XK_Home, "\033[1~" }, { XK_Home, XK_NO_MOD, "\033[1~" },
{ XK_End, "\033[4~" }, { XK_End, XK_NO_MOD, "\033[4~" },
{ XK_Prior, "\033[5~" }, { XK_Prior, XK_NO_MOD, "\033[5~" },
{ XK_Next, "\033[6~" }, { XK_Next, XK_NO_MOD, "\033[6~" },
{ XK_F1, "\033OP" }, { XK_F1, XK_NO_MOD, "\033OP" },
{ XK_F2, "\033OQ" }, { XK_F2, XK_NO_MOD, "\033OQ" },
{ XK_F3, "\033OR" }, { XK_F3, XK_NO_MOD, "\033OR" },
{ XK_F4, "\033OS" }, { XK_F4, XK_NO_MOD, "\033OS" },
{ XK_F5, "\033[15~" }, { XK_F5, XK_NO_MOD, "\033[15~" },
{ XK_F6, "\033[17~" }, { XK_F6, XK_NO_MOD, "\033[17~" },
{ XK_F7, "\033[18~" }, { XK_F7, XK_NO_MOD, "\033[18~" },
{ XK_F8, "\033[19~" }, { XK_F8, XK_NO_MOD, "\033[19~" },
{ XK_F9, "\033[20~" }, { XK_F9, XK_NO_MOD, "\033[20~" },
{ XK_F10, "\033[21~" }, { XK_F10, XK_NO_MOD, "\033[21~" },
{ XK_F11, "\033[23~" }, { XK_F11, XK_NO_MOD, "\033[23~" },
{ XK_F12, "\033[24~" }, { XK_F12, XK_NO_MOD, "\033[24~" },
}; };
/* Set TERM to this */
#define TNAME "st-256color"
/* Line drawing characters (sometime specific to each font...) */ /* Line drawing characters (sometime specific to each font...) */
static char gfx[] = { static char gfx[] = {
['f'] = 'o', ['f'] = 'o',
@@ -61,3 +84,9 @@ static char gfx[] = {
['i'] = '#', ['i'] = '#',
[255] = 0, [255] = 0,
}; };
/* double-click timeout (in milliseconds) between clicks for selection */
#define DOUBLECLICK_TIMEOUT 300
#define TRIPLECLICK_TIMEOUT (2*DOUBLECLICK_TIMEOUT)
#define TAB 8
+1 -1
View File
@@ -1,5 +1,5 @@
# st version # st version
VERSION = 0.0 VERSION = 0.2.1
# Customize below to fit your system # Customize below to fit your system
+19 -13
View File
@@ -1,4 +1,4 @@
.TH ST 1 st-VERSION .TH ST 1 st\-VERSION
.SH NAME .SH NAME
st \- simple terminal st \- simple terminal
.SH SYNOPSIS .SH SYNOPSIS
@@ -7,26 +7,32 @@ st \- simple terminal
.IR class ] .IR class ]
.RB [ \-t .RB [ \-t
.IR title ] .IR title ]
.RB [ \-w
.IR windowid ]
.RB [ \-v ] .RB [ \-v ]
.RB [ \-e .RB [ \-e
.IR cmd ] .IR command ...]
.SH DESCRIPTION .SH DESCRIPTION
.B st .B st
is a simple terminal emulator. is a simple terminal emulator.
.SH OPTIONS .SH OPTIONS
.TP .TP
.B \-t title .BI \-t " title"
Overrides the default title (st) defines the window title (default 'st').
.TP .TP
.B \-c class .BI \-c " class"
Overrides the default class ($TERM) defines the window class (default $TERM).
.TP
.BI \-w " windowid"
embeds st within the window identified by
.I windowid
.TP .TP
.B \-v .B \-v
Prints version information to standard output, then exits. prints version information to stderr, then exits.
.TP .TP
.B \-e cmd [arguments] .BI \-e " program " [ " arguments " "... ]"
Execute cmd instead of the shell. Type your command as you would on your st executes
shell. If this option is used, it .I program
.BI "must be the last" instead of the shell. If this is used it
on the command-line. This is the same behaviour as xterm/rxvt. .B must be the last option
on the command line, as in xterm / rxvt.
+445 -157
View File
File diff suppressed because it is too large. Load diff
+12 -1
View File
@@ -33,8 +33,11 @@ st| simpleterm,
ed=\E[J, ed=\E[J,
el=\E[K, el=\E[K,
el1=\E[1K, el1=\E[1K,
flash=\E[?5h\E[?5l,
fsl=^G,
home=\E[H, home=\E[H,
hpa=\E[%i%p1%dG, hpa=\E[%i%p1%dG,
hs,
ht=^I, ht=^I,
hts=\EH, hts=\EH,
ich=\E[%p1%d@, ich=\E[%p1%d@,
@@ -49,6 +52,10 @@ st| simpleterm,
kcud1=\E[B, kcud1=\E[B,
kcuf1=\E[C, kcuf1=\E[C,
kcuu1=\E[A, kcuu1=\E[A,
kLFT=\E[d,
kRIT=\E[c,
kind=\E[a,
kri=\E[b,
kdch1=\E[3~, kdch1=\E[3~,
kich1=\E[2~, kich1=\E[2~,
kend=\E[4~, kend=\E[4~,
@@ -66,17 +73,19 @@ st| simpleterm,
kf9=\E[20~, kf9=\E[20~,
khome=\E[1~, khome=\E[1~,
knp=\E[6~, knp=\E[6~,
kmous=\E[M,
kpp=\E[5~, kpp=\E[5~,
lines#24, lines#24,
mir, mir,
msgr, msgr,
ncv#3, ncv#3,
op=\E[37;40m, op=\E[39;49m,
pairs#64, pairs#64,
rc=\E8, rc=\E8,
rev=\E[7m, rev=\E[7m,
ri=\EM, ri=\EM,
rmacs=\E(B, rmacs=\E(B,
rmcup=\E[?1049l,
rmso=\E[m, rmso=\E[m,
rmul=\E[m, rmul=\E[m,
sc=\E7, sc=\E7,
@@ -85,9 +94,11 @@ st| simpleterm,
sgr0=\E[0m, 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, 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,
smacs=\E(0, smacs=\E(0,
smcup=\E[?1049h,
smso=\E[7m, smso=\E[7m,
smul=\E[4m, smul=\E[4m,
tbc=\E[2g, tbc=\E[2g,
tsl=\E]0;,
ul, ul,
xenl, xenl,