htop
htop copied to clipboard
Introduce autoTitleRightAlign column flag
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
My concerns about the autoTitleRightAlign flag are these:
- 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.
- 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.)
Applied via https://github.com/htop-dev/htop/commit/cbcfc5f7d08e210a3477071607a3195fa31f06a3