How clementtsang/bottom works
bottom is a cross-platform terminal system monitor. Its main workflow collects host and process metrics, keeps application data and interaction state, then presents configurable widgets and accepts user actions such as searching, changing focus, and terminating processes. The README documents the major visualization, table, configuration, basic-mode, and expansion capabilities. Some subsystem links below rely on README descriptions or SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: app.rs Application state · lib.rs Runtime bootstrap · process_table.rs Process table · collection.rs Metric collector
Components 16
Runtime and control
- Runtime bootstrap
src/lib.rs - Application state
src/app.rs - Input handling
src/utils/input.rs - Widget layout
src/app/layout_manager.rs - Application data
src/app/data/store.rs - Data filters
src/app/filter.rs
System collection
- Metric collector
src/collection.rs - Process harvesting
src/collection/processes.rs
Widgets and rendering
- Process table
src/widgets/process_table.rs - Process search
src/widgets/process_table/query.rs - Metric widgets
src/widgets - Terminal rendering
src/canvas.rs - Time-series chart
src/canvas/components/time_series/vendored.rs - Process kill dialog
src/canvas/dialogs/process_kill_dialog.rs
Configuration
- CLI and config
src/options.rs
Other components
- Terminal user
Connections 17
- Terminal user → Runtime bootstrap: starts
- Runtime bootstrap → Application state: runs
src/lib.rs - Runtime bootstrap → Metric collector: collects metrics
src/lib.rs - Runtime bootstrap → Application data: updates data
src/lib.rs - Metric collector → Process harvesting: harvests processes
src/collection.rs - Application state → Widget layout: uses layout
src/app.rs - Application state → Data filters: applies filters
src/app.rs - CLI and config → Application state: configures
src/options.rs - Terminal user → Input handling: enters queries
- Process table → Process search: evaluates search
src/widgets/process_table.rs - Process table → Process harvesting: displays process data
src/widgets/process_table.rs - Application state → Process table: manages process view
- Application state → Metric widgets: selects widgets
- Metric widgets → Time-series chart: renders charts
- Application state → Terminal rendering: drives rendering
- Terminal user → Process kill dialog: requests termination
- Application state → Process kill dialog: opens dialog