From 4c8367225af65cd2702b656d43d930f748c6783b Mon Sep 17 00:00:00 2001 From: Frederick Zhang Date: Thu, 8 Aug 2024 02:59:44 +1000 Subject: [PATCH] fix: missing parent section names in TOML (#1551) --- sample_configs/default_config.toml | 8 ++++---- src/constants.rs | 8 ++++---- tests/valid_configs/filtering.toml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sample_configs/default_config.toml b/sample_configs/default_config.toml index af98fccdf..4db7acdeb 100644 --- a/sample_configs/default_config.toml +++ b/sample_configs/default_config.toml @@ -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 @@ -109,7 +109,7 @@ # Temperature widget configuration #[temperature] -#[sensor_filter] +#[temperature.sensor_filter] #is_list_ignored = true #list = ["cpu", "wifi"] #regex = false @@ -118,7 +118,7 @@ # Network widget configuration #[network] -#[interface_filter] +#[network.interface_filter] #is_list_ignored = true #list = ["virbr0.*"] #regex = true diff --git a/src/constants.rs b/src/constants.rs index 75358234d..d8d9a3ad2 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -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 @@ -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 @@ -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 diff --git a/tests/valid_configs/filtering.toml b/tests/valid_configs/filtering.toml index 52e84b863..5d7416ad9 100644 --- a/tests/valid_configs/filtering.toml +++ b/tests/valid_configs/filtering.toml @@ -1,12 +1,12 @@ [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 @@ -14,7 +14,7 @@ case_sensitive = false whole_word = false [temperature] -[sensor_filter] +[temperature.sensor_filter] is_list_ignored = true list = ["cpu", "wifi"] regex = false @@ -22,7 +22,7 @@ case_sensitive = false whole_word = false [network] -[interface_filter] +[network.interface_filter] is_list_ignored = true list = ["virbr0.*"] regex = true