Skip to content

Commit 50bf433

Browse files
Tree and flat modes for process explorer
1 parent 3e4b9ba commit 50bf433

5 files changed

Lines changed: 497 additions & 251 deletions

File tree

Cargo.lock

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ xz2 = "0.1.7"
7575
zip = "8.6.0"
7676
# Cross-platform process/CPU/memory/disk/network sampling for the process
7777
# explorer (Linux, Windows, macOS). Pure Rust, no external C deps. Only the
78-
# `system` + `network` features are needed (drops temperature/components, the
79-
# user database, and the mounted-disk listing we don't use).
80-
sysinfo = { version = "0.39.5", default-features = false, features = ["system", "network"] }
78+
# `system` + `network` + `user` features are needed (drops temperature/components
79+
# and the mounted-disk listing we don't use). `user` maps process UIDs to names.
80+
sysinfo = { version = "0.39.5", default-features = false, features = ["system", "network", "user"] }
8181
ar-reshaper = "1.5.0"
8282
unicode-bidi = "0.3.18"
8383
ratatui-image = { version = "11.0.6", default-features = false, features = ["crossterm"] }

doc/MANUAL.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ and **F9 → Wrap** to show those alternates.
150150
### Process explorer
151151

152152
- `↑ ↓` / `PgUp PgDn` / `Home End` — Move the selection
153-
- `` / `` — Expand / collapse the selected process (or step into a child / out to the parent)
154-
- `Enter` / `Space` — Toggle the selected subtree open or closed
155-
- `*` — Collapse every subtree (top-level overview) or expand them all again
156-
- `c` / `m` / `n` / `p` — Sort by CPU / memory / name / PID (again to reverse)
153+
- `Tab` — Switch between the flat list and the process tree
154+
- `` / `` / `Enter` / `Space` (tree mode) — Expand / collapse the selected process (`` on a collapsed row jumps to its parent)
155+
- `*` (tree mode) — Collapse every subtree, or expand them all again
156+
- `c` / `m` / `t` / `n` / `u` / `p` — Sort by CPU / memory / threads / program / user / PID (again to reverse)
157157
- `r` — Reverse the sort order
158158
- `+` / `-` — Adjust the refresh interval
159159
- `k` / `F8` / `F9` / `Del` — Kill the selected process (SIGTERM, with confirm)
@@ -578,17 +578,18 @@ and live graphs. It works on **Linux, Windows and macOS**.
578578
**Useful for** seeing what's running and what's using the CPU, memory, disk and
579579
network — and killing a runaway process.
580580

581-
**Operation.** The table is a **collapsible tree**. Every process is shown by
582-
default (nothing is hidden), indented under its parent so multi-process apps are
583-
grouped; the direct children of `init`/`systemd` are lifted to the top level so
584-
the roots are the real services and apps rather than just pid 1. A process with
585-
children carries a **** marker when open and **** when folded: press **``** (or
586-
**`Enter`**/**`Space`**) to collapse a subtree and **``** to reopen it; **``**
587-
on an already-collapsed row jumps to the parent, and **`*`** folds every subtree
588-
to a top-level overview (press again to expand all). Each row shows CPU%, memory, thread count and a
589-
per-process CPU sparkline; sort by **name, CPU, memory, threads or PID** (the
590-
sort hotkey is shown in each column header) — the sort orders the top-level
591-
processes, and children stay grouped under their parent. The layout adds a CPU-load line
581+
**Operation.** The table has two layouts, toggled with **`Tab`**. **Flat** (the
582+
default) is a single sortable list with **Pid**, **Program**, **Command**,
583+
**Threads**, **User** and **MemB** columns. **Tree** shows the parent/child
584+
process hierarchy, **fully unfolded** by default, with branch lines and a fold
585+
box on each parent: **`[-]`** when open, **`[+]`** when folded; press **``**
586+
(or **`Enter`**/**`Space`**) to unfold a subtree and **``** to fold it (or, on an
587+
already-folded row, to jump to the parent), and **`*`** to fold/unfold the whole
588+
tree at once. Individual threads are collapsed into their process's **Threads**
589+
count rather than listed separately. Each row also shows CPU%, memory and a
590+
per-process CPU sparkline; sort by **program, CPU, memory, threads, user or PID**
591+
— in the tree, the sort orders each set of siblings while children stay grouped
592+
under their parent. The layout adds a CPU-load line
592593
graph and per-core meters, a memory sparkline, and two **centre-line graphs**
593594
that split a metric into its two directions around a drawn **horizontal axis
594595
line**: the **Disk** panel grows **writes upward (▲)** and **reads downward

0 commit comments

Comments
 (0)