Commit graph

565 commits

Author SHA1 Message Date
Daniel Eklöf
97350f6488
term: track current window title in terminal struct 2019-07-21 17:35:53 +02:00
Daniel Eklöf
326808f94d
csi: remove TODO; we have our own terminfo 2019-07-21 15:38:54 +02:00
Daniel Eklöf
86faed473d
render: make "new buffer" a debug log message, not warning 2019-07-21 15:36:32 +02:00
Daniel Eklöf
9150aa5d43
footrc: example configuration 2019-07-21 15:35:01 +02:00
Daniel Eklöf
a3b4a53102
conf: misc valgrind fixes 2019-07-21 11:46:46 +02:00
Daniel Eklöf
07b3e76062
Merge branch 'config-color' 2019-07-21 11:34:45 +02:00
Daniel Eklöf
16979927ba
csi: pick 16 first 256-colors directly from the term struct
The 16 first entries in the 256-color array are the regular and bright
colors. However, since they can be changed (eventually) at runtime, we
can't statically initialize the 256-color array.

Instead, pick the regular+bright colors directly from the terminal
struct. I.e. the first 16 entries of the 256-color array are now
unused.
2019-07-21 11:32:35 +02:00
Daniel Eklöf
7eb6ac1aec
csi: use colors from terminal struct 2019-07-21 11:31:59 +02:00
Daniel Eklöf
c7e76e2ac2
conf: fg/bg and all regular + bright colors are now configurable 2019-07-21 11:31:16 +02:00
Daniel Eklöf
4109d97263
conf: config now provides the colors (though still only hardcoded colors) 2019-07-21 11:06:28 +02:00
Daniel Eklöf
29d855d7c6
term: prepare for configurable colors; add color variables to terminal 2019-07-21 10:58:09 +02:00
Daniel Eklöf
b18478f9b6
osc: add TODO 2019-07-19 15:15:59 +02:00
Daniel Eklöf
feac7d032e
osc: delete empty line 2019-07-19 14:57:55 +02:00
Daniel Eklöf
ed609b9082
osc: implement OSC 52;c;? - query clipboard 2019-07-19 14:20:38 +02:00
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