htop icon indicating copy to clipboard operation
htop copied to clipboard

Feature Request: Start htop with collapsed process tree

Open coderunner34-ahruphey opened this issue 1 month ago • 1 comments

Feature Request: Start htop with collapsed process tree

Description When tree_view=1 is enabled, htop always starts with the entire process tree expanded.
It would be useful to have an option (e.g. tree_autocollapse=1) to start with all branches collapsed by default.

Use cases

  • On systems with hundreds of processes (Proxmox, servers, containers), the expanded tree is very long.
  • Many users prefer to start with a compact view and manually expand processes as needed.
  • Helps users monitor only top-level services without scrolling.

Suggested behavior Add a config option in ~/.config/htop/htoprc, for example:

tree_view=1 tree_collapsed=1

This would open htop directly in tree mode but with all nodes collapsed.

Environment

  • htop version: 3.2.2
  • OS: Debian / Proxmox 12.12 / 8.2.2
  • Terminal: SSH

Additional notes This feature would be especially appreciated by sysadmins and visualization users who rely on htop as a lightweight live process monitor but need a clean overview at startup.

Thanks for maintaining this awesome tool!

coderunner34-ahruphey avatar Nov 10 '25 15:11 coderunner34-ahruphey

But if you collapse the process tree by default, then only the init process (as well as some kernel threads) will be shown.

I wonder if it could be more useful to implement the "collapse all trees" operation as a single hotkey? That way you don't need a config option to do what you want.

Explorer09 avatar Nov 10 '25 18:11 Explorer09