From ae425d09d81fe79538b703cb08382ef417f3afed Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Fri, 17 Apr 2026 04:02:16 -0400 Subject: [PATCH] feature: add new `table_gap` option with a drawn-line option (#2039) This PR replaces the `hide_table_gap` option with a new `table_gap` option that controls whether a space is drawn, a line is drawn, or nothing is drawn. --- CHANGELOG.md | 2 ++ .../configuration/command-line-options.md | 2 +- .../configuration/config-file/flags.md | 8 +++-- .../configuration/config-file/network.md | 8 +++++ .../configuration/config-file/processes.md | 8 +++++ sample_configs/default_config.toml | 5 +-- schema/nightly/bottom.json | 32 ++++++++--------- src/app.rs | 7 ++-- src/canvas/components/data_table.rs | 3 +- src/canvas/components/data_table/draw.rs | 34 +++++++++++++++++- src/canvas/components/data_table/props.rs | 6 ++-- src/canvas/components/data_table/sortable.rs | 3 +- src/canvas/widgets/battery_display.rs | 36 ++++++++++++++++++- src/constants.rs | 5 +-- src/options.rs | 12 +++++-- src/options/args.rs | 8 ----- src/options/config/disk.rs | 5 ++- src/options/config/flags.rs | 25 +++++++++++-- src/options/config/network.rs | 3 +- src/options/config/process.rs | 6 ++-- 20 files changed, 166 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94f139b3..71cb5909 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,10 +31,12 @@ That said, these are more guidelines rather than hard rules, though the project - [#1938](https://github.com/ClementTsang/bottom/pull/1938), [#1980](https://github.com/ClementTsang/bottom/pull/1980): Report average packet size and packet rate. - [#2003](https://github.com/ClementTsang/bottom/pull/2003): Configurable default sort column for temperature and disk table widgets. - [#1979](https://github.com/ClementTsang/bottom/pull/1979): Add global `bg_color` option to set widget background colour. +- [#2039](https://github.com/ClementTsang/bottom/pull/2039): Support drawing a line separator between the column headers and data. ### Changes - [#2031](https://github.com/ClementTsang/bottom/pull/2031): Tweak display/hiding logic for a graph widget's legend. +- [#2039](https://github.com/ClementTsang/bottom/pull/2039): Replace `hide_table_gap` with `table_gap`. ### Other diff --git a/docs/content/configuration/command-line-options.md b/docs/content/configuration/command-line-options.md index 4d97dc8c..8b7e51c6 100644 --- a/docs/content/configuration/command-line-options.md +++ b/docs/content/configuration/command-line-options.md @@ -18,7 +18,6 @@ see information on these options by running `btm -h`, or run `btm --help` to dis | | bottom. | | `-m`, `--dot_marker` | Uses a dot marker for graphs. | | `-e`, `--expanded` | Expand the default widget upon starting the app. | -| `--hide_table_gap` | Hides spacing between table headers and entries. | | `--hide_time` | Hides the time scale from being shown. | | `-r`, `--rate