Commit graph

351 commits

Author SHA1 Message Date
Daniel Eklöf
793c37923e
selection: add text_from_clipboard()
This function reads data from the clipboard, and calls a user-provided
callback for each chunk of clipboard data.
2019-07-19 14:20:00 +02:00
Daniel Eklöf
9c3ccc182e
base64: implement encode() 2019-07-19 14:19:42 +02:00
Daniel Eklöf
fd07f13f2a
osc: initial implementation of OSC 52 - copy to clipboard 2019-07-19 11:13:07 +02:00
Daniel Eklöf
167036ccbe
selection: add text_to_clipboard()
This function takes a string and makes it available to the clipboard.
2019-07-19 11:12:14 +02:00
Daniel Eklöf
32f397d9b0
input: store last seen wayland input serial
We need this for clipboard data
2019-07-19 11:11:48 +02:00
Daniel Eklöf
bb8a733758
base64: initial base64 decode implementation 2019-07-19 11:11:25 +02:00
Daniel Eklöf
f2608bf4c9
osc: foreground/background reply is now in correct XParseColor format
The format we used previously was a discouraged and obsolete
format (and incorrect too).
2019-07-19 10:18:22 +02:00
Daniel Eklöf
7472e9c152
csi: recognize DECRQM (CSI ? Ps $ p)
The client sends this to request the state of DEC private modes.

We don't support any of them, so for now, reply with 'reset'.
2019-07-19 09:57:51 +02:00
Daniel Eklöf
b583e63bba
csi: tweak logging: no need to mention 'CSI' twice 2019-07-19 09:57:37 +02:00
Daniel Eklöf
1f263256a3
vt: define state_names[] table when debug logging has been enabled 2019-07-19 09:57:14 +02:00
Daniel Eklöf
24e9477174
vt: handle up to two private characters 2019-07-19 09:56:59 +02:00
Daniel Eklöf
a5737a63b8
ocs: renamed parameter size -> required_size in osc_ensure_size() 2019-07-19 09:56:00 +02:00
Daniel Eklöf
b953326768
dcs: sort of implement DCS passthrough
We now store the passthrough characters in a buffer, and call
dcs_passthrough() on unhook.

