Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang committed Apr 10, 2024
1 parent 998be4e commit 18f20a7
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 74 deletions.
118 changes: 59 additions & 59 deletions docs/content/configuration/command-line-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,76 +5,76 @@ see information on these options by running `btm -h`, or run `btm --help` to dis

## General Options

| Option | Behaviour |
| ------------------------------------- | --------------------------------------------------- |
| `--autohide_time` | Temporarily shows the time scale in graphs. |
| `-b`, `--basic` | Hides graphs and uses a more basic look. |
| `-C`, `--config <CONFIG PATH>` | Sets the location of the config file. |
| `-t`, `--default_time_value <TIME>` | Default time value for graphs. |
| `--default_widget_count <INT>` | Sets the n'th selected widget type as the default. |
| `--default_widget_type <WIDGET TYPE>` | Sets the default widget type, use --help for info. |
| `--disable_click` | Disables mouse clicks. |
| `-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. |
| `--cpu_left_legend` | Puts the CPU chart legend to the left side. |
| `-r`, `--rate <TIME>` | Sets the data refresh rate. |
| `--retention <TIME>` | The timespan of data stored. |
| `--show_table_scroll_position` | Shows the scroll position tracker in table widgets. |
| `-d`, `--time_delta <TIME>` | The amount of time changed upon zooming. |
| Option | Behaviour |
| --------------------------------- | ---------------------------------------------------- |
| `--autohide_time` | Temporarily shows the time scale in graphs. |
| `-b, --basic` | Hides graphs and uses a more basic look. |
| `-C, --config <CONFIG PATH>` | Sets the location of the config file. |
| `-t, --default_time_value <TIME>` | Default time value for graphs. |
| `--default_widget_count <N>` | Sets the N'th selected widget type as the default. |
| `--default_widget_type <WIDGET>` | Sets the default widget type, use `--help` for info. |
| `--disable_click` | Disables mouse clicks. |
| `-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 <TIME>` | Sets how often data is refreshed. |
| `--retention <TIME>` | How far back data will be stored up to. |
| `--show_table_scroll_position` | Shows the scroll position tracker in table widgets. |
| `-d, --time_delta <TIME>` | The amount of time changed upon zooming. |

## Process Options

| Option | Behaviour |
| -------------------------- | --------------------------------------------------------------------- |
| `-S`, `--case_sensitive` | Enables case sensitivity by default. |
| `-u`, `--current_usage` | Sets process CPU% to be based on current CPU%. |
| `--disable_advanced_kill` | Hides advanced process killing. |
| `-g`, `--group_processes` | Groups processes with the same name by default. |
| `--process_command` | Show processes as their commands by default. |
| `-R`, `--regex` | Enables regex by default. |
| `-T`, `--tree` | Defaults the process widget be in tree mode. |
| `-n`, `--unnormalized_cpu` | Show process CPU% usage without normalizing over the number of cores. |
| `-W`, `--whole_word` | Enables whole-word matching by default. |
| Option | Behaviour |
| ------------------------- | -------------------------------------------------------------------------------------- |
| `-S, --case_sensitive` | Enables case sensitivity by default. |
| `-u, --current_usage` | Calculates process CPU usage as a percentage of current usage rather than total usage. |
| `--disable_advanced_kill` | Hides additional stopping options Unix-like systems. |
| `-g, --group_processes` | Groups processes with the same name by default. |
| `--mem_as_value` | Defaults to showing process memory usage by value. |
| `--process_command` | Shows the full command name instead of the process name by default. |
| `-R, --regex` | Enables regex by default while searching. |
| `-T, --tree` | Makes the process widget use tree mode by default. |
| `-n, --unnormalized_cpu` | Show process CPU% usage without averaging over the number of CPU cores. |
| `-W, --whole_word` | Enables whole-word matching by default while searching. |

## Temperature Options

| Option | Behaviour |
| -------------------- | --------------------------------------- |
| `-c`, `--celsius` | Use Celsius as the temperature unit. |
| `-f`, `--fahrenheit` | Use Fahrenheit as the temperature unit. |
| `-k`, `--kelvin` | Use Kelvin as the temperature unit. |
| Option | Behaviour |
| ------------------ | --------------------------------------------- |
| `-c, --celsius` | Use Celsius as the temperature unit. Default. |
| `-f, --fahrenheit` | Use Fahrenheit as the temperature unit. |
| `-k, --kelvin` | Use Kelvin as the temperature unit. |

## CPU Options

| Option | Behaviour |
| ---------------------- | ---------------------------- |
| `-a`, `--hide_avg_cpu` | Hides the average CPU usage. |
| Option | Behaviour |
| -------------------- | ------------------------------------------- |
| `--cpu_left_legend` | Puts the CPU chart legend on the left side. |
| `-a, --hide_avg_cpu` | Hides the average CPU usage entry. |

## Memory Options

| Option | Behaviour |
| ----------------------- | --------------------------------------------------------- |
| `--enable_cache_memory` | Enable collecting and displaying cache and buffer memory. |
| `--mem_as_value` | Defaults to showing process memory usage by value. |
| `--memory_legend` | Where to place the legend for the memory widget. |
| Option | Behaviour |
| ---------------------------- | --------------------------------------------------------- |
| `--enable_cache_memory` | Enable collecting and displaying cache and buffer memory. |
| `--memory_legend <POSITION>` | Where to place the legend for the memory chart widget. |

## Network Options

| Option | Behaviour |
| ----------------------------- | ------------------------------------------------- |
| `--network_use_binary_prefix` | Displays the network widget with binary prefixes. |
| `--network_use_bytes` | Displays the network widget using bytes. |
| `--network_use_log` | Displays the network widget with a log scale. |
| `--network_legend` | Where to place the legend for the network widget. |
| `--use_old_network_legend` | DEPRECATED - uses a separate network legend. |
| Option | Behaviour |
| ----------------------------- | ------------------------------------------------------- |
| `--network_legend <POSITION>` | Where to place the legend for the network chart widget. |
| `--network_use_binary_prefix` | Displays the network widget with binary prefixes. |
| `--network_use_bytes` | Displays the network widget using bytes. |
| `--network_use_log` | Displays the network widget with a log scale. |
| `--use_old_network_legend` | (DEPRECATED) Uses a separated network legend. |

## Battery Options

| Option | Behaviour |
| ----------- | ------------------------- |
| `--battery` | Shows the battery widget. |
| Option | Behaviour |
| ----------- | ----------------------------------------------- |
| `--battery` | Shows the battery widget in non-custom layouts. |

## GPU Options

Expand All @@ -84,13 +84,13 @@ see information on these options by running `btm -h`, or run `btm --help` to dis

## Style Options

| Option | Behaviour |
| ------------------------ | ---------------------------------------- |
| `--color <COLOR SCHEME>` | Use a color scheme, use --help for info. |
| Option | Behaviour |
| ------------------------ | ------------------------------------------ |
| `--color <COLOR SCHEME>` | Use a color scheme, use `--help` for info. |

## Other Options

| Option | Behaviour |
| ----------------- | ------------------------------------------ |
| `-h`, `--help` | Prints help (see more info with '--help'). |
| `-V`, `--version` | Prints version information. |
| Option | Behaviour |
| ----------------- | ------------------------------------------------- |
| `-h`, `--help` | Prints help info (for more details use `--help`.) |
| `-V`, `--version` | Prints version information. |
27 changes: 12 additions & 15 deletions src/options/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fn general_args(cmd: Command) -> Command {
.help("Sets the location of the config file.")
.long_help(
"Sets the location of the config file. Expects a config file in the TOML format. \
If it doesn't exist, a default config file is created at the path. If no path is provided,
If it doesn't exist, a default config file is created at the path. If no path is provided, \
the default config location will be used."
)
.value_hint(ValueHint::AnyPath);
Expand All @@ -104,28 +104,26 @@ fn general_args(cmd: Command) -> Command {
.value_name("N")
.help("Sets the N'th selected widget type as the default.")
.long_help(indoc! {
"Sets the N'th selected widget type to use as the default widget.
Requires 'default_widget_type' to also be set, and defaults to 1.
"Sets the N'th selected widget type to use as the default widget. Requires 'default_widget_type' to also be \
set, and defaults to 1.
This reads from left to right, top to bottom. For example, suppose
we have a layout that looks like:
This reads from left to right, top to bottom. For example, suppose we have a layout that looks like:
+-------------------+-----------------------+
| CPU (1) | CPU (2) |
+---------+---------+-------------+---------+
| Process | CPU (3) | Temperature | CPU (4) |
+---------+---------+-------------+---------+
And we set our default widget type to 'CPU'. If we set
'--default_widget_count 1', then it would use the CPU (1) as
the default widget. If we set '--default_widget_count 3', it would
use CPU (3) as the default instead."
And we set our default widget type to 'CPU'. If we set '--default_widget_count 1', then it would use the \
CPU (1) as the default widget. If we set '--default_widget_count 3', it would use CPU (3) as the default \
instead."
});

let default_widget_type = Arg::new("default_widget_type")
.long("default_widget_type")
.action(ArgAction::Set)
.value_name("WIDGET")
.help("Sets the default widget type, use --help for info.")
.help("Sets the default widget type, use `--help` for info.")
.long_help(indoc!{
"Sets which widget type to use as the default widget. For the default \
layout, this defaults to the 'process' widget. For a custom layout, it defaults \
Expand All @@ -138,7 +136,7 @@ fn general_args(cmd: Command) -> Command {
| Process | CPU (3) | Temperature | CPU (4) |
+---------+---------+-------------+---------+
Setting '--default_widget_type Temp' will make the temperature widget selected by default."
Setting '--default_widget_type temperature' will make the temperature widget selected by default."
})
.value_parser([
"cpu",
Expand Down Expand Up @@ -504,10 +502,9 @@ fn style_args(cmd: Command) -> Command {
"nord-light",
])
.hide_possible_values(true)
.help(
"Use a color scheme, use --help for info on the colors.\n
[possible values: default, default-light, gruvbox, gruvbox-light, nord, nord-light]",
)
.help(indoc! {
"Use a color scheme, use `--help` for info on the colors. [possible values: default, default-light, gruvbox, gruvbox-light, nord, nord-light]",
})
.long_help(indoc! {
"Use a pre-defined color scheme. Currently supported values are:
- default
Expand Down

0 comments on commit 18f20a7

Please sign in to comment.