Open dankamongmen opened 2 years ago
https://lkml.org/lkml/2022/1/14/50 fixes some formatting on console_codes(4)
, yummmy groff
so we have
// query background, replies in X color https://www.x.org/releases/X11R7.7/doc/man/man7/X.7.xhtml#heading11
// GNU screen passes this on to the underlying terminal rather than answering itself,
// unlike most other queries, so send this first since it will take longer to be
// answered. note the "\x1b]"; this is an Operating System Command, not CSI.
#define DEFBGQ "\x1b]11;?\e\\"
#define DEFFGQ "\x1b]10;?\e\\"
so a few details:
to get a different default background color, you use the linux private CSI sequence:
ESC [ 8 ] Make the current color pair the default attributes.
works perfectly. notcurses-info
reports:
notcurses 3.0.4 on FBcon 5.16.0nlb (Linux 5.16.0nlb)
48 rows (16px) 128 cols (8px) 768x1024 8 colors
gcc-11.2.0 (LE)
terminfo 6.3.20211021 libdeflate 1.8 GPM n/a
avformat 59.10.100 avutil 57.13.100 swscale 6.1.102 avcodec 59.15.100
default fg 0xaaaaaa default bg 0x000000
i then ran printf %b '\e[46m' '\e[8]' '\e[H\e[J
(or some other color)
notcurses 3.0.4 on FBcon 5.16.0nlb (Linux 5.16.0nlb)
48 rows (16px) 128 cols (8px) 768x1024 8 colors
gcc-11.2.0 (LE)
terminfo 6.3.20211021 libdeflate 1.8 GPM n/a
avformat 59.10.100 avutil 57.13.100 swscale 6.1.102 avcodec 59.15.100
default fg 0xaaaaaa default bg 0xaa5500
yay!
https://lkml.org/lkml/2022/1/14/413
the rest is in god's hands
sent v2 of this patch just now
The Linux console doesn't support looking up default background/foreground, which can be changed (try e.g.
printf %b '\e[41m' '\e[8]' '\e[H\e[J'
). It's not safe to just rely on 0xfffff foreground and 0x000000 background. Add handling for the default fg/bg lookups to the Linux console code.