cyd01 / KiTTY

:computer: KiTTY, a free telnet/ssh client for Windows
https://www.9bis.com/kitty
Other
1.55k stars 132 forks source link

[Feature Request] Support for OSC 11 (text background color) #488

Open Ziyann opened 1 year ago

Ziyann commented 1 year ago

OSC 11 is used by some tools to adjust their color scheme, with Vim being one of the most notable examples.

The following sequence should return the current background color: echo -e '\033]11;?\007'

Example on Tabby:

$ echo -e '\033]11;?\007'

$ 11;rgb:0000/0000/0000

$ vim -c "set background?"
background=dark

Example on KiTTY:

$ echo -e '\033]11;?\007'

$ 

$ vim -c "set background?"
background=light

http://www.talisman.org/~erlkonig/documents/xterm-color-queries/ https://github.com/vim/vim/blob/master/src/term.c#L5685-L5697