feat(proc): add E hotkey to collapse/expand all tree nodes

Pressing E in tree mode collapses all processes if any parent is
currently expanded, or expands all if everything is already collapsed.
This gives a quick per-application resource summary without having
to manually toggle each node.

Implemented across all platforms (Linux, macOS, FreeBSD, OpenBSD, NetBSD).
This commit is contained in:
jam
2026-02-27 15:22:34 +09:00
committed by Jakob P. Liljenberg
parent 5cd645f482
commit f0cfe0980c
8 changed files with 87 additions and 6 deletions

View File

@@ -346,6 +346,11 @@ namespace Input {
no_update = false;
Config::set("update_following", true);
}
else if (key == "E" and Config::getB("proc_tree")) {
atomic_wait(Runner::active);
Proc::collapse_all = 1;
no_update = false;
}
else if (is_in(key, "u")) {
Config::flip("pause_proc_list");
}