Open rubyFeedback opened 7 months ago
HTOPRC
environment variable. Though there is no option for partial option override.There is already support for a set of pre-defined color profiles available in the setup screen. As @Explorer09 mentioned, these use just the 16 primary console colors, which then get mapped to actual RGB colors by your terminal emulator. And while there's roughly a agreed-upon mapping of these colors, there's nothing that prevents your terminal emulator to display color 1 as bright pink instead of the commonly used dark blue …
To answer the questions:
HTOPRC
environment variableTo provide a small clarification on how the color themes in htop work: There's a list of enum values that make up what kinds of items we have to color in the UI. Each color profile basically maps the (VGA/VESA) color IDs that each of those UI items should use. That mapping is fully compile-time.
P.S.: Please avoid linking images from other services, as these links may break. Instead embed the image in the post (copy the image to your clipboard and paste it into your text at the right location). This not only avoids images becoming unavailable, but avoids spraying around everyone's data across the internet unnecessarily …
I am on manjaro linux right now.
On mate-terminal htop looks like this:
(from https://i.imgur.com/cew5MLq.jpeg)
I quite like that for the most part. I assume this is derived from the default local theme.
I do not always use mate-desktop though. Often I just use icewm and KDE, so if I use, say, another linux distribution, I probably won't have that htop variant in use anymore. But I would like to re-use it.
This brings me to my question or issue request. Can we customize the colours for htop, on a per-application basis? That is to allow for overriding the deafult colours.
I don't know if htop makes use of a htoprc file or ENV variables but any change would be neat. This does not have to be super-complicated, mind you. It can be kept super-simple, say, only allow for very few values to be customized. Perhaps a simple colour-profile that is human-readable. This could be specified via a commandline flag too such as "htop --rcfile=/tmp/foobar.rc" or anything like that. Or other ways that are simple; I am not requesting a complex and complicated addition.
I read in other threads that htop uses hardcoded values right now (although, htop also seems to derive the colours from the theme itself, so it seems to be only semi hardcoded). So this feature request would also ask for a bit more flexibility - again, just to keep it simple, nothing too complicated. We don't want to inflate the code base too much, so simplest-colour support possible (custom colours though).
Htop itself could also bundle, say, six different colour profiles by default, and people could use it via the commandline too, such as via:
Having default profiles gives people a bit of flexibility. And by limiting it to, say, 6, the amount of maintenance work is also kept low (you can also put it at 12 or so, or even lower, say only 3 options, aside from the current default, so the current default is always available without a need to choose anything else).