Skip to content

Commit

Permalink
docs: update docs around disable_gpu change. (#1562)
Browse files Browse the repository at this point in the history
* docs: update changelog

* update docs
  • Loading branch information
ClementTsang authored Aug 15, 2024
1 parent 6b0a285 commit 5a00998
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ That said, these are more guidelines rather than hardset rules, though the proje
- [#1551](https://github.com/ClementTsang/bottom/pull/1551): Fix missing parent section names in default config.
- [#1552](https://github.com/ClementTsang/bottom/pull/1552): Fix typo in default config.

### Changes

- [#1559](https://github.com/ClementTsang/bottom/pull/1559): Rename `--enable_gpu` to `--disable_gpu`, and make GPU features enabled by default.

## [0.10.2] - 2024-08-05

### Features
Expand Down
6 changes: 3 additions & 3 deletions docs/content/configuration/command-line-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ see information on these options by running `btm -h`, or run `btm --help` to dis

## GPU Options

| Option | Behaviour |
| -------------- | ------------------------------------------- |
| `--enable_gpu` | Enable collecting and displaying GPU usage. |
| Option | Behaviour |
| --------------- | --------------------------------------------------------- |
| `--disable_gpu` | Disable collecting and displaying NVIDIA GPU information. |

## Style Options

Expand Down
2 changes: 1 addition & 1 deletion docs/content/configuration/config-file/flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ each time:
| `network_use_binary_prefix` | Boolean | Displays the network widget with binary prefixes. |
| `network_use_bytes` | Boolean | Displays the network widget using bytes. |
| `network_use_log` | Boolean | Displays the network widget with a log scale. |
| `enable_gpu` | Boolean | Shows the GPU widgets. |
| `disable_gpu` | Boolean | Disable NVIDIA GPU data collection. |
| `retention` | String (human readable time, such as "10m", "1h", etc.) | How much data is stored at once in terms of time. |
| `unnormalized_cpu` | Boolean | Show process CPU% without normalizing over the number of cores. |
| `expanded` | Boolean | Expand the default widget upon starting the app. |
Expand Down
2 changes: 1 addition & 1 deletion docs/content/usage/widgets/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If the total RAM or swap available is 0, then it is automatically hidden from th

One can also adjust the displayed time range through either the keyboard or mouse, with a range of 30s to 600s.

This widget can also be configured to display Nvidia GPU memory usage (`--enable_gpu` on Linux/Windows) or cache memory usage (`--enable_cache_memory`).
This widget can also be configured to display Nvidia GPU memory usage (`--disable_gpu` on Linux/Windows to disable) or cache memory usage (`--enable_cache_memory`).

## Key bindings

Expand Down
2 changes: 1 addition & 1 deletion docs/content/usage/widgets/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ By default, the main process table displays the following information for each p
[here](https://docs.rs/sysinfo/latest/sysinfo/struct.Process.html#method.disk_usage)
for more details.

With the feature flag (`--enable_gpu` on Linux/Windows) and gpu process columns enabled in the configuration:
With the feature flag (`--disable_gpu` on Linux/Windows to disable) and gpu process columns enabled in the configuration:

- GPU memory use percentage
- GPU core utilization percentage
Expand Down
2 changes: 1 addition & 1 deletion docs/content/usage/widgets/temperature.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The temperature widget provides a table of temperature sensors and their current

The temperature widget provides the sensor name as well as its current temperature.

This widget can also be configured to display Nvidia GPU temperatures (`--enable_gpu` on Linux/Windows).
This widget can also be configured to display Nvidia GPU temperatures (`--disable_gpu` on Linux/Windows to disable).

## Key bindings

Expand Down
2 changes: 1 addition & 1 deletion sample_configs/default_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
# Hides advanced options to stop a process on Unix-like systems.
#disable_advanced_kill = false
# Shows GPU(s) memory
#enable_gpu = false
#disable_gpu = false
# Shows cache and buffer memory
#enable_cache_memory = false
# How much data is stored at once in terms of time.
Expand Down
2 changes: 2 additions & 0 deletions schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ behind a feature flag to avoid building unnecessary code for release builds, and
cargo run --features="generate_schema" -- --generate_schema > schema/nightly/bottom.json
```

Alternatively, run the script in `scripts/schema/generate.sh`, which does this for you.

## Publication

To publish these schemas, cut a new version by copying `nightly` to a new folder with a version number matching bottom's
Expand Down
6 changes: 3 additions & 3 deletions schema/nightly/bottom.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,19 +318,19 @@
"null"
]
},
"dot_marker": {
"disable_gpu": {
"type": [
"boolean",
"null"
]
},
"enable_cache_memory": {
"dot_marker": {
"type": [
"boolean",
"null"
]
},
"disable_gpu": {
"enable_cache_memory": {
"type": [
"boolean",
"null"
Expand Down
8 changes: 8 additions & 0 deletions scripts/schema/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -e

cd "$(dirname "$0")";
cd ../..

cargo run --features="generate_schema" -- --generate_schema > schema/nightly/bottom.json
1 change: 1 addition & 0 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ fn get_enable_gpu(args: &BottomArgs, config: &Config) -> bool {
if args.gpu.disable_gpu {
return false;
}

!config
.flags
.as_ref()
Expand Down
2 changes: 1 addition & 1 deletion src/options/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ pub struct BatteryArgs {
#[derive(Args, Clone, Debug, Default)]
#[command(next_help_heading = "GPU Options", rename_all = "snake_case")]
pub struct GpuArgs {
#[arg(long, action = ArgAction::SetTrue, help = "Disable collecting and displaying GPU usage.")]
#[arg(long, action = ArgAction::SetTrue, help = "Disable collecting and displaying NVIDIA GPU information.")]
pub disable_gpu: bool,
}

Expand Down

0 comments on commit 5a00998

Please sign in to comment.