However, dcs_passthrough() doesn't do anything.
2019-07-19 09:55:07 +02:00
Daniel Eklöf
153628a217
osc: allocate data buffer dynamically 2019-07-19 08:59:35 +02:00
Daniel Eklöf
95ff37afd7
osc: terminate reply with ST rather than BEL
This is the preferred terminator anyway, and at least Emacs likes it a
whole lot better.
2019-07-18 19:54:30 +02:00
Daniel Eklöf
6c1b2f3c81
csi: recognize, but ignore, modifyOtherKeys et al resource setters 2019-07-18 19:48:37 +02:00
Daniel Eklöf
13d3985ba8
osc: implement foreground/background query 2019-07-18 19:48:13 +02:00
Daniel Eklöf
9dafab981c
vt: implement SS2/SS3 and ST 2019-07-18 19:25:53 +02:00
Daniel Eklöf
ba533a4993
csi: better (more correct) reply to \e[>0c 2019-07-18 15:28:18 +02:00
Daniel Eklöf
cb78c8cff6
keymap: map tab and back-tab 2019-07-18 14:54:43 +02:00
Daniel Eklöf
095684a705
vt: execute: ignore unrecognized C0 commands 2019-07-18 14:54:22 +02:00
Daniel Eklöf
36f30e8b1b
terminfo: change kmous to \E[M. This fixes mouse not working in e.g. htop 2019-07-18 14:39:27 +02:00
Daniel Eklöf
7d7af62d84
main: allow TERM to be set on the command line 2019-07-18 14:34:45 +02:00
Daniel Eklöf
7e36027237
conf: TERM can now be set in footrc 2019-07-18 14:29:40 +02:00
Daniel Eklöf
d5157c15b0
csi: color index is an 8-bit unsigned value
This fixes an issue where a large 8-bit value was signed extended into
a large 64-bit value.
2019-07-18 14:25:15 +02:00
Daniel Eklöf
df9162450d
csi: validate param before indexing into the 256-color array 2019-07-18 14:22:19 +02:00
Daniel Eklöf
67583540b4
main: use our own terminfo 'foot' by default 2019-07-18 14:14:05 +02:00
Daniel Eklöf
b6b92a742d
csi: fix wrong variable compared in for-loop 2019-07-18 14:13:35 +02:00
Daniel Eklöf
0c565d1558
terminfo: intitial terminfo specification 2019-07-18 14:00:33 +02:00
Daniel Eklöf
6e69cf9562
glyph-cache: generate at startup, never update while rendering 2019-07-18 13:03:21 +02:00
Daniel Eklöf
332f1c6a21
vt: execute: handle \0 (NUL), by ignoring it 2019-07-18 12:19:54 +02:00
Daniel Eklöf
d2e0ba3670
render: comments 2019-07-18 10:47:09 +02:00
Daniel Eklöf
71c7219b35
render: make frame rendering time measuring optional 2019-07-18 10:35:27 +02:00
Daniel Eklöf
6e55be1557
render: cache generated glyphs for regular ASCII characters
To avoid having to re-generate glyphs, cache the glyphs.

For now, we only cache ASCII characters, as this allows us to lookup
the cache by simply indexing with the character (into a 256-entry
array).
2019-07-18 10:33:58 +02:00
Daniel Eklöf
c9803a2018
render: break out color conversion 2019-07-18 10:04:13 +02:00
Daniel Eklöf
df929a251a
font: don't warn when failing to get hinting/antialias
These properties aren't always included in the pattern, and when they
aren't, trying to get them will fail.

This isn't an error, just fallback to a default value.
2019-07-18 10:03:08 +02:00
Daniel Eklöf
0ca20e3e6c
render: time how long time it takes to render a frame 2019-07-18 09:33:49 +02:00
Daniel Eklöf
7ad87fdf2b
font: remove assert that was only there for debugging 2019-07-18 09:29:36 +02:00
Daniel Eklöf
89450bfd44
font: sync cairo's options with the FC pattern
Configure cairo's 'options' with default values, then update the
FontConfig pattern. Finally, update the cairo options after having
retrieved the final FontConfig option.
2019-07-17 22:50:26 +02:00
Daniel Eklöf
8bd969262b
selection: implement double-click-to-select-word 2019-07-17 21:30:57 +02:00
Daniel Eklöf
f669cce5b9
selection: bug: apply grid's view offset when starting a selection 2019-07-17 12:59:12 +02:00
Daniel Eklöf
20684afa8c
csi: implement \E[@ (ICH - insert characters) 2019-07-17 11:19:28 +02:00
Daniel Eklöf
056700aa8f
keymap: use hex instead of octal 2019-07-17 11:18:55 +02:00
Daniel Eklöf
28eef93742
vt/csi: recognize the reset sequence sent by 'reset'
However, we don't (yet) actually reset the terminal
2019-07-17 10:39:38 +02:00
Daniel Eklöf
e944eb85ac
csi: document a couple of unimplemented CSIs 2019-07-17 10:33:15 +02:00
Daniel Eklöf
50153ef7e2
conf: repair debug build when LOG_ENABLE_DBG=0 in config.c 2019-07-17 10:32:22 +02:00
Daniel Eklöf
de575ac58e
conf: improve configuration file parsing
* Strip whitespaces from keys and values
* Detect (and ignore) comments
* Detect syntax errors (no value specified etc)
* Error out on syntax errors and invalid keys
2019-07-17 10:12:14 +02:00
Daniel Eklöf
c11cc2be57
main: allow user to override shell on the command line 2019-07-17 09:55:36 +02:00
Daniel Eklöf
2046dc0fbd
slave: break out command line tokenizer 2019-07-17 09:46:45 +02:00
Daniel Eklöf
71d0f6fa56
conf: add support for overriding shell 2019-07-17 09:40:58 +02:00