]> granicus.if.org Git - procps-ng/commit
top: introduced new focus toggle ('F'), program source
authorJim Warner <james.warner@comcast.net>
Wed, 28 Jul 2021 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Sun, 1 Aug 2021 10:39:46 +0000 (20:39 +1000)
commitbdd50fa2fc00edb51f6125334d2329fdce12c4ba
treed3c8c2f28fc4d89d1e4f982f12d3292c24273e87
parent37f106029975e3045b0cd779525d14c55d24b74e
top: introduced new focus toggle ('F'), program source

Sometimes, it might be useful to isolate a parent task
and its forked children from other system activity. As
an example, a user might want to examine workload in a
specific lxc container. Or maybe there is some need to
question what's happening under the same tmux session.

Since forest view mode tends to be a relatively stable
display, it will sometimes satisfy the above need. But
that mode can't currently guarantee the target process
always remains as the topmost task or even is visible.

So, this patch will enable focusing on any parent task
and keeping it as the topmost process while displaying
it and its forked children only. It then appears as if
there is no other activity in that system by virtue of
the blank lines which follow that final child process.

To implement this new feature, top's redundant 'F' key
has been repurposed. It made little sense devoting two
keys to the Fields Management screen (especially since
the key we've taken required two separate keystrokes).

[ and while we're at it, i also added punctuation to ]
[ that prologue for 'forest_display' since all other ]
[ forest functions used punctuation. And, instead of ]
[ a pointer to a proc_t he will now get a ppt index. ]

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