mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-09-21 08:47:53 +02:00
docs: fix missing pages + delete old filtering page (#1806)
This commit is contained in:
parent
a35b81a187
commit
d55e1a674f
@ -1,46 +0,0 @@
|
||||
# Data Filtering
|
||||
|
||||
!!! Warning
|
||||
|
||||
This section is in progress, and is just copied from the old documentation.
|
||||
|
||||
You can hide specific disks, temperature sensors, and networks by name in the config file via `disk.name_filter` and `disk.mount_filter`, `temperature.sensor_filter`, and `network.interface_filter` respectively. Regex (`regex = true`), case-sensitivity (`case_sensitive = true`), and matching only if the entire word matches (`whole_word = true`) are supported, but are off by default. Filters default to denying entries that match and can be toggled by setting `is_list_ignored` to `false` in the config file.
|
||||
|
||||
For example, here's the disk widget with no filter:
|
||||
|
||||

|
||||
|
||||
The following in the config file would filter out some entries by disk name:
|
||||
|
||||
```toml
|
||||
[disk.name_filter]
|
||||
is_list_ignored = true
|
||||
list = ["/dev/sda"]
|
||||
regex = true
|
||||
case_sensitive = false
|
||||
whole_word = false
|
||||
```
|
||||
|
||||

|
||||
|
||||
If there are two potentially conflicting filters (i.e. when you are using both a disk and mount filter), the filter that explicitly allows an entry takes precedence over a filter that explicitly denies one. So for example, let's say we set a disk filter accepting anything with `/dev/sda`, but deny anything with `/mnt/.*` or `/`. So to do so, we write in the config file:
|
||||
|
||||
```toml
|
||||
[disk.name_filter]
|
||||
is_list_ignored = false
|
||||
list = ["/dev/sda"]
|
||||
regex = true
|
||||
case_sensitive = false
|
||||
whole_word = false
|
||||
|
||||
[disk.mount_filter]
|
||||
is_list_ignored = true
|
||||
list = ["/mnt/.*", "/"]
|
||||
regex = true
|
||||
case_sensitive = false
|
||||
whole_word = true
|
||||
```
|
||||
|
||||
This gives us:
|
||||
|
||||

|
@ -16,7 +16,11 @@ You can filter out what entries to show by configuring `[disk.name_filter]` and
|
||||
you can set a list of things to filter with by setting `list`, and configure how that list
|
||||
is processed with the other options.
|
||||
|
||||
For example, here we are ignoring any entry with a name that matches `/dev/sda<NUMBERS>`, or specifically `/dev/nvme0n1p2`.
|
||||
For example, consider a disk widget showing these entries:
|
||||
|
||||

|
||||
|
||||
If we wanted to ignoring any entry with a name that matches `/dev/sda`:
|
||||
|
||||
```toml
|
||||
[disk.name_filter]
|
||||
@ -24,7 +28,7 @@ For example, here we are ignoring any entry with a name that matches `/dev/sda<N
|
||||
is_list_ignored = true
|
||||
|
||||
# A list of filters to try and match.
|
||||
list = ["/dev/sda\\d+", "/dev/nvme0n1p2"]
|
||||
list = ["/dev/sda"]
|
||||
|
||||
# Whether to use regex. Defaults to false.
|
||||
regex = true
|
||||
@ -35,3 +39,29 @@ case_sensitive = false
|
||||
# Whether to be require matching the whole word. Defaults to false.
|
||||
whole_word = false
|
||||
```
|
||||
|
||||
This would give us:
|
||||
|
||||

|
||||
|
||||
We can also combine both the name filter and mount filter. For example:
|
||||
|
||||
```toml
|
||||
[disk.name_filter]
|
||||
is_list_ignored = false
|
||||
list = ["/dev/sda"]
|
||||
regex = true
|
||||
case_sensitive = false
|
||||
whole_word = false
|
||||
|
||||
[disk.mount_filter]
|
||||
is_list_ignored = true
|
||||
list = ["/mnt/.*", "/"]
|
||||
regex = true
|
||||
case_sensitive = false
|
||||
whole_word = true
|
||||
```
|
||||
|
||||
This gives us:
|
||||
|
||||

|
||||
|
@ -167,10 +167,12 @@ nav:
|
||||
- "Config File":
|
||||
- configuration/config-file/index.md
|
||||
- "CPU Widget": configuration/config-file/cpu.md
|
||||
- "Data Filtering": configuration/config-file/data-filtering.md
|
||||
- "Disk Table Widget": configuration/config-file/disk-table.md
|
||||
- "Network Widget": configuration/config-file/network.md
|
||||
- "Processes Widget": configuration/config-file/processes.md
|
||||
- "Temperature Table Widget": configuration/config-file/temperature-table.md
|
||||
- "Flags": configuration/config-file/flags.md
|
||||
- "Layout": configuration/config-file/layout.md
|
||||
- "Processes Widget": configuration/config-file/processes.md
|
||||
- "Styling": configuration/config-file/styling.md
|
||||
- "Contribution":
|
||||
- "Issues, Pull Requests, and Discussions": contribution/issues-and-pull-requests.md
|
||||
|
Loading…
x
Reference in New Issue
Block a user