docs: update docs around disable_gpu change. (#1562)

* docs: update changelog

* update docs
This commit is contained in:
Clement Tsang 2024-08-15 00:27:32 +00:00 committed by GitHub
parent 6b0a285541
commit 5a009987ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 30 additions and 15 deletions

View File

@ -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. - [#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. - [#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 ## [0.10.2] - 2024-08-05
### Features ### Features

View File

@ -79,9 +79,9 @@ see information on these options by running `btm -h`, or run `btm --help` to dis
## GPU Options ## GPU Options
| Option | Behaviour | | Option | Behaviour |
| -------------- | ------------------------------------------- | | --------------- | --------------------------------------------------------- |
| `--enable_gpu` | Enable collecting and displaying GPU usage. | | `--disable_gpu` | Disable collecting and displaying NVIDIA GPU information. |
## Style Options ## Style Options

View File

@ -44,7 +44,7 @@ each time:
| `network_use_binary_prefix` | Boolean | Displays the network widget with binary prefixes. | | `network_use_binary_prefix` | Boolean | Displays the network widget with binary prefixes. |
| `network_use_bytes` | Boolean | Displays the network widget using bytes. | | `network_use_bytes` | Boolean | Displays the network widget using bytes. |
| `network_use_log` | Boolean | Displays the network widget with a log scale. | | `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. | | `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. | | `unnormalized_cpu` | Boolean | Show process CPU% without normalizing over the number of cores. |
| `expanded` | Boolean | Expand the default widget upon starting the app. | | `expanded` | Boolean | Expand the default widget upon starting the app. |

View File

@ -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. 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 ## Key bindings

View File

@ -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) [here](https://docs.rs/sysinfo/latest/sysinfo/struct.Process.html#method.disk_usage)
for more details. 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 memory use percentage
- GPU core utilization percentage - GPU core utilization percentage

View File

@ -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. 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 ## Key bindings

View File

@ -74,7 +74,7 @@
# Hides advanced options to stop a process on Unix-like systems. # Hides advanced options to stop a process on Unix-like systems.
#disable_advanced_kill = false #disable_advanced_kill = false
# Shows GPU(s) memory # Shows GPU(s) memory
#enable_gpu = false #disable_gpu = false
# Shows cache and buffer memory # Shows cache and buffer memory
#enable_cache_memory = false #enable_cache_memory = false
# How much data is stored at once in terms of time. # How much data is stored at once in terms of time.

View File

@ -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 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 ## Publication
To publish these schemas, cut a new version by copying `nightly` to a new folder with a version number matching bottom's To publish these schemas, cut a new version by copying `nightly` to a new folder with a version number matching bottom's

View File

@ -318,6 +318,12 @@
"null" "null"
] ]
}, },
"disable_gpu": {
"type": [
"boolean",
"null"
]
},
"dot_marker": { "dot_marker": {
"type": [ "type": [
"boolean", "boolean",
@ -330,12 +336,6 @@
"null" "null"
] ]
}, },
"disable_gpu": {
"type": [
"boolean",
"null"
]
},
"expanded": { "expanded": {
"type": [ "type": [
"boolean", "boolean",

8
scripts/schema/generate.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
set -e
cd "$(dirname "$0")";
cd ../..
cargo run --features="generate_schema" -- --generate_schema > schema/nightly/bottom.json

View File

@ -811,6 +811,7 @@ fn get_enable_gpu(args: &BottomArgs, config: &Config) -> bool {
if args.gpu.disable_gpu { if args.gpu.disable_gpu {
return false; return false;
} }
!config !config
.flags .flags
.as_ref() .as_ref()

View File

@ -520,7 +520,7 @@ pub struct BatteryArgs {
#[derive(Args, Clone, Debug, Default)] #[derive(Args, Clone, Debug, Default)]
#[command(next_help_heading = "GPU Options", rename_all = "snake_case")] #[command(next_help_heading = "GPU Options", rename_all = "snake_case")]
pub struct GpuArgs { 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, pub disable_gpu: bool,
} }