Commit graph

395 commits

Author SHA1 Message Date
Daniel Eklöf
751ac55f64
csi: *sigh* looks like e.g. neovim doesn't respect Se
I.e. it issues a \E[2 q regardless of what we've configured the
terminfo Se entry to.

So, make \E[2 q mean "the user configured cursor style" (which
defaults to 'block').
2019-07-22 20:23:29 +02:00
Daniel Eklöf
49034bb759
csi: let CSI 0 q mean "switch to user configured cursor style"
According to the specs, \E[0 q means a blinking block cursor. However,
since it also states that \E[1 q *also* is a blinking block cursor,
and that it is the default, *and* given that fact that parameter-less
CSIs typically means "reset", let's make it mean "reset to the user
configured cursor style".
2019-07-22 20:19:27 +02:00
Daniel Eklöf
3ccdef3498
conf: make cursor's default style configurable 2019-07-22 20:15:14 +02:00
Daniel Eklöf
ed5df194b8
render: implement cursor styles 'bar' and 'underline' 2019-07-22 20:07:34 +02:00
Daniel Eklöf
10be7c37ba
csi: prepare for alternative cursor styles 2019-07-22 19:44:21 +02:00
Daniel Eklöf
428b31f071
term: group 'blink' state together in a struct 2019-07-22 19:17:57 +02:00
Daniel Eklöf
196f9d67c2
term: group 'flash' state together in a struct 2019-07-22 19:15:56 +02:00
Daniel Eklöf
61409d40e2
flash: convert our own 'flash' from a CSI to an OSC 2019-07-22 19:10:15 +02:00
Daniel Eklöf
aa4cf1873b
csi: implement CSI 3J - erase scroll back 2019-07-22 19:05:22 +02:00
Daniel Eklöf
18fb70bb3f
keymap: fix sequences for PageDown 2019-07-22 18:45:14 +02:00
Daniel Eklöf
42b46df6f1
terminfo: add key sequences for keys with modifiers 2019-07-22 18:44:53 +02:00
Daniel Eklöf
34e11a711f
terminfo: add Se/Ss - describes how to change cursor style 2019-07-22 18:37:29 +02:00
Daniel Eklöf
602f22858b
terminfo: add Ms - modify selection/clipboard 2019-07-22 18:36:15 +02:00
Daniel Eklöf
802c113db3
terminfo: add smxx/rmxx - describes strikeout/crossed-out 2019-07-22 18:34:06 +02:00
Daniel Eklöf
3316a3ea4c
terminfo: set XT (screen) - we understand OSC and mouse tracking 2019-07-22 18:33:29 +02:00
Daniel Eklöf
283ffc79be
terminfo: set AX (screen) - we understand CSI 39/49m 2019-07-22 18:32:49 +02:00
Daniel Eklöf
b494f24552
conf: don't fail to start when there's no configuration file 2019-07-22 18:21:25 +02:00
Daniel Eklöf
df91698ff3
terminfo: revert kmous to \E[M
ncurses disables mouse support completely if kmous != \E[M. Now, since
kmous *has* to match XM, this means we must also disable XM.
2019-07-21 21:41:19 +02:00
Daniel Eklöf
ef06576aaf
terminfo: since we now expose our SGR cap, set kmous=\E< 2019-07-21 20:49:42 +02:00
Daniel Eklöf
838738a04a
terminfo: add XM (mouse initialization) 2019-07-21 20:46:17 +02:00
Daniel Eklöf
3a50c54e7c
csi: bug: reset mouse *reporting* on CSI 1005/1006/1015l 2019-07-21 20:27:26 +02:00
Daniel Eklöf
6f282a2903
csi: remove debug logging 2019-07-21 20:27:09 +02:00
Daniel Eklöf
c1381fbb54
main: no need to damage the _entire_ view on blink timer 2019-07-21 20:15:18 +02:00
Daniel Eklöf
e21ab8cf33
blink: implement 'blink' 2019-07-21 20:11:20 +02:00
Daniel Eklöf
07aad4a534
csi: change flash log message from warning to debug 2019-07-21 19:17:10 +02:00
Daniel Eklöf
0dd8951cb3
flash: implement 'flash'
Use our own escape sequence for the 'flash' terminfo entry.

Implemented by arming a timer FD and setting a boolean that indicates
we're currently "flashing".

The renderer draws a semi-transparent yellowish layer over the entire
window when "flashing" is active.
2019-07-21 19:14:19 +02:00
Daniel Eklöf
1ff04c5e36
csi: remove erronous final 2019-07-21 18:41:22 +02:00
Daniel Eklöf
2096753b52
dcs: we have no parent terminal to pass through to 2019-07-21 18:22:26 +02:00
Daniel Eklöf
2c1c49e499
conf: remove debug logging 2019-07-21 17:51:02 +02:00
Daniel Eklöf
64135ae365
csi: implement CSI 22t and CSI 23t
22;0|1|2t pushes the current window title/icon to the stack, while 23
pops it.

The second parameter, 0|1|2 has the following meaning:

0 - push/pop icon+title
1 - push/pop icon
2 - push/pop title
2019-07-21 17:48:06 +02:00
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