From b89daf4fda0a019f764e46d194e3b178f7a9d699 Mon Sep 17 00:00:00 2001 From: Jess Date: Fri, 13 Dec 2024 21:43:52 +1300 Subject: [PATCH] network: update default template --- README.md | 2 +- examples/default-settings/defaults.hjson | 2 +- examples/default-settings/defaults.json | 2 +- examples/default-settings/defaults.toml | 2 +- examples/default-settings/defaults.yml | 2 +- src/features/network/config.rs | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 20ece05..7ac9fe1 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ Shows connected ESSID as well as both public and private IPv4 and IPv6 addresses | name | default | description | | ---------- | ----------------------------- | ------------------------------- | | `no_value` | `"NA"` | Value for not defined elements. | -| `template` | `"{IPv4} · {IPv6} · {ESSID}"` | Text representation. Placeholders surrounded by curly braces are `{IPv4}`, `{IPv6}`, `{LocalIPv4}`, `{LocalIPv6}` and `{ESSID}`. | +| `template` | `"{LocalIPv4} · {ESSID}"` | Text representation. Placeholders surrounded by curly braces are `{IPv4}`, `{IPv6}`, `{LocalIPv4}`, `{LocalIPv6}` and `{ESSID}`. | ### Feature: Time diff --git a/examples/default-settings/defaults.hjson b/examples/default-settings/defaults.hjson index 4675848..3ab71ad 100644 --- a/examples/default-settings/defaults.hjson +++ b/examples/default-settings/defaults.hjson @@ -35,7 +35,7 @@ } network: { no_value: NA - template: "{IPv4} · {IPv6} · {ESSID}" + template: "{LocalIPv4} · {ESSID}" } time: { format: %Y-%m-%d %H:%M diff --git a/examples/default-settings/defaults.json b/examples/default-settings/defaults.json index c2e148c..e544401 100644 --- a/examples/default-settings/defaults.json +++ b/examples/default-settings/defaults.json @@ -35,7 +35,7 @@ }, "network": { "no_value": "NA", - "template": "{IPv4} · {IPv6} · {ESSID}" + "template": "{LocalIPv4} · {ESSID}" }, "time": { "format": "%Y-%m-%d %H:%M", diff --git a/examples/default-settings/defaults.toml b/examples/default-settings/defaults.toml index 8bc6874..eea7a9c 100644 --- a/examples/default-settings/defaults.toml +++ b/examples/default-settings/defaults.toml @@ -29,7 +29,7 @@ update_interval = 20 [network] no_value = "NA" -template = "{IPv4} · {IPv6} · {ESSID}" +template = "{LocalIPv4} · {ESSID}" [time] format = "%Y-%m-%d %H:%M" diff --git a/examples/default-settings/defaults.yml b/examples/default-settings/defaults.yml index 2624c00..16804f7 100644 --- a/examples/default-settings/defaults.yml +++ b/examples/default-settings/defaults.yml @@ -29,7 +29,7 @@ cpu_load: network: no_value: NA - template: "{IPv4} · {IPv6} · {ESSID}" + template: "{LocalIPv4} · {ESSID}" time: format: "%Y-%m-%d %H:%M" diff --git a/src/features/network/config.rs b/src/features/network/config.rs index ea8db5a..b91fa5d 100644 --- a/src/features/network/config.rs +++ b/src/features/network/config.rs @@ -42,7 +42,7 @@ impl ConfigType for ConfigEntry { FEATURE_NAME, map!( "no_value" => "NA", - "template" => "{IPv4} · {IPv6} · {ESSID}", + "template" => "{LocalIPv4} · {ESSID}", ), ) } @@ -103,7 +103,7 @@ mod tests { fn default_map() -> HashMap { let mut map = HashMap::new(); map.insert("no_value".to_owned(), "NA".into()); - map.insert("template".to_owned(), "{IPv4} · {IPv6} · {ESSID}".into()); + map.insert("template".to_owned(), "{LocalIPv4} · {ESSID}".into()); map }