osc: implement "change color" commands

This implements OSC 4, 10, 11 - change <color>/foreground/background,
and their corresponding 'query' variant (which was already implemented
for OSC 10/11).

It also implements OSC 104, 110, 111 - reset
<color>/foreground/background.

Set corresponding terminfo entries to signal this support to clients.
This commit is contained in:
Daniel Eklöf 2019-08-21 17:57:02 +02:00
parent c1903f5522
commit 52ece3592c
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 205 additions and 39 deletions

View file

@ -13,6 +13,7 @@ foot-direct|foot with direct color indexing,
foot+base|foot base fragment,
am,
bce,
ccc,
km,
mir,
msgr,
@ -61,6 +62,7 @@ foot+base|foot base fragment,
il1=\E[L,
ind=\n,
indn=\E[%p1%dS,
initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
invis=\E[8m,
is2=\E[!p\E[?3;4l\E[4l\E>,
kDC3=\E[3;3~,