Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect truecolor support in kmscon #5312

Closed
wants to merge 1 commit into from

Conversation

rdvdev2
Copy link

@rdvdev2 rdvdev2 commented Dec 27, 2022

A patched version of kmscon for true color compatibility reports true color support by setting COLORTERM to kmscon. This PR allows helix to recognize it.

@the-mikedavis
Copy link
Member

I think this should be changed in kmscon or in your /etc/environment instead of in Helix.

COLORTERM is not formally defined anywhere as far as I can tell but the usual scheme is to test for truecolor. Some tools also check 24bit:

Gnome terminal is a notable exception: it removed the COLORTERM var and it was gnome-terminal beforehand. Also see https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1429584 - maybe there's a better way to do the detection with terminfo? Last I saw on that was that the terminfo maintainer was not interested in detecting truecolor support via terminfo but that source is a little old at this point. This gnome-terminal bug filing has some interesting discussion pointing out that it could be possible to use xtermcontrol or checking the VTE_VERSION (which we already do for extended underline detection).

The issue for adding this in kmscon is here: dvdhrm/kmscon#60. I'm not sure why they chose the kmscon value. Using COLORTERM like TERM_PROGRAM is not ideal as any client program (like Helix) needs to add every compatible terminal to its detection list.

@rdvdev2
Copy link
Author

rdvdev2 commented Dec 27, 2022

I will then open a PR in kmscon for this. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants