mirror of
git://git.suckless.org/st
synced 2025-07-27 18:22:05 -07:00
Compare commits
133 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
0baf2d8be5 | ||
|
62f9142478 | ||
|
a495fce128 | ||
|
6f4cfa5136 | ||
|
672e4e4b03 | ||
|
45b808b88e | ||
|
71328cbcdc | ||
|
85f8a414be | ||
|
78f8843bc7 | ||
|
96c230e476 | ||
|
6166a1afc8 | ||
|
cf332a325d | ||
|
1584956a60 | ||
|
d2ec39f0ef | ||
|
1f0d981bd7 | ||
|
cdb3b1892a | ||
|
315b7ee9ce | ||
|
c2026a4950 | ||
|
6521b5dc32 | ||
|
a8d5870073 | ||
|
21d905c076 | ||
|
9523233e25 | ||
|
d2173cd716 | ||
|
9559100130 | ||
|
c0a56ef4be | ||
|
9df9a4723d | ||
|
e8dba89164 | ||
|
33da67dac0 | ||
|
d60ee7337b | ||
|
ef1dc9fc4b | ||
|
6162d63151 | ||
|
fb8e3f67f7 | ||
|
39f28b18b7 | ||
|
2738592de6 | ||
|
08a3eea571 | ||
|
53474391bc | ||
|
1fe0a5f39a | ||
|
4435e0ee67 | ||
|
7263820759 | ||
|
1fa27b93f9 | ||
|
3d3c37bc70 | ||
|
489982d4b8 | ||
|
297c886b72 | ||
|
0f6942cdf6 | ||
|
8e577322a3 | ||
|
939e149544 | ||
|
02ae3ce6fd | ||
|
7a4eefe87c | ||
|
c5c2365ab7 | ||
|
62ab938965 | ||
|
2b1bc8087f | ||
|
eeae9b0cee | ||
|
8ac0a5f872 | ||
|
eae31a532e | ||
|
cc2ea3147a | ||
|
bef599bb27 | ||
|
210dda9570 | ||
|
a4358a1fbd | ||
|
4245ba0d12 | ||
|
f3d438b101 | ||
|
587bc939f6 | ||
|
8d21ced085 | ||
|
4579693818 | ||
|
347a45c352 | ||
|
22eeda56b7 | ||
|
86c03ddc82 | ||
|
7e3cff33ff | ||
|
aaee0e8b28 | ||
|
8dde8cde41 | ||
|
33ad83d492 | ||
|
40e4d76d22 | ||
|
fbc589d506 | ||
|
6fc471ccc6 | ||
|
8b602a37a6 | ||
|
6e1c7c8afc | ||
|
90c6f055b6 | ||
|
ebbac77d74 | ||
|
7af030c999 | ||
|
5d3318c0c7 | ||
|
369734c80c | ||
|
2cf4f366d6 | ||
|
7530694987 | ||
|
d743b93fda | ||
|
317b785921 | ||
|
405fd89ac1 | ||
|
8315dc4179 | ||
|
b5144100a5 | ||
|
8f1bef0502 | ||
|
8f47c4a4de | ||
|
62502a88e9 | ||
|
678eff6e18 | ||
|
8e968739c3 | ||
|
0c2b513d01 | ||
|
634c247fa7 | ||
|
5938fa9d32 | ||
|
8618386de9 | ||
|
e1458ef467 | ||
|
911ba5674b | ||
|
a53017c8b4 | ||
|
a77b01176a | ||
|
1e09726518 | ||
|
1b2751f5c2 | ||
|
0851f2be2a | ||
|
011c0f9e5b | ||
|
048c54fd5b | ||
|
6b03bb769a | ||
|
db6f796ecf | ||
|
7ea6863208 | ||
|
8037dac847 | ||
|
2bd6afd1c9 | ||
|
b596d6ba3c | ||
|
872a7f18ea | ||
|
3c546ae739 | ||
|
645c1b0afc | ||
|
e5ff746430 | ||
|
da182612b7 | ||
|
b7e6a5c825 | ||
|
3ae0299064 | ||
|
fed9968ba5 | ||
|
0ca0dd8b11 | ||
|
c371fe58a3 | ||
|
44db38a5f8 | ||
|
4de64fa4d2 | ||
|
de4cd2f6af | ||
|
1e7816c202 | ||
|
5dc48af29e | ||
|
5984657c00 | ||
|
4018b2c507 | ||
|
ddd429ea24 | ||
|
684cf55a0d | ||
|
b1813b14d9 | ||
|
580c8bbd46 | ||
|
502911e554 |
58
FAQ
58
FAQ
@@ -1,43 +1,35 @@
|
||||
--
|
||||
Why does st not handle utmp entries?
|
||||
## Why does st not handle utmp entries?
|
||||
|
||||
Use the excellent tool of utmp[0] for this task.
|
||||
Use the excellent tool of [utmp](http://git.suckless.org/utmp/) for this task.
|
||||
|
||||
[0] http://git.suckless.org/utmp/
|
||||
--
|
||||
Some _random program_ complains that st is unknown/not
|
||||
recognised/unsupported/whatever!
|
||||
## Some _random program_ complains that st is unknown/not recognised/unsupported/whatever!
|
||||
|
||||
It means that st doesn’t have any terminfo entry on your system. Chances are
|
||||
you did not make install. If you just want to test it without installing it,
|
||||
you can manualy run tic -s st.info in st dir. It will compile st.info into a
|
||||
fully working local terminfo description. You can delete it when you’re done.
|
||||
--
|
||||
Nothing works, and nothing is said about an unknown terminal!
|
||||
you did not `make install`. If you just want to test it without installing it,
|
||||
you can manualy run `tic -s st.info`.
|
||||
|
||||
## Nothing works, and nothing is said about an unknown terminal!
|
||||
|
||||
* Some programs just assume they’re running in xterm i.e. they don’t rely on
|
||||
terminfo. What you see is the current state of the “xterm compliance”.
|
||||
* Some programs don’t complain about the lacking st description and default to
|
||||
another terminal. In that case see the question about terminfo.
|
||||
--
|
||||
I get some weird glitches/visual bug on _random program_!
|
||||
|
||||
Try lauching it with a different TERM: $ TERM=xterm myapp. toe(1) will give
|
||||
you a list of available terminals, but you’ll most likely switch between
|
||||
xterm, st or st-256color. The default value for TERM can be changed in
|
||||
config.h (TNAME).
|
||||
--
|
||||
How do I scroll back up?
|
||||
## I get some weird glitches/visual bug on _random program_!
|
||||
|
||||
Invoke st with a screen multiplexer like GNU screen[0] or tmux[1].
|
||||
st -e screen works better for text reflowing. To enter screen’s scroll
|
||||
back mode aka “copy mode”, it’s C-a ESC. You probably want defscrollback
|
||||
10000 in your ~/.screenrc too.
|
||||
Try launching it with a different TERM: $ TERM=xterm myapp. toe(1) will give
|
||||
you a list of available terminals, but you’ll most likely switch between xterm,
|
||||
st or st-256color. The default value for TERM can be changed in config.h
|
||||
(TNAME).
|
||||
|
||||
[0] http://en.wikipedia.org/wiki/GNU_Screen
|
||||
[1] http://en.wikipedia.org/wiki/Tmux
|
||||
--
|
||||
Why doesn't the Del key work in some programs?
|
||||
## How do I scroll back up?
|
||||
|
||||
Using a terminal multiplexer.
|
||||
|
||||
* `st -e tmux` using C-b [
|
||||
* `st -e screen` using C-a ESC
|
||||
|
||||
## Why doesn't the Del key work in some programs?
|
||||
|
||||
Taken from the terminfo manpage:
|
||||
|
||||
@@ -49,7 +41,7 @@ Taken from the terminfo manpage:
|
||||
codes as smkx and rmkx. Otherwise the keypad is assumed to
|
||||
always transmit.
|
||||
|
||||
In the st case smkx=\E[?1h\E= and rmkx=\E[?1l\E>, so it is mandatory that
|
||||
In the st case smkx=E[?1hE= and rmkx=E[?1lE>, so it is mandatory that
|
||||
applications which want to test against keypad keys, have to send these
|
||||
sequences.
|
||||
|
||||
@@ -73,7 +65,7 @@ Adding this option to your .inputrc will fix the keypad problem for all
|
||||
applications using readline.
|
||||
|
||||
If you are using zsh, then read the zsh FAQ
|
||||
(http://zsh.sourceforge.net/FAQ/zshfaq03.html#l25):
|
||||
<http://zsh.sourceforge.net/FAQ/zshfaq03.html#l25>:
|
||||
|
||||
It should be noted that the O / [ confusion can occur with other keys
|
||||
such as Home and End. Some systems let you query the key sequences
|
||||
@@ -91,5 +83,9 @@ If you are using zsh, then read the zsh FAQ
|
||||
zle -N zle-line-finish
|
||||
|
||||
Putting these lines into your .zshrc will fix the problems.
|
||||
--
|
||||
|
||||
## How can use meta in 8bit mode?
|
||||
|
||||
St support meta in 8bit mode, but the default terminfo entry doesn't
|
||||
use this capability. If you want it, you have to use st-meta value
|
||||
in TERM.
|
||||
|
8
LICENSE
8
LICENSE
@@ -1,9 +1,15 @@
|
||||
MIT/X Consortium License
|
||||
|
||||
© 2009-2012 Aurélien APTEL <aurelien dot aptel at gmail dot com>
|
||||
© 2009 Anselm R Garbe <garbeam at gmail dot com>
|
||||
© 2012 Roberto E. Vargas Caballero <k0ga at shike2 dot com>
|
||||
© 2012 Christoph Lohmann <20h at r-36 dot net>
|
||||
© 2009 Anselm R Garbe <garbeam at gmail dot com>
|
||||
© 2013 Eon S. Jeon <esjeon at hyunmu dot am>
|
||||
© 2013 Alexander Sedov <alex0player at gmail dot com>
|
||||
© 2013 Mark Edgar <medgar123 at gmail dot com>
|
||||
© 2013 Eric Pruitt <eric.pruitt at gmail dot com>
|
||||
© 2013 Michael Forney <mforney at mforney dot org>
|
||||
© 2013 Markus Teich <markus dot teich at stusta dot mhn dot de>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
20
TODO
20
TODO
@@ -1,32 +1,24 @@
|
||||
vt emulation
|
||||
------------
|
||||
|
||||
* color definition in CSI
|
||||
* implement CSI parsing
|
||||
* wide-character support in conjunction with fallback xft code
|
||||
* mouse selection support
|
||||
* double-height support
|
||||
|
||||
code & interface
|
||||
----------------
|
||||
|
||||
* clean and complete terminfo entry
|
||||
* add fallback fonts for the restricted xft code
|
||||
* add a simple way to do multiplexing
|
||||
|
||||
drawing
|
||||
-------
|
||||
* add diacritics support to xdraws()
|
||||
* make the font cache simpler
|
||||
|
||||
bugs
|
||||
----
|
||||
|
||||
* fix shift up/down (shift selection in emacs)
|
||||
* fix selection paste for xatom STRING
|
||||
* fix rows and column definition in fixed geometry
|
||||
* fix -e handling
|
||||
* remove DEC test sequence when appropriate
|
||||
* reverse cursor when drawin light on light background
|
||||
* text should be readable
|
||||
* When some application outputting long text is run in the shell init scripts,
|
||||
then this text might be stripped to the standard 80x25 due to st running the
|
||||
virtual terminal at first priority. Maybe the vt initialisation could be
|
||||
moved somewhere after knowing the right window size.
|
||||
|
||||
misc
|
||||
----
|
||||
|
63
arg.h
Normal file
63
arg.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copy me if you can.
|
||||
* by 20h
|
||||
*/
|
||||
|
||||
#ifndef ARG_H__
|
||||
#define ARG_H__
|
||||
|
||||
extern char *argv0;
|
||||
|
||||
/* use main(int argc, char *argv[]) */
|
||||
#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
|
||||
argv[0] && argv[0][1]\
|
||||
&& argv[0][0] == '-';\
|
||||
argc--, argv++) {\
|
||||
char argc_;\
|
||||
char **argv_;\
|
||||
int brk_;\
|
||||
if (argv[0][1] == '-' && argv[0][2] == '\0') {\
|
||||
argv++;\
|
||||
argc--;\
|
||||
break;\
|
||||
}\
|
||||
for (brk_ = 0, argv[0]++, argv_ = argv;\
|
||||
argv[0][0] && !brk_;\
|
||||
argv[0]++) {\
|
||||
if (argv_ != argv)\
|
||||
break;\
|
||||
argc_ = argv[0][0];\
|
||||
switch (argc_)
|
||||
|
||||
/* Handles obsolete -NUM syntax */
|
||||
#define ARGNUM case '0':\
|
||||
case '1':\
|
||||
case '2':\
|
||||
case '3':\
|
||||
case '4':\
|
||||
case '5':\
|
||||
case '6':\
|
||||
case '7':\
|
||||
case '8':\
|
||||
case '9'
|
||||
|
||||
#define ARGEND }\
|
||||
}
|
||||
|
||||
#define ARGC() argc_
|
||||
|
||||
#define ARGNUMF(base) (brk_ = 1, estrtol(argv[0], (base)))
|
||||
|
||||
#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\
|
||||
((x), abort(), (char *)0) :\
|
||||
(brk_ = 1, (argv[0][1] != '\0')?\
|
||||
(&argv[0][1]) :\
|
||||
(argc--, argv++, argv[0])))
|
||||
|
||||
#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\
|
||||
(char *)0 :\
|
||||
(brk_ = 1, (argv[0][1] != '\0')?\
|
||||
(&argv[0][1]) :\
|
||||
(argc--, argv++, argv[0])))
|
||||
|
||||
#endif
|
104
config.def.h
104
config.def.h
@@ -9,14 +9,40 @@ static char font[] = "Liberation Mono:pixelsize=12:antialias=false:autohint=fals
|
||||
static int borderpx = 2;
|
||||
static char shell[] = "/bin/sh";
|
||||
|
||||
/* timeouts (in milliseconds) */
|
||||
/* Kerning / character bounding-box mutlipliers */
|
||||
float cwscale = 1.0;
|
||||
float chscale = 1.0;
|
||||
|
||||
/*
|
||||
* word delimiter string
|
||||
*
|
||||
* More advanced example: " `'\"()[]{}"
|
||||
*/
|
||||
static char worddelimiters[] = " ";
|
||||
|
||||
/* selection timeouts (in milliseconds) */
|
||||
static unsigned int doubleclicktimeout = 300;
|
||||
static unsigned int tripleclicktimeout = 600;
|
||||
|
||||
/* alt screens */
|
||||
static bool allowaltscreen = true;
|
||||
|
||||
/* frames per second st should at maximum draw to the screen */
|
||||
static unsigned int xfps = 60;
|
||||
static unsigned int xfps = 120;
|
||||
static unsigned int actionfps = 30;
|
||||
|
||||
/*
|
||||
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
|
||||
* attribute.
|
||||
*/
|
||||
static unsigned int blinktimeout = 800;
|
||||
|
||||
/*
|
||||
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
|
||||
* it
|
||||
*/
|
||||
static int bellvolume = 0;
|
||||
|
||||
/* TERM value */
|
||||
static char termname[] = "st-256color";
|
||||
|
||||
@@ -49,18 +75,16 @@ static const char *colorname[] = {
|
||||
|
||||
/* more colors can be added after 255 to use with DefaultXX */
|
||||
"#cccccc",
|
||||
"#333333",
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Default colors (colorname index)
|
||||
* foreground, background, cursor, unfocused cursor
|
||||
* foreground, background, cursor
|
||||
*/
|
||||
static unsigned int defaultfg = 7;
|
||||
static unsigned int defaultbg = 0;
|
||||
static unsigned int defaultcs = 256;
|
||||
static unsigned int defaultucs = 257;
|
||||
|
||||
/*
|
||||
* Colors used, when the specific fg == defaultfg. So in reverse mode this
|
||||
@@ -70,16 +94,27 @@ static unsigned int defaultucs = 257;
|
||||
static unsigned int defaultitalic = 11;
|
||||
static unsigned int defaultunderline = 7;
|
||||
|
||||
/* Internal shortcuts. */
|
||||
/* Internal mouse shortcuts. */
|
||||
/* Beware that overloading Button1 will disable the selection. */
|
||||
static Mousekey mshortcuts[] = {
|
||||
/* button mask string */
|
||||
{ Button4, XK_ANY_MOD, "\031" },
|
||||
{ Button5, XK_ANY_MOD, "\005" },
|
||||
};
|
||||
|
||||
/* Internal keyboard 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} },
|
||||
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
||||
{ MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} },
|
||||
{ MODKEY, XK_Num_Lock, numlock, {.i = 0} },
|
||||
/* mask keysym function argument */
|
||||
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
|
||||
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
|
||||
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
|
||||
{ MODKEY|ShiftMask, XK_Prior, xzoom, {.i = +1} },
|
||||
{ MODKEY|ShiftMask, XK_Next, xzoom, {.i = -1} },
|
||||
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
||||
{ MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} },
|
||||
{ MODKEY, XK_Num_Lock, numlock, {.i = 0} },
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -88,12 +123,12 @@ static Shortcut shortcuts[] = {
|
||||
* 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)
|
||||
* keypad value:
|
||||
* appkey value:
|
||||
* * 0: no value
|
||||
* * > 0: keypad application mode enabled
|
||||
* * = 2: term.numlock = 1
|
||||
* * < 0: keypad application mode disabled
|
||||
* cursor value:
|
||||
* appcursor value:
|
||||
* * 0: no value
|
||||
* * > 0: cursor application mode enabled
|
||||
* * < 0: cursor application mode disabled
|
||||
@@ -103,26 +138,26 @@ static Shortcut shortcuts[] = {
|
||||
* * < 0: crlf mode is disabled
|
||||
*
|
||||
* Be careful with the order of the definitons because st searchs in
|
||||
* this table sequencially, so any XK_ANY_MOD must be in the last
|
||||
* this table sequentially, so any XK_ANY_MOD must be in the last
|
||||
* position for a key.
|
||||
*/
|
||||
|
||||
/*
|
||||
* If you want something else but the function keys of X11 (0xFF00 - 0xFFFF)
|
||||
* mapped below, add them to this array.
|
||||
* If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
|
||||
* to be mapped below, add them to this array.
|
||||
*/
|
||||
static KeySym mappedkeys[] = { -1 };
|
||||
|
||||
/*
|
||||
* Which bits of the state should be ignored. By default the state bit for the
|
||||
* keyboard layout (XK_SWITCH_MOD) is ignored.
|
||||
* State bits to ignore when matching key or button events. By default,
|
||||
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
|
||||
*/
|
||||
uint ignoremod = XK_SWITCH_MOD;
|
||||
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
|
||||
|
||||
/* key, mask, output, keypad, cursor, crlf */
|
||||
static Key key[] = {
|
||||
/* keysym mask string keypad cursor crlf */
|
||||
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, 0, 0},
|
||||
/* keysym mask string appkey appcursor crlf */
|
||||
{ XK_KP_Home, ShiftMask, "\033[2J", 0, -1, 0},
|
||||
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1, 0},
|
||||
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1, 0},
|
||||
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0},
|
||||
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0, 0},
|
||||
@@ -138,7 +173,7 @@ static Key key[] = {
|
||||
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1, 0},
|
||||
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1, 0},
|
||||
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0, 0},
|
||||
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0},
|
||||
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0},
|
||||
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0, 0},
|
||||
{ XK_KP_End, ControlMask, "\033[J", -1, 0, 0},
|
||||
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0, 0},
|
||||
@@ -153,10 +188,10 @@ static Key key[] = {
|
||||
{ XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0, 0},
|
||||
{ XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0},
|
||||
{ XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0},
|
||||
{ XK_KP_Delete, ControlMask, "\033[2J", -1, 0, 0},
|
||||
{ XK_KP_Delete, ControlMask, "\033[M", -1, 0, 0},
|
||||
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0, 0},
|
||||
{ XK_KP_Delete, ShiftMask, "\033[2K", +1, 0, 0},
|
||||
{ XK_KP_Delete, ShiftMask, "\033[3;2~", -1, 0, 0},
|
||||
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0, 0},
|
||||
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0, 0},
|
||||
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0},
|
||||
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0},
|
||||
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0, 0},
|
||||
@@ -191,7 +226,7 @@ static Key key[] = {
|
||||
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0, 0},
|
||||
{ XK_Left, ControlMask, "\033[1;5D", 0, 0, 0},
|
||||
{ XK_Left, Mod1Mask, "\033[1;3D", 0, 0, 0},
|
||||
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1, 0},
|
||||
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1, 0},
|
||||
{ XK_Left, XK_ANY_MOD, "\033OD", 0, +1, 0},
|
||||
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0, 0},
|
||||
{ XK_Right, ControlMask, "\033[1;5C", 0, 0, 0},
|
||||
@@ -209,13 +244,14 @@ static Key key[] = {
|
||||
{ XK_Insert, ControlMask, "\033[2;5~", +1, 0, 0},
|
||||
{ XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0},
|
||||
{ XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0},
|
||||
{ XK_Delete, ControlMask, "\033[2J", -1, 0, 0},
|
||||
{ XK_Delete, ControlMask, "\033[M", -1, 0, 0},
|
||||
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0, 0},
|
||||
{ XK_Delete, ShiftMask, "\033[2K", +1, 0, 0},
|
||||
{ XK_Delete, ShiftMask, "\033[3;2~", -1, 0, 0},
|
||||
{ XK_Delete, ShiftMask, "\033[2K", -1, 0, 0},
|
||||
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0, 0},
|
||||
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0},
|
||||
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0},
|
||||
{ XK_Home, ShiftMask, "\033[1;2H", 0, 0, 0},
|
||||
{ XK_Home, ShiftMask, "\033[2J", 0, -1, 0},
|
||||
{ XK_Home, ShiftMask, "\033[1;2H", 0, +1, 0},
|
||||
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1, 0},
|
||||
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0},
|
||||
{ XK_End, ControlMask, "\033[J", -1, 0, 0},
|
||||
@@ -225,7 +261,7 @@ static Key key[] = {
|
||||
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0, 0},
|
||||
{ XK_Prior, ControlMask, "\033[5;5~", 0, 0, 0},
|
||||
{ XK_Prior, ShiftMask, "\033[5;2~", 0, 0, 0},
|
||||
{ XK_Prior, XK_NO_MOD, "\033[5~", 0, 0, 0},
|
||||
{ XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0},
|
||||
{ XK_Next, ControlMask, "\033[6;5~", 0, 0, 0},
|
||||
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0, 0},
|
||||
{ XK_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0},
|
||||
@@ -249,7 +285,7 @@ static Key key[] = {
|
||||
{ XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0, 0},
|
||||
{ XK_F4, XK_NO_MOD, "\033OS" , 0, 0, 0},
|
||||
{ XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0, 0},
|
||||
{ XK_F4, /* F28 */ ShiftMask, "\033[1;5S", 0, 0, 0},
|
||||
{ XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0, 0},
|
||||
{ XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0, 0},
|
||||
{ XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0, 0},
|
||||
{ XK_F5, XK_NO_MOD, "\033[15~", 0, 0, 0},
|
||||
|
10
config.mk
10
config.mk
@@ -1,5 +1,5 @@
|
||||
# st version
|
||||
VERSION = 0.4
|
||||
VERSION = 0.5
|
||||
|
||||
# Customize below to fit your system
|
||||
|
||||
@@ -12,11 +12,11 @@ X11LIB = /usr/X11R6/lib
|
||||
|
||||
# includes and libs
|
||||
INCS = -I. -I/usr/include -I${X11INC} \
|
||||
$(shell pkg-config --cflags fontconfig) \
|
||||
$(shell pkg-config --cflags freetype2)
|
||||
`pkg-config --cflags fontconfig` \
|
||||
`pkg-config --cflags freetype2`
|
||||
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lutil -lXext -lXft \
|
||||
$(shell pkg-config --libs fontconfig) \
|
||||
$(shell pkg-config --libs freetype2)
|
||||
`pkg-config --libs fontconfig` \
|
||||
`pkg-config --libs freetype2`
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_XOPEN_SOURCE=600
|
||||
|
7
st.1
7
st.1
@@ -3,6 +3,7 @@
|
||||
st \- simple terminal
|
||||
.SH SYNOPSIS
|
||||
.B st
|
||||
.RB [ \-a ]
|
||||
.RB [ \-c
|
||||
.IR class ]
|
||||
.RB [ \-f
|
||||
@@ -23,6 +24,9 @@ st \- simple terminal
|
||||
is a simple terminal emulator.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-a
|
||||
disable alternate screens in terminal
|
||||
.TP
|
||||
.BI \-c " class"
|
||||
defines the window class (default $TERM).
|
||||
.TP
|
||||
@@ -33,6 +37,9 @@ to use when st is run.
|
||||
.TP
|
||||
.BI \-g " geometry"
|
||||
defines the X11 geometry string, which will fixate the height and width of st.
|
||||
The form is [=][<width>{xX}<height>][{+-}<xoffset>{+-}<yoffset>]. See
|
||||
.BR XParseGeometry (3)
|
||||
for further details.
|
||||
.TP
|
||||
.BI \-o " file"
|
||||
writes all the I/O to
|
||||
|
29
st.info
29
st.info
@@ -1,11 +1,9 @@
|
||||
# unsupported xterm caps are (getting) commented.
|
||||
# as soon as they work, uncomment them.
|
||||
st| simpleterm,
|
||||
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
|
||||
am,
|
||||
bce,
|
||||
bel=^G,
|
||||
# blink=\E[5m,
|
||||
blink=\E[5m,
|
||||
bold=\E[1m,
|
||||
cbt=\E[Z,
|
||||
cvvis=\E[?25h,
|
||||
@@ -47,7 +45,7 @@ st| simpleterm,
|
||||
ind=^J,
|
||||
indn=\E[%p1%dS,
|
||||
invis=\E[8m,
|
||||
is2=\E[4l\E>,
|
||||
is2=\E[4l\E>\E[?1034l,
|
||||
it#8,
|
||||
kel=\E[1;2F,
|
||||
ked=\E[1;5F,
|
||||
@@ -154,6 +152,9 @@ st| simpleterm,
|
||||
ncv#3,
|
||||
op=\E[39;49m,
|
||||
pairs#64,
|
||||
mc0=\E[i,
|
||||
mc4=\E[4i,
|
||||
mc5=\E[5i,
|
||||
rc=\E8,
|
||||
rev=\E[7m,
|
||||
ri=\EM,
|
||||
@@ -163,9 +164,9 @@ st| simpleterm,
|
||||
rmir=\E[4l,
|
||||
rmkx=\E[?1l\E>,
|
||||
rmso=\E[27m,
|
||||
rmul=\E[m,
|
||||
rmul=\E[24m,
|
||||
rs1=\Ec,
|
||||
rs2=\E[4l\E>,
|
||||
rs2=\E[4l\E>\E[?1034l,
|
||||
sc=\E7,
|
||||
setab=\E[4%p1%dm,
|
||||
setaf=\E[3%p1%dm,
|
||||
@@ -194,3 +195,19 @@ st-256color| simpleterm with 256 colors,
|
||||
# Nicked from xterm-256color
|
||||
setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
|
||||
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
|
||||
|
||||
st-meta| simpleterm with meta key,
|
||||
use=st,
|
||||
km,
|
||||
rmm=\E[?1034l,
|
||||
smm=\E[?1034h,
|
||||
rs2=\E[4l\E>\E[?1034h,
|
||||
is2=\E[4l\E>\E[?1034h,
|
||||
|
||||
st-meta-256color| simpleterm with meta key and 256 colors,
|
||||
use=st-256color,
|
||||
km,
|
||||
rmm=\E[?1034l,
|
||||
smm=\E[?1034h,
|
||||
rs2=\E[4l\E>\E[?1034h,
|
||||
is2=\E[4l\E>\E[?1034h,
|
||||
|
Reference in New Issue
Block a user