diff options
author | ClementTsang <cjhtsang@uwaterloo.ca> | 2020-04-18 19:50:31 -0400 |
---|---|---|
committer | ClementTsang <cjhtsang@uwaterloo.ca> | 2020-04-18 19:53:11 -0400 |
commit | 72482989952cbb782f91e5c19f85eda56c4afb20 (patch) | |
tree | 6051ee741ddd413582569426ce96a15f783aec1f /src/options.rs | |
parent | 92315ea1d7471a0172c3de5434a32657f45d5b7b (diff) |
Update highlight to light blue; new network legend
Diffstat (limited to 'src/options.rs')
-rw-r--r-- | src/options.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/options.rs b/src/options.rs index 987d6f0e..86110a49 100644 --- a/src/options.rs +++ b/src/options.rs @@ -40,6 +40,7 @@ pub struct ConfigFlags { pub hide_time: Option<bool>, pub default_widget_type: Option<String>, pub default_widget_count: Option<u64>, + pub use_old_network_legend: Option<bool>, //disabled_cpu_cores: Option<Vec<u64>>, // TODO: [FEATURE] Enable disabling cores in config/flags } @@ -216,6 +217,7 @@ pub fn build_app( time_interval: get_time_interval(matches, config)?, hide_time: get_hide_time(matches, config), autohide_time, + use_old_network_legend: get_use_old_network_legend(matches, config), }; let used_widgets = UsedWidgets { @@ -603,3 +605,16 @@ fn get_default_widget_and_count( Ok((None, 1)) } } + +pub fn get_use_old_network_legend(matches: &clap::ArgMatches<'static>, config: &Config) -> bool { + if matches.is_present("USE_OLD_NETWORK_LEGEND") { + return true; + } else if let Some(flags) = &config.flags { + if let Some(use_old_network_legend) = flags.use_old_network_legend { + if use_old_network_legend { + return true; + } + } + } + false +} |