redbear-power: surface tab keys in --help and Controls panel
The tab keys (1-9 jump directly, T cycles next) were always wired in main.rs but not documented anywhere visible. Operators could not discover how to switch between the 9 data tabs (Per-CPU / System / Info / Motherboard / Battery / Sensors / Network / Storage / Process) without reading the source. Two surfaces now surface the tab keys as the FIRST entries, ahead of governor / P-state / throttle controls: 1. Controls panel (visible at the bottom of every TUI frame): adds a 'Tabs:' line listing the 9 direct-jump keys with abbreviated tab names, plus a [T] cycle line. Implemented in render_controls(). 2. --help output (HELP_TEXT constant, shown via 'redbear-power --help' and the in-TUI [?] help overlay): adds a TABS: section at the top of the INTERACTIVE CONTROLS block, listing all 9 tabs in 3-row grid + the [T] cycle key. The keys themselves are unchanged: '1'-'9' for direct tab jump, 'T' for cycle. No new keybindings or behaviors added. Discovered during interactive smoke-testing on the Linux host: the binary worked perfectly but tab navigation was a discoverability hole. Fix-only, no semantic change. 186/186 tests still pass (the controls panel render is covered by the existing snapshot tests).
This commit is contained in:
@@ -1530,6 +1530,16 @@ pub fn render_controls<'a>(app: &'a App, focused: bool) -> Paragraph<'a> {
|
||||
let mut lines = vec![
|
||||
Line::from("Controls".set_style(theme::LABEL_BOLD)),
|
||||
Line::from(""),
|
||||
Line::from(vec![
|
||||
" Tabs: ".yellow(),
|
||||
"[1]PerCPU [2]Sys [3]Info [4]MB [5]Batt [6]Sens \
|
||||
[7]Net [8]Stor [9]Proc".into(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
" ".into(),
|
||||
"[T] cycle (next tab)".into(),
|
||||
]),
|
||||
Line::from(""),
|
||||
Line::from(vec![" [g] ".yellow(), "cycle governor".into()]),
|
||||
Line::from(vec![" [p] ".yellow(), "P-state -1 (slower, cooler)".into()]),
|
||||
Line::from(vec![" [P] ".yellow(), "P-state +1 (faster, hotter)".into()]),
|
||||
@@ -1658,6 +1668,13 @@ TOML CONFIG:
|
||||
auto_stop_temp_c int or null (default 95)
|
||||
|
||||
INTERACTIVE CONTROLS:
|
||||
|
||||
TABS:
|
||||
[1] Per-CPU [2] System [3] Info
|
||||
[4] Motherboard [5] Battery [6] Sensors
|
||||
[7] Network [8] Storage [9] Process
|
||||
[T] cycle to next tab
|
||||
|
||||
[g] cycle governor (Performance / Ondemand / Powersave)
|
||||
[p/P] step selected CPU P-state down / up
|
||||
[m/M] force selected CPU to min / max P-state
|
||||
|
||||
Reference in New Issue
Block a user