Comments (2)
Maybe this could be integrated https://github.com/agauniyal/termdb
from cpp-terminal.
I have done some research on this and there are almost no terminals that are not supporting 4 or 8 bit colors. Problem as we already know is the 24bit color support. We could use one or more of the following methods to determine true color support:
-
windows
-> Powershell 5 (windows build in), Powershell 7 ("Powershell core", can be installed manually and is cross plattform), CMD, WSL/WSL2 and the microsoft opensource terminal support true color starting with windows 10. I guess that we can simply check the operating system version and disable true color if it's windows 8.1 or below
-> old windows shells (cmder, PuTTY, probably others) don't support true color, my thing here is that i'm not sure if they are even used anymore / if they are still developed or already dead projects
-> Termus has no true color support and probably wont have it at all because it's propritary - i'm not sure yet what we could do about this one, Kitty doesn't have it either -
linux
-> Most terminal support already true color (Kitty, vscode integrated terminal, xterm, deepin-terminal, gnome-terminal, terminator and many more) and maybe even all have the$COLORTERM
variable set to "truecolor" or "24bit" so they are easily detectable
-> variables won't be passed through ssh, so we probably need something for that case
-> there are still some Terminal that don't support 24bit colors (Terminus, gtk2term and some others) but they are not that much and many look abonded
-> Maybe some terminal support 24bit colors but don't set the COLORTERM variable
-> I'd suggest to only support consoles that are still supported by their authors and would use 8bit colors by default for everything, but turn on 24bit colors if the COLORTERM variable is set. Also we can (and probably have to) add extra checks for specific terminals like using the $TERM variable wich contains the Terminal name
-> There is also the terminfo file wich contains informations about specific terminals, but i think that would be far more complicated than just checking $COLORTERM -
macos
-> default terminal does not have true color support
-> maybe it doesn't set the TRUECOLOR variable, then it would be no issue at all
-> Kitty etc have true color support -
unix / *BSD
-> the default bsd terminal has no true color support but might also not set the COLORTERM variable, then same as at macos
-> not sure, if BSD has other terminals at all? Might require a research... -
other systems
-> Android will be like linux
I'll do a small demo on this the next days and do a small overview here then. The implementation will happen after #116 was merged. Also it would be great if @certik could check if the macos default terminal sets the COLORTERM variable and if yes what's stored inside and what's included in the $TERM variable. Also are there terminals that are really important besides the default ones?
from cpp-terminal.
Related Issues (20)
- Flickering HOT 20
- Windows terminal can be turned into `legacy mode` and so crash our ANSII support detection
- example 'kilo' does not support special characters HOT 7
- exception leaking destructor is dangerous HOT 10
- build as shared library, error adding symbols: DSO missing from command line HOT 12
- Compiling the examples with GCC results in errors HOT 7
- Create a list of projects that are using this library HOT 3
- Bug: cpp-terminal crashes if two utf8 are inserted simultaneously HOT 42
- Multiline prompt stopped working on macOS
- Ctrl + I and Tab HOT 6
- Bug: Text Wrap Incompatibility HOT 6
- Bring back the list of other similar libraries HOT 4
- Pressing Ctrl, Alt, Shift creates a copy paste event on windows? HOT 3
- Addition of Metakey and Key results in warning of deprecation HOT 1
- Bug in key + metakey arithmetic HOT 7
- Exception thrown at this line when typeing to fast HOT 7
- mouse sending random characters to the terminal after examples/minimal ends HOT 8
- `std::cin` doesn't read pipe redirection HOT 8
- Issue with file headers HOT 3
- Doctest.h needs to be updated to the latest version - compile error on Ubuntu 22.04 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpp-terminal.