htop icon indicating copy to clipboard operation
htop copied to clipboard

ADDED: Toggle Expand and Collapse all functionality with F12 key

Open sharma-abhishek opened this issue 8 years ago • 8 comments

Kindly review expand and collapse all processes (toggle) functionality with F12 key.

sharma-abhishek avatar Feb 11 '16 14:02 sharma-abhishek

Hi! Thanks for taking the time to write a PR! But what's the expected behavior? On Linux systems, this will collapse init and basically hide all processes. I'm afraid it doesn't sound too useful...

hishamhm avatar Feb 11 '16 17:02 hishamhm

Hi hishamnhm,

It is actually an add-on to expand/collapse functionality which basically group all the child/worker processes into single entity (parent process). It will be of great use when the list of child processes are too long to fit in a console and user wants to scroll down to find the process quickly.

sharma-abhishek avatar Feb 12 '16 06:02 sharma-abhishek

Hello @hishamhm , I can see what you're getting at, but I've verified by compiling that this pull request doesn't cause the issue you think it does. It collapses all processe trees except the init, so I thinks it can be merged into the next release.

https://www.pinterest.com/pin/149955862565400621/

ghost avatar Jun 12 '18 05:06 ghost

hey @sharma-abhishek , im running your patch and its great. long time request! thanks so much

5shekel avatar Jun 17 '18 17:06 5shekel

Thanks @gsaga and @5shekel. Good to know that it’s working for you guys. Hoping to see this request merged soon.

sharma-abhishek avatar Jun 19 '18 12:06 sharma-abhishek

further usage revealed a rough edge. start htop, click F12, all fold (aside from init), all good

but... in situation when

  1. htop is already opened and folded
  2. starting new processes - the new processes will not "auto-fold"
  3. and hitting F12 again will not collapse the new guy, but only prior processes (not sure about which ones actually) tested on arch linux

5shekel avatar Jun 19 '18 16:06 5shekel

Just tried on Arch Linux and initially nothing change, after few seconds it closes with PID abort (core dumped)

giuseppe-dandrea avatar Nov 06 '18 15:11 giuseppe-dandrea

Just tried on Arch Linux and initially nothing change, after few seconds it closes with PID abort (core dumped)

Same problem here, just compiled and ran htop on a Manjaro install, got "Aborted (core dumped)". Please help D=

SriramKid avatar May 12 '19 08:05 SriramKid