docs: update documentation around how grouping processes and tree mode are incompatible (#1679)

* update default config

* use info, not note
This commit is contained in:
Clement Tsang 2025-02-21 06:04:08 -05:00 committed by GitHub
parent 393c24d303
commit 9999a4824a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 20 additions and 6 deletions

View File

@ -30,7 +30,7 @@ see information on these options by running `btm -h`, or run `btm --help` to dis
| `-S, --case_sensitive` | Enables case sensitivity by default. | | `-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. | | `-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. | | `--disable_advanced_kill` | Hides additional stopping options Unix-like systems. |
| `-g, --group_processes` | Groups processes with the same name by default. | | `-g, --group_processes` | Groups processes with the same name by default. No effect if `--tree` is set. |
| `--process_memory_as_value` | Defaults to showing process memory usage by value. | | `--process_memory_as_value` | Defaults to showing process memory usage by value. |
| `--process_command` | Shows the full command name instead of the process name by default. | | `--process_command` | Shows the full command name instead of the process name by default. |
| `-R, --regex` | Enables regex by default while searching. | | `-R, --regex` | Enables regex by default while searching. |

View File

@ -64,7 +64,14 @@ is added together when displayed.
<img src="../../../assets/screenshots/process/process_grouped.webp" alt="A picture of grouped mode in a process widget."/> <img src="../../../assets/screenshots/process/process_grouped.webp" alt="A picture of grouped mode in a process widget."/>
</figure> </figure>
Note that the process state and user columns are disabled in this mode. !!! info
Note that the process state and user columns are disabled in this mode.
!!! info
Note that if tree mode is also active, processes cannot be grouped together due to the behaviour of the two modes
somewhat clashing. This also reflects with default modes like `group_processes`.
### Process termination ### Process termination
@ -94,7 +101,10 @@ Pressing ++t++ or ++f5++ in the table toggles tree mode in the process widget, d
A process in tree mode can also be "collapsed", hiding its children and any descendants, using either the ++minus++ or ++plus++ keys, or double-clicking on an entry. A process in tree mode can also be "collapsed", hiding its children and any descendants, using either the ++minus++ or ++plus++ keys, or double-clicking on an entry.
Lastly, note that in tree mode, processes cannot be grouped together due to the behaviour of the two modes somewhat clashing. !!! info
Note that if tree mode is active, processes cannot be grouped together due to the behaviour of the two modes
somewhat clashing. This also reflects with default modes like `group_processes`.
### Full command ### Full command

View File

@ -24,7 +24,8 @@
# Whether to set CPU% on a process to be based on the total CPU or per-core CPU% (not divided by the number of cpus). # Whether to set CPU% on a process to be based on the total CPU or per-core CPU% (not divided by the number of cpus).
#unnormalized_cpu = false #unnormalized_cpu = false
# Whether to group processes with the same name together by default. # Whether to group processes with the same name together by default. Doesn't do anything
# if tree is set to true or --tree is set.
#group_processes = false #group_processes = false
# Whether to make process searching case sensitive by default. # Whether to make process searching case sensitive by default.

View File

@ -283,7 +283,8 @@ pub(crate) const CONFIG_TEXT: &str = r#"# This is a default config file for bott
# Whether to set CPU% on a process to be based on the total CPU or per-core CPU% (not divided by the number of cpus). # Whether to set CPU% on a process to be based on the total CPU or per-core CPU% (not divided by the number of cpus).
#unnormalized_cpu = false #unnormalized_cpu = false
# Whether to group processes with the same name together by default. # Whether to group processes with the same name together by default. Doesn't do anything
# if tree is set to true or --tree is set.
#group_processes = false #group_processes = false
# Whether to make process searching case sensitive by default. # Whether to make process searching case sensitive by default.

View File

@ -301,7 +301,9 @@ pub struct ProcessArgs {
short = 'g', short = 'g',
long, long,
action = ArgAction::SetTrue, action = ArgAction::SetTrue,
help = "Groups processes with the same name by default." help = "Groups processes with the same name by default.",
long_help = "Groups processes with the same name by default. Doesn't do anything if --tree is also set, or \
tree=true in the config."
)] )]
pub group_processes: bool, pub group_processes: bool,