redbear-power: header uptime and process count
Extend the header load-average line to also show system uptime and total process count. Uptime uses meminfo::format_uptime; process count uses app.processes.count(). All values stay on one line to keep HEADER_LINES at 8. Build, 224 tests, clippy, and fmt clean.
This commit is contained in:
@@ -285,6 +285,10 @@ pub fn render_header<'a>(app: &'a App, focused: bool) -> Paragraph<'a> {
|
||||
}
|
||||
None => "n/a".set_style(theme.value_off),
|
||||
},
|
||||
" Uptime: ".set_style(theme.label),
|
||||
crate::meminfo::format_uptime(app.os_info.uptime_secs).set_style(theme.value),
|
||||
" Procs: ".set_style(theme.label),
|
||||
format!("{}", app.processes.count()).set_style(theme.value),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Daemons: ".set_style(theme.label),
|
||||
|
||||
Reference in New Issue
Block a user