htop icon indicating copy to clipboard operation
htop copied to clipboard

Introduce autoTitleRightAlign column flag

Open cgzones opened this issue 2 years ago • 1 comments

Instead of handling PERCENT_CPU as a special case for whether to align the title of a dynamically sized column to the right or the left introduce a new flag, which can be reused by other columns.

Split from #1288

/cc @Explorer09

cgzones avatar Sep 03 '23 19:09 cgzones

My concerns about the autoTitleRightAlign flag are these:

  1. There is only one user of the flag in this commit. Generally we shouldn't introduce a flag when there is only one user using it.
  2. If a column needs to be right-aligned, the alignment would likely apply to not just the title, but the data cells as well. (It won't make sense to just right align the title and not the data.)

Explorer09 avatar Sep 04 '23 02:09 Explorer09

Applied via https://github.com/htop-dev/htop/commit/cbcfc5f7d08e210a3477071607a3195fa31f06a3

cgzones avatar Mar 27 '24 18:03 cgzones