Commit Graph

123 Commits (149c0d3aedffe69b625ef95868daae200941d5f5)

Author SHA1 Message Date
Roberto E. Vargas Caballero 20f713548d Change default keybindings
CTRL+SHIFT is an impossible combination in the terminal world
(0x20 | x & 0x1F), so it is perfect to be used for internals
shortcuts of terminals, and being a double combination
reduces the prossibility of having comflicts.
2017-01-25 19:17:38 +01:00
Michael Forney e2ee5ee611 Split X-specific code into x.c 2017-01-20 19:42:26 -08:00
fpqc c63a87cd93 Move column and row default numbers into config.h 2016-12-16 10:50:23 +01:00
Manuel Tobias Schiller 740ada1447 make the various combinations of arrow keys and shift/control/meta work
When using st with screen, I've bound next, prev, new screen to
combinations like Ctrl-Alt-Right,Left,Down; xterm and (u)rxvt work fine
when this combination of modifiers is pressed, st does not seem to
transport all of them; a single modifier key is fine (e.g. Ctrl-Up,
Alt-Down etc., but combinations are not). While I'm not terribly
familiar with this, I have tried to hack config.h in a more or less
systematic way to generate the expected sequences.
2016-11-14 19:58:02 +01:00
Quentin Rameau 8c99915608 Do not use color when font attributes are supported
If fontconfig gives us a font without the attributes we asked for,
display an alternative color instead.
2016-10-23 17:56:46 +02:00
Quentin Rameau 68bae9c7b1 Add support for iso14755
We launch dmenu for getting a codepoint, then convert it and send it to
the terminal.
2016-10-18 13:32:36 +02:00
Christoph Lohmann 308bfbf6be Change who's expanding tabs. 2016-07-20 13:56:15 +02:00
Christoph Lohmann c4f245eccd Add some hint to have the pseudo terminal in the right mode.
If you don't make sure that the terminal does not expand tabs to spaces, of
course such a setting won't work.
2016-07-20 13:52:31 +02:00
Christoph Lohmann 2251f6465a Add comment about tabspaces.
st.info needs to be changed too, when tabspaces are changed.
2016-07-20 13:00:43 +02:00
Alive 4ever 235b438e68 Consistent Alt+BackSpace behavior
The default config specifies BackSpace as "\177". The default behavior
should persist across modifier keys, commonly Mod1 (Alt or Meta) which
is widely used to delete a word on readline and text editors, notably
Emacs.

This will make Alt+BackSpace behaves as expected, i.e. sends "\033\177"
instead of "\033\010" as previous default behavior.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-07-12 15:25:08 +02:00
Christoph Lohmann 6d8f85232e I like empty lines. 2016-03-08 13:55:22 +01:00
Ryusei Yamaguchi 034a5c8a09 Measure the single advance width with a heuristic method
This fix is needed to use dual-width fonts, which have double-width
glyphs (e.g. CJK unified ideographs).

Signed-off-by: Ryusei Yamaguchi <mandel59@gmail.com>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-03-08 13:46:42 +01:00
Christoph Lohmann e2aa03e6b7 Now the Shortcuts are more consistent.
Keep the debile happy.
2015-10-31 09:29:04 +01:00
Christoph Lohmann a2a60f0a2c Make the cursor shapes more descriptive.
»IBeam« is now »Bar« because it's named like that in the source code.
2015-10-05 23:05:38 +02:00
Christoph Lohmann 52d0e82df7 Snowman is everywhere. 2015-10-05 22:59:04 +02:00
Christoph Lohmann 78b04865fb Style normalisation in the config.def.h.
This adds an awareness commit for the big key array too.
2015-10-05 22:54:44 +02:00
Christoph Lohmann f7b80caebe The definition of the reverse cursor is now up to the user. 2015-10-05 22:38:19 +02:00
Christoph Lohmann bf8c71e429 The times of bad fonts are over.
The antialiasing was false due to circumstances that do not exist anymore. We
need antialiasing on big screens with big fonts. Autohinting too.
2015-09-12 16:43:32 +02:00
Roberto E. Vargas Caballero a1ed5071e5 Change Pause to Break in shortcut for serial break 2015-09-08 17:02:15 +02:00
Jan Christoph Ebersbach 3ba9c8fc3f Expose cursor shape in config.def.h
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-09-08 16:29:05 +02:00
Roberto E. Vargas Caballero 1f087aa8b7 Add key to send a break to the serial line 2015-09-08 12:10:11 +02:00
Roberto E. Vargas Caballero 473326f2e3 Set default values of stty according to the man page
This configuration is basically 38400 8N1, without echo and
in raw mode. Kernel will not process any of the characters
sent by the user.
2015-09-08 10:47:31 +02:00
Alex Kozadaev ee5cad439b Adding mouse colour/shape settings 2015-07-28 12:21:11 +02:00
Mytchel Hammond 1d348e98e3 added note about the low precedence of shell to config.def.h 2015-07-24 08:15:55 +02:00
FRIGN 9de853a98d Unboolify st
This practice proved itself in sbase, ubase and a couple of other
projects.
Also remove the True and False defined in X11 and FcTrue and FcFalse
defined in Fontconfig.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-07-09 18:34:46 +02:00
Quentin Rameau bdd649a102 do not truncate font size when zooming 2015-06-19 11:49:13 +02:00
Roberto E. Vargas Caballero 215bdb2da3 Add tty line support
Not always is desirable to create a pseudo terminal, and some times
we want to open a terminal emulator over a tty line. With this new
patch is possible to do someting like:

	$ st -l /dev/ttyS0 115200

