Skip to content

Functions for determining terminal support #102

@staxfur

Description

@staxfur

I think it would be a great thing to have functions to determine things like color support (4bit / 24bit) and maybe even some more information on what the current terminal supports. That would also make it possible to include fall back functions in window24 for example (we could fall back to 4bit colors, if 24bit is not supported). As Ncurses and such libraries are already implementing that feature I think this won't that of a big deal. I have looked it up quickly, but there are no ANSI code for that, also it would require a system dependent solution (on linux probably even terminal dependent). Windows has some functions inside of windows.h to do that, linux has the TERM variable. The problem with the term variable though is that Terminals like xterm and the visual studio integrated terminal set it to xterm-256color wich means that it supports 256 colors (8bit colors) but doesn't tells if it supports true color (24bit) for example. The actuall problem here is that Kitty (my primary terminal) sets it to "xterm-kitty" which means that if we just check that variable to be equal to "xterm-256color" we wouldn't cover all terminals.

But I think this would be a great thing, if we are done with #73.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

To do

Relationships

None yet

Development

No branches or pull requests

Issue actions