Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935703 - sys-apps/less-661, lesspipe coloring: Very hard to read: Make style configurable & document it
Summary: sys-apps/less-661, lesspipe coloring: Very hard to read: Make style configura...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-07 06:49 UTC by Klaus Kusche
Modified: 2025-01-27 17:24 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2024-07-07 06:49:32 UTC
The pygmentize coloring style changed to "rrt" with less-661
(see bug 924627).

"rrt" looks very nice in terminals with black background,
but is almost impossible to read on terminals with white background:
Large parts (especially important parts) of the text are colored 
in a very light grey, which is almost indistinguishable from the white background (it's even worse during presentations with beamers in well illuminated rooms).

* Could you please make the style easily configurable?
(e.g. by introducing an environment variable for it?)

* Could you please document (e.g. as an emerge info)
how to list the available styles and how to set a style?

* Could you either choose a default which works reasonably well
on both white *and* black background terminals,
or perhaps introduce a USE variable to set the default 
for either white or black background?
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-07 06:50:04 UTC
Yeah, a very fair set of requests. I was wondering about this earlier.
Comment 2 Pacho Ramos gentoo-dev 2024-07-09 12:47:15 UTC
In my case I switched to "igor" style, and it looks nice to me for black and white backgrounds
Comment 3 Pacho Ramos gentoo-dev 2024-08-06 16:52:54 UTC
Hi!

I would simply switch to "igor" by default. I am using it in all my maintained machines for some weeks and nobody complained (and I have users with white and black backgrounds)

Thanks
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-18 10:58:11 UTC
I had a comment written out and lost it :(

Pacho, could you look at bug 935729? It needs the script reviewing, changes relative to the old one, and also a detailed commit message written. Maybe the changes being split up into several commits too. It might be the contributor is willing to do some or all of that but they need some guidance.

As for igor: I guess I could live with it. I think it's worse for dark terminals than rrt though.
Comment 5 Teika kazura 2024-12-17 04:41:14 UTC
At the very least, please add this einfo into 668-r1.ebuild:

----
Currently the coloring scheme is hardcoded in /usr/bin/lesspipe. Find and modify the part "style=rrt" to your favorite one.
Coloring is done by the highlight software "pygments". Available schemes (called "style" in pygments) are listed at https://pygments.org/styles/ .
---

It's not the true problem of rrt, igor, or default, but the lack of freedom, and users are left without being informed about how to handle it.
 
Thanks all.
Comment 6 Marcus Comstedt 2025-01-18 22:17:53 UTC
While there is no environment variable to set the style specifically, you can acheive the same thing by setting the environment variable LESSCOLORIZER, e.g.:

setenv LESSCOLORIZER "pygmentize -O style=igor"

Suggesting to edit /usr/bin/lesspipe seems like a bad idea, since any changes will be overwritten on the next upgrade/rebuild.