Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add ability to filter out disks and temp #220

Merged
merged 8 commits into from
Sep 3, 2020

Conversation

ClementTsang
Copy link
Owner

@ClementTsang ClementTsang commented Sep 3, 2020

Description

A description of the change and what it does. If relevant, please provide screenshots of what results from the change:

You can now filter out disks and temp sensors by name via config.

For example, for disk filtering:

[disk_filter]
is_list_ignored = false
regex = true
list = ["/dev/sda\\d+"]

Will ignore anything that does not match the given regex pattern of
"/dev/sda\d+".

is_list_ignored and list must be provided, but use_regex is
optional.


If we use the aforementioned disk filter, for example,

[disk_filter]
is_list_ignored = false
regex = true
list = ["/dev/sda\\d+"]

then before:

image

After:

image

Or for temps, if it originally looks like:
image

then if we use:

[temp_filter]
is_list_ignored = false
list = []

we get

image

or

[temp_filter]
is_list_ignored = false
list = ["nvme"]

gives us

image

Issue

If applicable, what issue does this address?

Closes: #168
Closes: #158

Type of change

Remove the irrelevant ones:

  • New feature (non-breaking change which adds functionality)

Test methodology

If required, please state how this was tested:

Furthermore, please tick which platforms this change was tested on:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, see if the following have been met:

  • Change has been tested to work
  • Areas your change affects have been linted using rustfmt
  • Code has been self-reviewed
  • Code has been tested and no new breakage is introduced unless intended
  • Passes CI tests
  • Documentation has been added/updated if needed (README, help menu, etc.)
  • No merge conflicts arise from the change

Other information

Provide any other relevant information:

You can now filter out disks and temp sensors by name via config.

For example, for disk filtering:

```toml
[disk_filter]
is_list_ignored = false
use_regex = true
list = ["/dev/sda\\d+"]
```

Will ignore anything that does not match the given regex pattern of
"/dev/sda\d+".

`is_list_ignored` and `list` must be provided, but `use_regex` is
optional.
@ClementTsang ClementTsang changed the title Hide disks and sensors feature: Add ability to filter out disks and temp Sep 3, 2020
@ClementTsang ClementTsang merged commit cef3166 into master Sep 3, 2020
@ClementTsang ClementTsang deleted the hide_disks_and_sensors branch September 3, 2020 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant