Skip to content

Commit

Permalink
docs: update documentation around how grouping processes and tree mod…
Browse files Browse the repository at this point in the history
…e are incompatible (#1679)

* update default config

* use info, not note
  • Loading branch information
ClementTsang authored Feb 21, 2025
1 parent 393c24d commit 9999a48
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/content/configuration/command-line-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
| `-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. |
| `-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_command` | Shows the full command name instead of the process name by default. |
| `-R, --regex` | Enables regex by default while searching. |
Expand Down
14 changes: 12 additions & 2 deletions docs/content/usage/widgets/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -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."/>
</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

Expand Down Expand Up @@ -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.

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

Expand Down
3 changes: 2 additions & 1 deletion sample_configs/default_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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).
#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

# Whether to make process searching case sensitive by default.
Expand Down
3 changes: 2 additions & 1 deletion src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
#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
# Whether to make process searching case sensitive by default.
Expand Down
4 changes: 3 additions & 1 deletion src/options/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ pub struct ProcessArgs {
short = 'g',
long,
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,

Expand Down

0 comments on commit 9999a48

Please sign in to comment.