Without this option was needed to launch another terminal emulator
over st (for example minicom, picocom, cu, ...).
2015-04-15 10:52:44 +02:00
Omar Sandoval ecac5ee35e Make DECSCUSR thickness configurable 2015-04-10 23:43:05 +02:00
Christoph Lohmann 2fcfea1bf1 Add Mod + Shift + c/v and no selclear.
Thanks to Alex Pilon <alp@alexpilon.ca>!

Now there is a distinction between the primary and clipboard selection. With
Mod + Shift + c/v the clipboard is handled. The old Insert behavious does
reside.
2015-03-14 07:41:59 +01:00
Roberto E. Vargas Caballero b746816b78 Allow combinations with Backspace
XN_ANY_MOD makes that any combination of backspace will return always
DEL. This patch lets to X to decide which value returns.
2015-03-13 07:26:16 +00:00
Ivan Delalande f5075a9e9d Backspace value shouldn't depend on keypad state 2015-03-11 17:25:48 +00:00
Christoph Lohmann 230d0c8428 Finally resolving the backspace problem.
The majority now using the Linux behaviour. Minorities have to live in their
ghettos.
2015-03-10 00:00:44 +01:00
Christoph Lohmann a7eef8f230 Removing an extra space. 2014-09-29 15:41:10 +02:00
Christoph Lohmann dc8c5c82aa Implementing xzoomreset.
Thanks mvdan@mvdan.cc for proposing this.
2014-09-29 15:38:21 +02:00
Roberto E. Vargas Caballero 5afb3862ba Add support for utmp in st
St runs an interactive shell and not a login shell, and it means
that profile is not loaded. The default terminal configuration
in some system is not the correct for st, but since profile is
not loaded there is no way of getting a script configures the
correct values.

St doesn't update the utmp files, this is the job of another
suckless tool, utmp. Utmp also opens a login shell (it is the
logical behaviour when you create a new user record) it is a
good option execute utmp and then get a correct input in
utmp, wtmp and lastlog file, and execute the content of the
profile.
2014-09-23 07:12:41 +02:00
Roberto E. Vargas Caballero 9d9e049eac Make useful DEL in application mode
DEL key has to generate the sequence ^[P in application mode,
because such sequence means delete current character. It implies
that the character sent in keypad mode must be ^? (DEL character).
2014-08-19 12:57:43 +02:00
Roberto E. Vargas Caballero f8b4998b32 Convert VT102ID to a config variable
VT102ID is the sequence that the terminal returns when it is inquired
to identify itself. This value should be configurable in the same
way that another st parameters.
2014-08-15 15:00:48 +02:00
Eric Pruitt 738f555f66 Fix typo in config.def.h
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-21 10:24:36 +02:00
Hiltjo Posthuma cf890e5bf0 Allow mouse selection override using ShiftMask
Similar to xterm or urxvt holding shift before selecting text with the mouse
allows to override copying text. For example in tmux with "mode-mouse on" or
vim (compiled with --with-x), mc, htop, etc.

forceselmod in config.h sets the modifier to use this mode, by default
ShiftMask.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-05-14 07:48:25 +02:00
noname 9e3e8ce466 Do not export chscale and cwscale. 2014-04-28 18:49:05 +02:00
Roberto E. Vargas Caballero c46d929fe1 Fix Backspace and Delete characters
Backspace key must generate the backspace character (\010) and
Delete key must generate the delete character (\0177). In
some systems the kernel configuration for erasing previous character
is \0177, so some programs (for example cat, ed, mail, ...), can not
understand the correct meaning of backspace. In this cases it is only
needed this command:

	stty erase 
2014-04-11 15:08:37 +02:00
Roberto E. Vargas Caballero 78f8843bc7 Add sequence for printing the current selection
This is very usefull in order to can select what is sent
to the plumber.
2014-03-06 07:55:07 +01:00
Roberto E. Vargas Caballero 96c230e476 Add key definition for printer sequences
These new combinations generate the same behaviour (basically) of
vt102. It is a good way of communicating st with other programs.

[0] http://www.vt100.net/docs/vt102-ug/chapter2.html
2014-03-06 07:53:15 +01:00
Roberto E. Vargas Caballero 21d905c076 Make Shift+Home equal to CLS in ascii mode 2014-02-02 19:40:38 +01:00
Roberto E. Vargas Caballero 9523233e25 Make CONTROL + DELETE delete a line
If CONTROL + INSERT inserts a line then it seems natural CONTROL + DELETE
removes a line.
2014-02-02 19:30:38 +01:00
Roberto E. Vargas Caballero d2173cd716 Fix SHIFT+DEL definition
The AppMode and AsciiMode were inverted in the definition of this
combination.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-01-31 12:41:37 +01:00
Mark Edgar ef1dc9fc4b Replace alignment tabs with spaces. 2013-12-18 08:11:14 +01:00
Mark Edgar 6162d63151 Fix comments in config.def.h to match field names. 2013-12-18 08:10:44 +01:00
Mark Edgar fb8e3f67f7 Fix definition of F28 key.
Shitf modifier adds 12 to the function number of the function keys,
while Control adds 24, so Control + F4 generates F28
2013-12-18 08:10:22 +01:00
Mark Edgar 297c886b72 Ignore numlock (Mod2Mask) for button events too.
Conflicts:
	config.def.h
	st.c
2013-10-20 09:53:34 +02:00