Compare 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 | ||
|
|
dbc2a3ea0f | ||
|
|
ff97be88d5 | ||
|
|
f27e662faa | ||
|
|
2ea66b9229 | ||
|
|
cabc2bed68 | ||
|
|
0d2e7feb3b | ||
|
|
77e8d5be18 | ||
|
|
111a8b00a2 | ||
|
|
5dd76fab8b | ||
|
|
191e59e438 | ||
|
|
0f37655939 | ||
|
|
1551e2db46 | ||
|
|
3cf9c2736c | ||
|
|
c1f5b697a8 | ||
|
|
94ddc3e0c4 | ||
|
|
37f079e063 | ||
|
|
58a650f089 | ||
|
|
e417230f38 | ||
|
|
0735e8e760 | ||
|
|
db3a27c8e6 | ||
|
|
f8d22ad159 | ||
|
|
4569bab9c2 | ||
|
|
ea4d528fb9 | ||
|
|
221a683ef2 | ||
|
|
90a56203a0 | ||
|
|
a6790adae7 | ||
|
|
f2388b19b9 | ||
|
|
311dd6952b | ||
|
|
53bdabe24a | ||
|
|
5822a9fe61 | ||
|
|
9daaad2214 | ||
|
|
b7d01d9b5c | ||
|
|
32cae5475a | ||
|
|
a4ee801882 | ||
|
|
9bbc040ea6 | ||
|
|
ad918b5a0b | ||
|
|
047aa071f3 | ||
|
|
d3440e1e0f | ||
|
|
9134535808 | ||
|
|
641b507220 | ||
|
|
6380a73364 | ||
|
|
a997fea2c0 | ||
|
|
e87203dea6 | ||
|
|
9c504814df | ||
|
|
c68dae91d2 | ||
|
|
95b236a22a | ||
|
|
c762fce23c | ||
|
|
5c7be4ad4d | ||
|
|
195aa6bb9c | ||
|
|
eef3cb4242 | ||
|
|
ce404f8263 | ||
|
|
8e1871bf8a | ||
|
|
ffd59a1b58 | ||
|
|
c5b2056ba9 | ||
|
|
2b3f6aca5a | ||
|
|
8c49888622 | ||
|
|
f2482b322a | ||
|
|
60df49df91 | ||
|
|
75143af77c | ||
|
|
87d1f98637 | ||
|
|
4449abbddb | ||
|
|
1d10e7865f | ||
|
|
639e493b95 | ||
|
|
6ee49bcd9a | ||
|
|
6fc43b0194 | ||
|
|
725ec8ff4a | ||
|
|
9669f718ab | ||
|
|
ca1f6675a1 | ||
|
|
dcc7f842bb | ||
|
|
35b33ee489 | ||
|
|
641dfd94e3 | ||
|
|
af113bd3fb | ||
|
|
4f5c7e3a31 | ||
|
|
1ba065d993 | ||
|
|
bc834723ec | ||
|
|
ecca0580cb | ||
|
|
ad2fdab6b6 | ||
|
|
4657805ec5 | ||
|
|
674926af15 | ||
|
|
70c9762434 | ||
|
|
913c0cbd34 | ||
|
|
27a7d85d0c | ||
|
|
acf921d410 | ||
|
|
5299e2bfa2 | ||
|
|
1def7a177e | ||
|
|
cf527c22d5 | ||
|
|
fa6a9216a1 | ||
|
|
fec59f7370 | ||
|
|
6f259b9257 | ||
|
|
8db9a192e5 | ||
|
|
85a94e2db9 | ||
|
|
8a3b1e0938 | ||
|
|
1494bb9f97 | ||
|
|
ab5e72dc39 | ||
|
|
f181bb29d8 | ||
|
|
c81ea29001 | ||
|
|
d1084bfdab | ||
|
|
66efdff768 | ||
|
|
b0672d0932 | ||
|
|
2bbe19f9d5 | ||
|
|
5f4fb527ce | ||
|
|
1552e2f1b9 | ||
|
|
c7861318e2 | ||
|
|
2a28e226a9 | ||
|
|
50d795d28c | ||
|
|
ba9e8eafe7 | ||
|
|
ba783c4517 | ||
|
|
5b945f0652 | ||
|
|
8898ecc34a | ||
|
|
a744f2f897 | ||
|
|
21a92b4dc9 | ||
|
|
8d12cb4035 | ||
|
|
bc4b43be44 | ||
|
|
fe32c542ec | ||
|
|
85e81bd8a6 | ||
|
|
a2d6f50665 | ||
|
|
7958b41040 | ||
|
|
be0878960e | ||
|
|
4d3b1f94c7 | ||
|
|
30024d585b | ||
|
|
29fafafb26 | ||
|
|
b36cf286b3 | ||
|
|
c23d259eb4 | ||
|
|
bddcc7f5ae | ||
|
|
0b2a2fc613 | ||
|
|
19d9334d96 | ||
|
|
6305137834 | ||
|
|
ae69ef6758 | ||
|
|
d8ce37bc3d | ||
|
|
678b66897a | ||
|
|
8e4ac364cb | ||
|
|
9224d3eaf2 | ||
|
|
2fab2ea5ed | ||
|
|
9364de4c64 | ||
|
|
28abdd24c7 | ||
|
|
f806677a0b | ||
|
|
633983cfc7 | ||
|
|
e6b37f2f87 | ||
|
|
da01ce7465 | ||
|
|
c740fb5be8 | ||
|
|
ad4256295b | ||
|
|
6bcdd0edd5 | ||
|
|
7e57d1fbba | ||
|
|
841d2339e3 | ||
|
|
4063ddb6dc | ||
|
|
db20559694 | ||
|
|
76c66a3556 | ||
|
|
2346bd1d39 | ||
|
|
019a118b67 | ||
|
|
3993557404 | ||
|
|
fbac4d5cb6 | ||
|
|
3333bca385 | ||
|
|
23bc536ebd | ||
|
|
f917857f4e | ||
|
|
eb92c4da84 | ||
|
|
d16fdbb6fa | ||
|
|
f757e6f839 | ||
|
|
dadd3d0a6d | ||
|
|
1bc8d0beb3 | ||
|
|
7c63f47d3d | ||
|
|
bed0807e77 | ||
|
|
c9e63f9c30 | ||
|
|
61f6e92f65 | ||
|
|
f513f1d9da | ||
|
|
3e8930a7a6 | ||
|
|
df9140d050 | ||
|
|
3f14681cd6 | ||
|
|
9995f245ee | ||
|
|
e4be8afef2 | ||
|
|
9a644176d0 | ||
|
|
130b90d8d0 | ||
|
|
62872197f8 | ||
|
|
19a38b1fd3 | ||
|
|
512ca99d8c | ||
|
|
538a0c4431 | ||
|
|
75b1565fdc | ||
|
|
4059fb04fa | ||
|
|
1ebcc5c97b | ||
|
|
28f831b74b | ||
|
|
38c5ff876d | ||
|
|
2803f76fa8 | ||
|
|
d272d5a95e | ||
|
|
a4e3e95194 | ||
|
|
9e7b36d72b |
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
cbc18c988236c63a58ed24031805e8d36a3ad01a 0.1
|
||||||
|
f245ac2efd8ac2f1ac6bffae876c2663e794f79d 0.1.1
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
## Why does st not handle utmp entries?
|
|
||||||
|
|
||||||
Use the excellent tool of [utmp](http://git.suckless.org/utmp/) for this task.
|
|
||||||
|
|
||||||
## 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`.
|
|
||||||
|
|
||||||
## 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 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).
|
|
||||||
|
|
||||||
## How do I scroll back up?
|
|
||||||
|
|
||||||
Using a terminal multiplexer.
|
|
||||||
|
|
||||||
* `st -e tmux` using C-a [
|
|
||||||
* `st -e screen` using C-a ESC
|
|
||||||
|
|
||||||
## Why doesn't the Del key work in some programs?
|
|
||||||
|
|
||||||
Taken from the terminfo manpage:
|
|
||||||
|
|
||||||
If the terminal has a keypad that transmits codes when the keys
|
|
||||||
are pressed, this information can be given. Note that it is not
|
|
||||||
possible to handle terminals where the keypad only works in
|
|
||||||
local (this applies, for example, to the unshifted HP 2621 keys).
|
|
||||||
If the keypad can be set to transmit or not transmit, tive these
|
|
||||||
codes as smkx and rmkx. Otherwise the keypad is assumed to
|
|
||||||
always transmit.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
But buggy applications like bash and irssi for example don't do this. A fast
|
|
||||||
solution for them is to use the following command:
|
|
||||||
|
|
||||||
$ printf "\033?1h\033=" >/dev/tty
|
|
||||||
|
|
||||||
or
|
|
||||||
$ echo $(tput smkx) >/dev/tty
|
|
||||||
|
|
||||||
In the case of bash readline is used. Readline has a different note in its
|
|
||||||
manpage about this issue:
|
|
||||||
|
|
||||||
enable-keypad (Off)
|
|
||||||
When set to On, readline will try to enable the
|
|
||||||
application keypad when it is called. Some systems
|
|
||||||
need this to enable arrow keys.
|
|
||||||
|
|
||||||
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>:
|
|
||||||
|
|
||||||
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
|
|
||||||
sent by these keys from the system's terminal database, terminfo.
|
|
||||||
Unfortunately, the key sequences given there typically apply to the
|
|
||||||
mode that is not the one zsh uses by default (it's the "application"
|
|
||||||
mode rather than the "raw" mode). Explaining the use of terminfo is
|
|
||||||
outside of the scope of this FAQ, but if you wish to use the key
|
|
||||||
sequences given there you can tell the line editor to turn on
|
|
||||||
"application" mode when it starts and turn it off when it stops:
|
|
||||||
|
|
||||||
function zle-line-init () { echoti smkx }
|
|
||||||
function zle-line-finish () { echoti rmkx }
|
|
||||||
zle -N zle-line-init
|
|
||||||
zle -N zle-line-finish
|
|
||||||
|
|
||||||
Putting these lines into your .zshrc will fix the problems.
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
||||||
@@ -1,24 +1,25 @@
|
|||||||
MIT/X Consortium License
|
Copyright (c) 2009, Aurélien APTEL <aurelien dot aptel at gmail dot com>
|
||||||
|
Copyright (c) 2009, Anselm R Garbe <garbeam at gmail dot com>
|
||||||
|
|
||||||
© 2009-2012 Aurélien APTEL <aurelien dot aptel at gmail dot com>
|
Redistribution and use in source and binary forms, with or without
|
||||||
© 2012 Roberto E. Vargas Caballero <k0ga at shike2 dot com>
|
modification, are permitted provided that the following conditions are met:
|
||||||
© 2012 Christoph Lohmann <20h at r-36 dot net>
|
* Redistributions of source code must retain the above copyright
|
||||||
© 2009 Anselm R Garbe <garbeam at gmail dot com>
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the copyright holder nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
copy of this software and associated documentation files (the "Software"),
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
to deal in the Software without restriction, including without limitation
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
and/or sell copies of the Software, and to permit persons to whom the
|
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
Software is furnished to do so, subject to the following conditions:
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
The above copyright notice and this permission notice shall be included in
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
all copies or substantial portions of the Software.
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
DEALINGS IN THE SOFTWARE.
|
|
||||||
@@ -48,7 +48,6 @@ install: all
|
|||||||
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
||||||
@sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1
|
@sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1
|
||||||
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1
|
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1
|
||||||
@echo Please see the README file regarding the terminfo entry of st.
|
|
||||||
@tic -s st.info
|
@tic -s st.info
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
|
|||||||
@@ -21,14 +21,15 @@ necessary as root):
|
|||||||
|
|
||||||
Running st
|
Running st
|
||||||
----------
|
----------
|
||||||
If you did not install st with make clean install, you must compile
|
If you don't install st, define TNAME to "xterm" in config.h or make sure to at
|
||||||
the st terminfo entry with the following command:
|
least compile st terminfo entry with the following command:
|
||||||
|
|
||||||
tic -s st.info
|
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.
|
See the man page for additional details.
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
-------
|
-------
|
||||||
Based on Aurélien APTEL <aurelien dot aptel at gmail dot com> bt source code.
|
Based on Aurélien APTEL <aurelien dot aptel at gmail dot com> bt source code.
|
||||||
|
|
||||||
@@ -1,35 +1,18 @@
|
|||||||
vt emulation
|
vt emulation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* wide-character support in conjunction with fallback xft code
|
* screen erased with background color ## capname:bce
|
||||||
* double-height support
|
* back tab ## capname:cbt ## seq:CSI Z
|
||||||
|
* ...
|
||||||
|
|
||||||
code & interface
|
code & interface
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
* clean selection code
|
||||||
* clean and complete terminfo entry
|
* clean and complete terminfo entry
|
||||||
* add a simple way to do multiplexing
|
|
||||||
|
|
||||||
drawing
|
|
||||||
-------
|
|
||||||
* add diacritics support to xdraws()
|
|
||||||
* add kerning configuration
|
|
||||||
* make the font cache simpler
|
|
||||||
* add hard width handling
|
|
||||||
* xft is reporting wrong width and height for characters
|
|
||||||
|
|
||||||
bugs
|
|
||||||
----
|
|
||||||
|
|
||||||
* fix shift up/down (shift selection in emacs)
|
* fix shift up/down (shift selection in emacs)
|
||||||
* fix selection paste for xatom STRING
|
* fast drawing
|
||||||
* fix rows and column definition in fixed geometry
|
* ...
|
||||||
* fix -e handling
|
|
||||||
* remove DEC test sequence when appropriate
|
|
||||||
* 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
|
misc
|
||||||
----
|
----
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copy me if you can.
|
|
||||||
* by 20h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __ARG_H__
|
|
||||||
#define __ARG_H__
|
|
||||||
|
|
||||||
extern char *argv0;
|
|
||||||
|
|
||||||
#define USED(x) ((void)(x))
|
|
||||||
|
|
||||||
/* 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)
|
|
||||||
|
|
||||||
#define ARGEND }\
|
|
||||||
USED(_argc);\
|
|
||||||
}\
|
|
||||||
USED(argv);\
|
|
||||||
USED(argc);
|
|
||||||
|
|
||||||
#define ARGC() _argc
|
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
+47
-305
@@ -1,34 +1,12 @@
|
|||||||
/* See LICENSE file for copyright and license details. */
|
#define TAB 8
|
||||||
|
#define TNAME "st-256color"
|
||||||
/*
|
#define FONT "-*-*-medium-r-*-*-*-120-75-75-*-60-*-*"
|
||||||
* appearance
|
#define BOLDFONT "-*-*-bold-r-*-*-*-120-75-75-*-60-*-*"
|
||||||
*
|
#define BORDER 2
|
||||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
#define SHELL "/bin/sh"
|
||||||
*/
|
|
||||||
static char font[] = "Liberation Mono:pixelsize=12:antialias=false:autohint=false";
|
|
||||||
static int borderpx = 2;
|
|
||||||
static char shell[] = "/bin/sh";
|
|
||||||
|
|
||||||
/* 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 actionfps = 30;
|
|
||||||
|
|
||||||
/* TERM value */
|
|
||||||
static char termname[] = "st-256color";
|
|
||||||
|
|
||||||
static unsigned int tabspaces = 8;
|
|
||||||
|
|
||||||
|
|
||||||
/* Terminal colors (16 first used in escape sequence) */
|
/* 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",
|
||||||
@@ -37,8 +15,6 @@ static const char *colorname[] = {
|
|||||||
"magenta3",
|
"magenta3",
|
||||||
"cyan3",
|
"cyan3",
|
||||||
"gray90",
|
"gray90",
|
||||||
|
|
||||||
/* 8 bright colors */
|
|
||||||
"gray50",
|
"gray50",
|
||||||
"red",
|
"red",
|
||||||
"green",
|
"green",
|
||||||
@@ -46,287 +22,53 @@ 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",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Default colors (colorname index)
|
||||||
|
foreground, background, cursor */
|
||||||
|
#define DefaultFG 7
|
||||||
|
#define DefaultBG 0
|
||||||
|
#define DefaultCS 1
|
||||||
|
|
||||||
/*
|
/* Special keys (change & recompile st.info accordingly)
|
||||||
* Default colors (colorname index)
|
Keep in mind that kpress() in st.c hardcodes some keys.
|
||||||
* foreground, background, cursor
|
|
||||||
*/
|
|
||||||
static unsigned int defaultfg = 7;
|
|
||||||
static unsigned int defaultbg = 0;
|
|
||||||
static unsigned int defaultcs = 256;
|
|
||||||
|
|
||||||
/*
|
Mask value:
|
||||||
* Colors used, when the specific fg == defaultfg. So in reverse mode this
|
* Use XK_ANY_MOD to match the key no matter modifiers state
|
||||||
* will reverse too. Another logic would only make the simple feature too
|
* Use XK_NO_MOD to match the key alone (no modifiers)
|
||||||
* complex.
|
|
||||||
*/
|
key, mask, output */
|
||||||
static unsigned int defaultitalic = 11;
|
|
||||||
static unsigned int defaultunderline = 7;
|
|
||||||
|
|
||||||
/* 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} },
|
|
||||||
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
|
||||||
{ MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} },
|
|
||||||
{ MODKEY, XK_Num_Lock, numlock, {.i = 0} },
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Special keys (change & recompile st.info accordingly)
|
|
||||||
*
|
|
||||||
* 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:
|
|
||||||
* * 0: no value
|
|
||||||
* * > 0: keypad application mode enabled
|
|
||||||
* * = 2: term.numlock = 1
|
|
||||||
* * < 0: keypad application mode disabled
|
|
||||||
* cursor value:
|
|
||||||
* * 0: no value
|
|
||||||
* * > 0: cursor application mode enabled
|
|
||||||
* * < 0: cursor application mode disabled
|
|
||||||
* crlf value
|
|
||||||
* * 0: no value
|
|
||||||
* * > 0: crlf mode is enabled
|
|
||||||
* * < 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
|
|
||||||
* position for a key.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If you want something else but the function keys of X11 (0xFF00 - 0xFFFF)
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
uint ignoremod = XK_SWITCH_MOD;
|
|
||||||
|
|
||||||
/* key, mask, output, keypad, cursor, crlf */
|
|
||||||
static Key key[] = {
|
static Key key[] = {
|
||||||
/* keysym mask string keypad cursor crlf */
|
{ XK_BackSpace, XK_NO_MOD, "\177" },
|
||||||
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, 0, 0},
|
{ XK_Insert, XK_NO_MOD, "\033[2~" },
|
||||||
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1, 0},
|
{ XK_Delete, XK_NO_MOD, "\033[3~" },
|
||||||
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0},
|
{ XK_Home, XK_NO_MOD, "\033[1~" },
|
||||||
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0, 0},
|
{ XK_End, XK_NO_MOD, "\033[4~" },
|
||||||
{ XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1, 0},
|
{ XK_Prior, XK_NO_MOD, "\033[5~" },
|
||||||
{ XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1, 0},
|
{ XK_Next, XK_NO_MOD, "\033[6~" },
|
||||||
{ XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0, 0},
|
{ XK_F1, XK_NO_MOD, "\033OP" },
|
||||||
{ XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1, 0},
|
{ XK_F2, XK_NO_MOD, "\033OQ" },
|
||||||
{ XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1, 0},
|
{ XK_F3, XK_NO_MOD, "\033OR" },
|
||||||
{ XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0, 0},
|
{ XK_F4, XK_NO_MOD, "\033OS" },
|
||||||
{ XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1, 0},
|
{ XK_F5, XK_NO_MOD, "\033[15~" },
|
||||||
{ XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1, 0},
|
{ XK_F6, XK_NO_MOD, "\033[17~" },
|
||||||
{ XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0, 0},
|
{ XK_F7, XK_NO_MOD, "\033[18~" },
|
||||||
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1, 0},
|
{ XK_F8, XK_NO_MOD, "\033[19~" },
|
||||||
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1, 0},
|
{ XK_F9, XK_NO_MOD, "\033[20~" },
|
||||||
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0, 0},
|
{ XK_F10, XK_NO_MOD, "\033[21~" },
|
||||||
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0},
|
{ XK_F11, XK_NO_MOD, "\033[23~" },
|
||||||
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0, 0},
|
{ XK_F12, XK_NO_MOD, "\033[24~" },
|
||||||
{ XK_KP_End, ControlMask, "\033[J", -1, 0, 0},
|
|
||||||
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0, 0},
|
|
||||||
{ XK_KP_End, ShiftMask, "\033[K", -1, 0, 0},
|
|
||||||
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0, 0},
|
|
||||||
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0, 0},
|
|
||||||
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0, 0},
|
|
||||||
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0},
|
|
||||||
{ XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0, 0},
|
|
||||||
{ XK_KP_Insert, ShiftMask, "\033[4l", -1, 0, 0},
|
|
||||||
{ XK_KP_Insert, ControlMask, "\033[L", -1, 0, 0},
|
|
||||||
{ 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[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, 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},
|
|
||||||
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0, 0},
|
|
||||||
{ XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0, 0},
|
|
||||||
{ XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0, -1},
|
|
||||||
{ XK_KP_Enter, XK_ANY_MOD, "\r\n", -1, 0, +1},
|
|
||||||
{ XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0, 0},
|
|
||||||
{ XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0, 0},
|
|
||||||
{ XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0, 0},
|
|
||||||
{ XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0, 0},
|
|
||||||
{ XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0, 0},
|
|
||||||
{ XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0, 0},
|
|
||||||
{ XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0, 0},
|
|
||||||
{ XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0, 0},
|
|
||||||
{ XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0, 0},
|
|
||||||
{ XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0, 0},
|
|
||||||
{ XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0, 0},
|
|
||||||
{ XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0, 0},
|
|
||||||
{ XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0, 0},
|
|
||||||
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0, 0},
|
|
||||||
{ XK_Up, ShiftMask, "\033[1;2A", 0, 0, 0},
|
|
||||||
{ XK_Up, ControlMask, "\033[1;5A", 0, 0, 0},
|
|
||||||
{ XK_Up, Mod1Mask, "\033[1;3A", 0, 0, 0},
|
|
||||||
{ XK_Up, XK_ANY_MOD, "\033[A", 0, -1, 0},
|
|
||||||
{ XK_Up, XK_ANY_MOD, "\033OA", 0, +1, 0},
|
|
||||||
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0, 0},
|
|
||||||
{ XK_Down, ControlMask, "\033[1;5B", 0, 0, 0},
|
|
||||||
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0, 0},
|
|
||||||
{ XK_Down, XK_ANY_MOD, "\033[B", 0, -1, 0},
|
|
||||||
{ XK_Down, XK_ANY_MOD, "\033OB", 0, +1, 0},
|
|
||||||
{ 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, "\033OD", 0, +1, 0},
|
|
||||||
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0, 0},
|
|
||||||
{ XK_Right, ControlMask, "\033[1;5C", 0, 0, 0},
|
|
||||||
{ XK_Right, Mod1Mask, "\033[1;3C", 0, 0, 0},
|
|
||||||
{ XK_Right, XK_ANY_MOD, "\033[C", 0, -1, 0},
|
|
||||||
{ XK_Right, XK_ANY_MOD, "\033OC", 0, +1, 0},
|
|
||||||
{ XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0, 0},
|
|
||||||
{ XK_Return, Mod1Mask, "\033\r", 0, 0, -1},
|
|
||||||
{ XK_Return, Mod1Mask, "\033\r\n", 0, 0, +1},
|
|
||||||
{ XK_Return, XK_ANY_MOD, "\r", 0, 0, -1},
|
|
||||||
{ XK_Return, XK_ANY_MOD, "\r\n", 0, 0, +1},
|
|
||||||
{ XK_Insert, ShiftMask, "\033[4l", -1, 0, 0},
|
|
||||||
{ XK_Insert, ShiftMask, "\033[2;2~", +1, 0, 0},
|
|
||||||
{ XK_Insert, ControlMask, "\033[L", -1, 0, 0},
|
|
||||||
{ 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[3;5~", +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, 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},
|
|
||||||
{ XK_End, ControlMask, "\033[1;5F", +1, 0, 0},
|
|
||||||
{ XK_End, ShiftMask, "\033[K", -1, 0, 0},
|
|
||||||
{ XK_End, ShiftMask, "\033[1;2F", +1, 0, 0},
|
|
||||||
{ 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_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},
|
|
||||||
{ XK_F1, XK_NO_MOD, "\033OP" , 0, 0, 0},
|
|
||||||
{ XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0, 0},
|
|
||||||
{ XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0, 0},
|
|
||||||
{ XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0, 0},
|
|
||||||
{ XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0, 0},
|
|
||||||
{ XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0, 0},
|
|
||||||
{ XK_F2, XK_NO_MOD, "\033OQ" , 0, 0, 0},
|
|
||||||
{ XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0, 0},
|
|
||||||
{ XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0, 0},
|
|
||||||
{ XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0, 0},
|
|
||||||
{ XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0, 0},
|
|
||||||
{ XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0, 0},
|
|
||||||
{ XK_F3, XK_NO_MOD, "\033OR" , 0, 0, 0},
|
|
||||||
{ XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0, 0},
|
|
||||||
{ XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0, 0},
|
|
||||||
{ XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0, 0},
|
|
||||||
{ XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0, 0},
|
|
||||||
{ 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, /* 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},
|
|
||||||
{ XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0, 0},
|
|
||||||
{ XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0, 0},
|
|
||||||
{ XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0, 0},
|
|
||||||
{ XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0, 0},
|
|
||||||
{ XK_F6, XK_NO_MOD, "\033[17~", 0, 0, 0},
|
|
||||||
{ XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0, 0},
|
|
||||||
{ XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0, 0},
|
|
||||||
{ XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0, 0},
|
|
||||||
{ XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0, 0},
|
|
||||||
{ XK_F7, XK_NO_MOD, "\033[18~", 0, 0, 0},
|
|
||||||
{ XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0, 0},
|
|
||||||
{ XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0, 0},
|
|
||||||
{ XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0, 0},
|
|
||||||
{ XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0, 0},
|
|
||||||
{ XK_F8, XK_NO_MOD, "\033[19~", 0, 0, 0},
|
|
||||||
{ XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0, 0},
|
|
||||||
{ XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0, 0},
|
|
||||||
{ XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0, 0},
|
|
||||||
{ XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0, 0},
|
|
||||||
{ XK_F9, XK_NO_MOD, "\033[20~", 0, 0, 0},
|
|
||||||
{ XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0, 0},
|
|
||||||
{ XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0, 0},
|
|
||||||
{ XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0, 0},
|
|
||||||
{ XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0, 0},
|
|
||||||
{ XK_F10, XK_NO_MOD, "\033[21~", 0, 0, 0},
|
|
||||||
{ XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0, 0},
|
|
||||||
{ XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0, 0},
|
|
||||||
{ XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0, 0},
|
|
||||||
{ XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0, 0},
|
|
||||||
{ XK_F11, XK_NO_MOD, "\033[23~", 0, 0, 0},
|
|
||||||
{ XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0, 0},
|
|
||||||
{ XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0, 0},
|
|
||||||
{ XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0, 0},
|
|
||||||
{ XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0, 0},
|
|
||||||
{ XK_F12, XK_NO_MOD, "\033[24~", 0, 0, 0},
|
|
||||||
{ XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0, 0},
|
|
||||||
{ XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0, 0},
|
|
||||||
{ XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0, 0},
|
|
||||||
{ XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0, 0},
|
|
||||||
{ XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0, 0},
|
|
||||||
{ XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0, 0},
|
|
||||||
{ XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0, 0},
|
|
||||||
{ XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0, 0},
|
|
||||||
{ XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0, 0},
|
|
||||||
{ XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0, 0},
|
|
||||||
{ XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0, 0},
|
|
||||||
{ XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0, 0},
|
|
||||||
{ XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0, 0},
|
|
||||||
{ XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0, 0},
|
|
||||||
{ XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0, 0},
|
|
||||||
{ XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0, 0},
|
|
||||||
{ XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0, 0},
|
|
||||||
{ XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0, 0},
|
|
||||||
{ XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0, 0},
|
|
||||||
{ XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0, 0},
|
|
||||||
{ XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0, 0},
|
|
||||||
{ XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0, 0},
|
|
||||||
{ XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0, 0},
|
|
||||||
{ XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0, 0},
|
|
||||||
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0, 0},
|
|
||||||
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0, 0},
|
|
||||||
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0, 0},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/* Line drawing characters (sometime specific to each font...) */
|
||||||
* Selection types' masks.
|
static char gfx[] = {
|
||||||
* Use the same masks as usual.
|
['f'] = 'o',
|
||||||
* Button1Mask is always unset, to make masks match between ButtonPress.
|
['g'] = '+',
|
||||||
* ButtonRelease and MotionNotify.
|
['i'] = '#',
|
||||||
* If no match is found, regular selection is used.
|
[255] = 0,
|
||||||
*/
|
|
||||||
|
|
||||||
static uint selmasks[] = {
|
|
||||||
[SEL_RECTANGULAR] = Mod1Mask,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* 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
|
# st version
|
||||||
VERSION = 0.4.1
|
VERSION = 0.1.1
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
@@ -11,18 +11,13 @@ X11INC = /usr/X11R6/include
|
|||||||
X11LIB = /usr/X11R6/lib
|
X11LIB = /usr/X11R6/lib
|
||||||
|
|
||||||
# includes and libs
|
# includes and libs
|
||||||
INCS = -I. -I/usr/include -I${X11INC} \
|
INCS = -I. -I/usr/include -I${X11INC}
|
||||||
`pkg-config --cflags fontconfig` \
|
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lutil
|
||||||
`pkg-config --cflags freetype2`
|
|
||||||
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lutil -lXext -lXft \
|
|
||||||
`pkg-config --libs fontconfig` \
|
|
||||||
`pkg-config --libs freetype2`
|
|
||||||
|
|
||||||
# flags
|
# flags
|
||||||
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_XOPEN_SOURCE=600
|
CPPFLAGS = -DVERSION=\"${VERSION}\"
|
||||||
CFLAGS += -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os ${INCS} ${CPPFLAGS}
|
CFLAGS += -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
|
||||||
LDFLAGS += -g ${LIBS}
|
LDFLAGS += -s ${LIBS}
|
||||||
|
|
||||||
# compiler and linker
|
# compiler and linker
|
||||||
CC ?= cc
|
CC ?= cc
|
||||||
|
|
||||||
@@ -3,15 +3,8 @@
|
|||||||
st \- simple terminal
|
st \- simple terminal
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B st
|
.B st
|
||||||
.RB [ \-a ]
|
|
||||||
.RB [ \-c
|
.RB [ \-c
|
||||||
.IR class ]
|
.IR class ]
|
||||||
.RB [ \-f
|
|
||||||
.IR font ]
|
|
||||||
.RB [ \-g
|
|
||||||
.IR geometry ]
|
|
||||||
.RB [ \-o
|
|
||||||
.IR file ]
|
|
||||||
.RB [ \-t
|
.RB [ \-t
|
||||||
.IR title ]
|
.IR title ]
|
||||||
.RB [ \-w
|
.RB [ \-w
|
||||||
@@ -24,32 +17,12 @@ st \- simple terminal
|
|||||||
is a simple terminal emulator.
|
is a simple terminal emulator.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
.B \-a
|
.BI \-t " title"
|
||||||
disable alternate screens in terminal
|
defines the window title (default 'st').
|
||||||
.TP
|
.TP
|
||||||
.BI \-c " class"
|
.BI \-c " class"
|
||||||
defines the window class (default $TERM).
|
defines the window class (default $TERM).
|
||||||
.TP
|
.TP
|
||||||
.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.
|
|
||||||
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
|
|
||||||
.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"
|
.BI \-w " windowid"
|
||||||
embeds st within the window identified by
|
embeds st within the window identified by
|
||||||
.I windowid
|
.I windowid
|
||||||
@@ -63,16 +36,3 @@ st executes
|
|||||||
instead of the shell. If this is used it
|
instead of the shell. If this is used it
|
||||||
.B must be the last option
|
.B must be the last option
|
||||||
on the command line, as in xterm / rxvt.
|
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.
|
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
st| simpleterm,
|
st| simpleterm,
|
||||||
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
|
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
|
||||||
am,
|
am,
|
||||||
bce,
|
# bce,
|
||||||
bel=^G,
|
bel=^G,
|
||||||
# blink=\E[5m,
|
# blink=\E[5m,
|
||||||
bold=\E[1m,
|
bold=\E[1m,
|
||||||
@@ -33,7 +33,6 @@ st| simpleterm,
|
|||||||
ed=\E[J,
|
ed=\E[J,
|
||||||
el=\E[K,
|
el=\E[K,
|
||||||
el1=\E[1K,
|
el1=\E[1K,
|
||||||
enacs=\E)0,
|
|
||||||
flash=\E[?5h\E[?5l,
|
flash=\E[?5h\E[?5l,
|
||||||
fsl=^G,
|
fsl=^G,
|
||||||
home=\E[H,
|
home=\E[H,
|
||||||
@@ -47,37 +46,22 @@ st| simpleterm,
|
|||||||
ind=^J,
|
ind=^J,
|
||||||
indn=\E[%p1%dS,
|
indn=\E[%p1%dS,
|
||||||
invis=\E[8m,
|
invis=\E[8m,
|
||||||
is2=\E[4l\E>,
|
|
||||||
it#8,
|
it#8,
|
||||||
kel=\E[1;2F,
|
|
||||||
ked=\E[1;5F,
|
|
||||||
ka1=\E[1~,
|
|
||||||
ka3=\E[5~,
|
|
||||||
kc1=\E[4~,
|
|
||||||
kc3=\E[6~,
|
|
||||||
kbs=\177,
|
kbs=\177,
|
||||||
kcbt=\E[Z,
|
kcub1=\E[D,
|
||||||
kb2=\EOu,
|
kcud1=\E[B,
|
||||||
kcub1=\EOD,
|
kcuf1=\E[C,
|
||||||
kcud1=\EOB,
|
kcuu1=\E[A,
|
||||||
kcuf1=\EOC,
|
kLFT=\E[d,
|
||||||
kcuu1=\EOA,
|
kRIT=\E[c,
|
||||||
kDC=\E[3;2~,
|
kind=\E[a,
|
||||||
kent=\EOM,
|
kri=\E[b,
|
||||||
kEND=\E[1;2F,
|
|
||||||
kIC=\E[2;2~,
|
|
||||||
kNXT=\E[6;2~,
|
|
||||||
kPRV=\E[5;2~,
|
|
||||||
kHOM=\E[1;2H,
|
|
||||||
kLFT=\E[1;2D,
|
|
||||||
kRIT=\E[1;2C,
|
|
||||||
kind=\E[1;2B,
|
|
||||||
kri=\E[1;2A,
|
|
||||||
kclr=\E[3;5~,
|
|
||||||
kdl1=\E[3;2~,
|
|
||||||
kdch1=\E[3~,
|
kdch1=\E[3~,
|
||||||
kich1=\E[2~,
|
kich1=\E[2~,
|
||||||
kend=\E[4~,
|
kend=\E[4~,
|
||||||
|
kf10=\E[21~,
|
||||||
|
kf11=\E[23~,
|
||||||
|
kf12=\E[24~,
|
||||||
kf1=\EOP,
|
kf1=\EOP,
|
||||||
kf2=\EOQ,
|
kf2=\EOQ,
|
||||||
kf3=\EOR,
|
kf3=\EOR,
|
||||||
@@ -87,64 +71,7 @@ st| simpleterm,
|
|||||||
kf7=\E[18~,
|
kf7=\E[18~,
|
||||||
kf8=\E[19~,
|
kf8=\E[19~,
|
||||||
kf9=\E[20~,
|
kf9=\E[20~,
|
||||||
kf10=\E[21~,
|
|
||||||
kf11=\E[23~,
|
|
||||||
kf12=\E[24~,
|
|
||||||
kf13=\E[1;2P,
|
|
||||||
kf14=\E[1;2Q,
|
|
||||||
kf15=\E[1;2R,
|
|
||||||
kf16=\E[1;2S,
|
|
||||||
kf17=\E[15;2~,
|
|
||||||
kf18=\E[17;2~,
|
|
||||||
kf19=\E[18;2~,
|
|
||||||
kf20=\E[19;2~,
|
|
||||||
kf21=\E[20;2~,
|
|
||||||
kf22=\E[21;2~,
|
|
||||||
kf23=\E[23;2~,
|
|
||||||
kf24=\E[24;2~,
|
|
||||||
kf25=\E[1;5P,
|
|
||||||
kf26=\E[1;5Q,
|
|
||||||
kf27=\E[1;5R,
|
|
||||||
kf28=\E[1;5S,
|
|
||||||
kf29=\E[15;5~,
|
|
||||||
kf30=\E[17;5~,
|
|
||||||
kf31=\E[18;5~,
|
|
||||||
kf32=\E[19;5~,
|
|
||||||
kf33=\E[20;5~,
|
|
||||||
kf34=\E[21;5~,
|
|
||||||
kf35=\E[23;5~,
|
|
||||||
kf36=\E[24;5~,
|
|
||||||
kf37=\E[1;6P,
|
|
||||||
kf38=\E[1;6Q,
|
|
||||||
kf39=\E[1;6R,
|
|
||||||
kf40=\E[1;6S,
|
|
||||||
kf41=\E[15;6~,
|
|
||||||
kf42=\E[17;6~,
|
|
||||||
kf43=\E[18;6~,
|
|
||||||
kf44=\E[19;6~,
|
|
||||||
kf45=\E[20;6~,
|
|
||||||
kf46=\E[21;6~,
|
|
||||||
kf47=\E[23;6~,
|
|
||||||
kf48=\E[24;6~,
|
|
||||||
kf49=\E[1;3P,
|
|
||||||
kf50=\E[1;3Q,
|
|
||||||
kf51=\E[1;3R,
|
|
||||||
kf52=\E[1;3S,
|
|
||||||
kf53=\E[15;3~,
|
|
||||||
kf54=\E[17;3~,
|
|
||||||
kf55=\E[18;3~,
|
|
||||||
kf56=\E[19;3~,
|
|
||||||
kf57=\E[20;3~,
|
|
||||||
kf58=\E[21;3~,
|
|
||||||
kf59=\E[23;3~,
|
|
||||||
kf60=\E[24;3~,
|
|
||||||
kf61=\E[1;4P,
|
|
||||||
kf62=\E[1;4Q,
|
|
||||||
kf63=\E[1;4R,
|
|
||||||
khome=\E[1~,
|
khome=\E[1~,
|
||||||
kil1=\E[2;5~,
|
|
||||||
krmir=\E[2;2~,
|
|
||||||
kich1=\E[2~,
|
|
||||||
knp=\E[6~,
|
knp=\E[6~,
|
||||||
kmous=\E[M,
|
kmous=\E[M,
|
||||||
kpp=\E[5~,
|
kpp=\E[5~,
|
||||||
@@ -157,35 +84,23 @@ st| simpleterm,
|
|||||||
rc=\E8,
|
rc=\E8,
|
||||||
rev=\E[7m,
|
rev=\E[7m,
|
||||||
ri=\EM,
|
ri=\EM,
|
||||||
ritm=\E[23m,
|
|
||||||
rmacs=\E(B,
|
rmacs=\E(B,
|
||||||
rmcup=\E[?1049l,
|
rmcup=\E[?1049l,
|
||||||
rmir=\E[4l,
|
rmso=\E[m,
|
||||||
rmkx=\E[?1l\E>,
|
|
||||||
rmso=\E[27m,
|
|
||||||
rmul=\E[m,
|
rmul=\E[m,
|
||||||
rs1=\Ec,
|
|
||||||
rs2=\E[4l\E>,
|
|
||||||
sc=\E7,
|
sc=\E7,
|
||||||
setab=\E[4%p1%dm,
|
setab=\E[4%p1%dm,
|
||||||
setaf=\E[3%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,
|
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,
|
||||||
sitm=\E[3m,
|
|
||||||
smacs=\E(0,
|
smacs=\E(0,
|
||||||
smcup=\E[?1049h,
|
smcup=\E[?1049h,
|
||||||
smir=\E[4h,
|
|
||||||
smkx=\E[?1h\E=,
|
|
||||||
smso=\E[7m,
|
smso=\E[7m,
|
||||||
smul=\E[4m,
|
smul=\E[4m,
|
||||||
tbc=\E[3g,
|
tbc=\E[2g,
|
||||||
tsl=\E]0;,
|
tsl=\E]0;,
|
||||||
ul,
|
ul,
|
||||||
xenl,
|
xenl,
|
||||||
vpa=\E[%i%p1%dd,
|
|
||||||
|
|
||||||
|
|
||||||
st-256color| simpleterm with 256 colors,
|
st-256color| simpleterm with 256 colors,
|
||||||
use=st,
|
use=st,
|
||||||
|
|||||||
Reference in new issue
Block a user