htop icon indicating copy to clipboard operation
htop copied to clipboard

Custom character for meter (instead of "|")

Open BenBE opened this issue 3 years ago • 6 comments

It would be nice if the character that makes the meter could be changed from "|" to the one the user prefers. Is there ANY way to change that ugly default pipe for a better visual character with more body defined by us? Thanks in advance.

Originally posted by @noctumsempra in https://github.com/htop-dev/htop/issues/526#issuecomment-855311230

BenBE avatar Jun 06 '21 10:06 BenBE

Hello again. Is there any new about this "new feature"?

Can these bars' char be some character being READ from ~/.config/htoprc via one of its config pairs for example? I wish I could do this myself, it doesn't look difficult to implement, and it would visually help any of us with burden in the eyes to be able to chose a solid █ (U+2588) instead of the THIN UGLY PIPE.

Thanks.

Noctumsempra avatar Dec 20 '22 18:12 Noctumsempra

There has no work been done on this, but in general I see this as a nice enhancement.

The new part here is mostly with the additional setting that has to be devised and the UI for its setup. We aim for all settings to be reachable in the UI directly. Thus just having the setting available in the config file won't be sufficient (that would be just part of the necessary changes).

BenBE avatar Dec 21 '22 12:12 BenBE

This could even go with fractional blocks to increase precision... Not sure if it would be worth the trouble.

eworm-de avatar Dec 21 '22 12:12 eworm-de

This could even go with fractional blocks to increase precision... Not sure if it would be worth the trouble.

I though of something like this too and if we'd like to go that route we'd design the configuration UI accordingly.

In a really trimmed-down version this might be as simple as providing a set of defaults with something like the following sets as defaults:

 ||||||||
 ########
 ▏▎▍▌▋▊▉█
 ▁▂▃▄▅▆▇█
 ░░▒▒▓▓██
 ▌▌▌▌████
⠀⡀⡄⡆⡇⣇⣧⣷⣿

This basically would produce subpixel rendering for ⅛th of the cell (full cells using index 8, empty cells using cell 0 from the 9 bytes in each profile).

BenBE avatar Dec 21 '22 13:12 BenBE

Love the different pattern ideas for the rendering.

Noctumsempra avatar Dec 21 '22 17:12 Noctumsempra

It could also be considered to use or the following for more detailed metering:

Unicode sign name
2588 FULL BLOCK
2589 LEFT SEVEN EIGHTHS BLOCK
258A LEFT THREE QUARTERS BLOCK
258B LEFT FIVE EIGHTHS BLOCK
258C LEFT HALF BLOCK
258D LEFT THREE EIGHTHS BLOCK
258E LEFT ONE QUARTER BLOCK
258F LEFT ONE EIGHTH BLOCK

theking2 avatar May 15 '23 10:05 theking2