]> granicus.if.org Git - procps-ng/commit
top: better graphic scaling in cpu/mem summary display
authorJim Warner <james.warner@comcast.net>
Fri, 9 Sep 2022 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Mon, 12 Sep 2022 12:15:28 +0000 (22:15 +1000)
commit8c69e66a1a1bfa472c5aec9b9ef7cd445690bd04
treed0e3c42bb93c485c77bb8060c9534b834d85e252
parent2d5b51d1a2aa19d077a2f3db5be187f982d70e70
top: better graphic scaling in cpu/mem summary display

This program has always been sensitive to the width of
a terminal/console. The detailed cpu/memory statistics
plus all of those full screen replacement windows were
designed to fit within some 80 column, 24 row display.

When a user narrowed a gui terminal to less than those
dimensions, top would simply truncate the data to fit.
However, when displaying cpu/mem graphs instead of the
detailed statistics such truncation was not justified.
After all, such graphs were already scaled to 80 cols.

Henceforth, when in graph mode, truncation won't occur
until the graphs will no longer fit within 10 columns.

[ can you keep a secret? this change is really being ]
[ made in anticipation of showing more than just two ]
[ cpu graphs in the summary area on each screen row! ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
src/top/top.c