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

fix: missing parent section names in TOML #1551

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sample_configs/default_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@

# Disk widget configuration
#[disk]
#[name_filter]
#[disk.name_filter]
#is_list_ignored = true
#list = ["/dev/sda\\d+", "/dev/nvme0n1p2"]
#regex = true
#case_sensitive = false
#whole_word = false

#[mount_filter]
#[disk.mount_filter]
#is_list_ignored = true
#list = ["/mnt/.*", "/boot"]
#regex = true
Expand All @@ -109,7 +109,7 @@

# Temperature widget configuration
#[temperature]
#[sensor_filter]
#[temperature.sensor_filter]
#is_list_ignored = true
#list = ["cpu", "wifi"]
#regex = false
Expand All @@ -118,7 +118,7 @@

# Network widget configuration
#[network]
#[interface_filter]
#[network.interface_filter]
#is_list_ignored = true
#list = ["virbr0.*"]
#regex = true
Expand Down
8 changes: 4 additions & 4 deletions src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,14 @@ pub const CONFIG_TEXT: &str = r#"# This is a default config file for bottom. Al

# Disk widget configuration
#[disk]
#[name_filter]
#[disk.name_filter]
#is_list_ignored = true
#list = ["/dev/sda\\d+", "/dev/nvme0n1p2"]
#regex = true
#case_sensitive = false
#whole_word = false

#[mount_filter]
#[disk.mount_filter]
#is_list_ignored = true
#list = ["/mnt/.*", "/boot"]
#regex = true
Expand All @@ -373,7 +373,7 @@ pub const CONFIG_TEXT: &str = r#"# This is a default config file for bottom. Al

# Temperature widget configuration
#[temperature]
#[sensor_filter]
#[temperature.sensor_filter]
#is_list_ignored = true
#list = ["cpu", "wifi"]
#regex = false
Expand All @@ -382,7 +382,7 @@ pub const CONFIG_TEXT: &str = r#"# This is a default config file for bottom. Al

# Network widget configuration
#[network]
#[interface_filter]
#[network.interface_filter]
#is_list_ignored = true
#list = ["virbr0.*"]
#regex = true
Expand Down
8 changes: 4 additions & 4 deletions tests/valid_configs/filtering.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
[disk]
[name_filter]
[disk.name_filter]
is_list_ignored = true
list = ["/dev/sda\\d+", "/dev/nvme0n1p2"]
regex = true
case_sensitive = false
whole_word = false

[mount_filter]
[disk.mount_filter]
is_list_ignored = true
list = ["/mnt/.*", "/boot"]
regex = true
case_sensitive = false
whole_word = false

[temperature]
[sensor_filter]
[temperature.sensor_filter]
is_list_ignored = true
list = ["cpu", "wifi"]
regex = false
case_sensitive = false
whole_word = false

[network]
[interface_filter]
[network.interface_filter]
is_list_ignored = true
list = ["virbr0.*"]
regex = true
Expand Down