Compare commits
40 Commits
Author | SHA1 | Date | |
---|---|---|---|
ae0966484c | |||
156ce77645 | |||
96c22e1604 | |||
281174445b | |||
197c466864 | |||
5ca0d3d2fa | |||
b1b9dc7eb5 | |||
44c83397af | |||
7c350025b2 | |||
4a421ffbbc | |||
62a92ca1aa | |||
98042a1a2d | |||
5c6df8b3c3 | |||
43a4c5ebb2 | |||
bf2e23f535 | |||
5d1c52bf5c | |||
54adc7ee50 | |||
e2809f3976 | |||
ce547d3060 | |||
4259a3ba3a | |||
fb32d01a18 | |||
986670d080 | |||
6eaec4732f | |||
2edb412b6b | |||
bf6a11a482 | |||
a05423cb6a | |||
cdd993c39e | |||
a7f4af0139 | |||
225fc7cbcf | |||
9760a7a831 | |||
9a3cc64f9d | |||
3d0eeac7a8 | |||
31ba817cc3 | |||
e4dd367a4f | |||
043fb982c5 | |||
7f3ea64d61 | |||
d343f5847b | |||
55c8d82eb1 | |||
d679267c46 | |||
bdd3246271 |
2
.hgtags
Normal file
2
.hgtags
Normal file
@ -0,0 +1,2 @@
|
||||
cbc18c988236c63a58ed24031805e8d36a3ad01a 0.1
|
||||
f245ac2efd8ac2f1ac6bffae876c2663e794f79d 0.1.1
|
9
README
9
README
@ -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
|
||||
-------
|
||||
|
12
TODO
12
TODO
@ -9,7 +9,13 @@ code & interface
|
||||
----------------
|
||||
|
||||
* clean selection code
|
||||
* use the real x11 clipboard
|
||||
* clean terminfo entry
|
||||
* utf8
|
||||
* clean and complete terminfo entry
|
||||
* fix shift up/down (shift selection in emacs)
|
||||
* fast drawing
|
||||
* ...
|
||||
|
||||
misc
|
||||
----
|
||||
|
||||
$ grep -nE 'XXX|TODO' st.c
|
||||
|
||||
|
57
config.def.h
57
config.def.h
@ -5,7 +5,7 @@
|
||||
#define BORDER 2
|
||||
#define SHELL "/bin/sh"
|
||||
|
||||
/* Terminal colors */
|
||||
/* Terminal colors (16 first used in escape sequence) */
|
||||
static const char *colorname[] = {
|
||||
"black",
|
||||
"red3",
|
||||
@ -25,33 +25,40 @@ static const char *colorname[] = {
|
||||
"white"
|
||||
};
|
||||
|
||||
/* Default colors (colorname index) */
|
||||
/* foreground, background, cursor */
|
||||
/* Default colors (colorname index)
|
||||
foreground, background, cursor */
|
||||
#define DefaultFG 7
|
||||
#define DefaultBG 0
|
||||
#define DefaultCS 1
|
||||
|
||||
/* 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[] = {
|
||||
{ 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~" },
|
||||
{ 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~" },
|
||||
};
|
||||
|
||||
/* Line drawing characters (sometime specific to each font...) */
|
||||
@ -61,3 +68,7 @@ static char gfx[] = {
|
||||
['i'] = '#',
|
||||
[255] = 0,
|
||||
};
|
||||
|
||||
/* double-click timeout (in milliseconds) between clicks for selection */
|
||||
#define DOUBLECLICK_TIMEOUT 300
|
||||
#define TRIPLECLICK_TIMEOUT (2*DOUBLECLICK_TIMEOUT)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# st version
|
||||
VERSION = 0.0
|
||||
VERSION = 0.1.1
|
||||
|
||||
# Customize below to fit your system
|
||||
|
||||
|
32
st.1
32
st.1
@ -1,4 +1,4 @@
|
||||
.TH ST 1 st-VERSION
|
||||
.TH ST 1 st\-VERSION
|
||||
.SH NAME
|
||||
st \- simple terminal
|
||||
.SH SYNOPSIS
|
||||
@ -7,26 +7,32 @@ st \- simple terminal
|
||||
.IR class ]
|
||||
.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 \-t " title"
|
||||
defines the window title (default 'st').
|
||||
.TP
|
||||
.B \-c class
|
||||
Overrides the default class ($TERM)
|
||||
.BI \-c " class"
|
||||
defines the window class (default $TERM).
|
||||
.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.
|
||||
|
13
st.info
13
st.info
@ -33,8 +33,11 @@ st| simpleterm,
|
||||
ed=\E[J,
|
||||
el=\E[K,
|
||||
el1=\E[1K,
|
||||
flash=\E[?5h\E[?5l,
|
||||
fsl=^G,
|
||||
home=\E[H,
|
||||
hpa=\E[%i%p1%dG,
|
||||
hs,
|
||||
ht=^I,
|
||||
hts=\EH,
|
||||
ich=\E[%p1%d@,
|
||||
@ -49,6 +52,10 @@ st| simpleterm,
|
||||
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,17 +73,19 @@ 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,
|
||||
rmacs=\E(B,
|
||||
rmcup=\E[?1049l,
|
||||
rmso=\E[m,
|
||||
rmul=\E[m,
|
||||
sc=\E7,
|
||||
@ -85,9 +94,11 @@ st| simpleterm,
|
||||
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,
|
||||
smacs=\E(0,
|
||||
smcup=\E[?1049h,
|
||||
smso=\E[7m,
|
||||
smul=\E[4m,
|
||||
tbc=\E[2g,
|
||||
tsl=\E]0;,
|
||||
ul,
|
||||
xenl,
|
||||
|
||||
|
Reference in New Issue
Block a user