From bc2c363a49b185a629e2ce145c7cd94631af9ab2 Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Thu, 11 Jan 2024 00:25:53 -0500 Subject: refactor: clean up arg code more (#1377) * fix sort function * Try macros * Revert "Try macros" This reverts commit 93c7306f8ae8b906e0a66d1a4d758aad51efe3eb. * use next_help_heading instead * test * Revert "test" This reverts commit 017a1702b35dd7fd87c449e27a3bdb65bc858f72. * Reapply "test" This reverts commit 23c09d3828594d880ecf5e753e1fcdf5fd719e42. * use foldl instead :) * a word * different conditionals * update docs, change ordering * more formatting stuff --- README.md | 2 +- docs/content/configuration/command-line-flags.md | 47 -- docs/content/configuration/command-line-options.md | 94 +++ docs/content/configuration/config-file/flags.md | 2 +- docs/content/index.md | 2 +- docs/content/usage/widgets/network.md | 2 +- docs/mkdocs.yml | 2 +- src/options/args.rs | 871 ++++++++++----------- 8 files changed, 506 insertions(+), 516 deletions(-) delete mode 100644 docs/content/configuration/command-line-flags.md create mode 100644 docs/content/configuration/command-line-options.md diff --git a/README.md b/README.md index 40b8865b..071d76a4 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ As (yet another) process/system visualization and management application, bottom - [Cross-platform support](https://github.com/ClementTsang/bottom#support) for Linux, macOS, and Windows, with more planned in the future. -- [Customizable behaviour](https://clementtsang.github.io/bottom/nightly/configuration/command-line-flags/) that can be controlled with command-line flags or a config file, such as: +- [Customizable behaviour](https://clementtsang.github.io/bottom/nightly/configuration/command-line-options/) that can be controlled with command-line flags or a config file, such as: - Custom and built-in colour themes - Customizing widget behaviour diff --git a/docs/content/configuration/command-line-flags.md b/docs/content/configuration/command-line-flags.md deleted file mode 100644 index e2ab53ae..00000000 --- a/docs/content/configuration/command-line-flags.md +++ /dev/null @@ -1,47 +0,0 @@ -# Command-line Flags - -The following flags can be provided to bottom in the command line to change the behaviour of the program. You can also -see information on these flags by running `btm -h`, or run `btm --help` to display more detailed information on each flag: - -| Flag | Behaviour | -| ----------------------------------- | --------------------------------------------------------------------- | -| --autohide_time | Temporarily shows the time scale in graphs. | -| -b, --basic | Hides graphs and uses a more basic look. | -| --battery | Shows the battery widget. | -| -S, --case_sensitive | Enables case sensitivity by default. | -| -c, --celsius | Sets the temperature type to Celsius. | -| --color | Use a color scheme, use --help for info. | -| -C, --config | Sets the location of the config file. | -| -u, --current_usage | Sets process CPU% to be based on current CPU%. | -| -t, --default_time_value