From 9cad3bb4ec87f1ec99245427cb4445324c25e364 Mon Sep 17 00:00:00 2001 From: ClementTsang Date: Tue, 3 Mar 2020 00:08:09 -0500 Subject: [PATCH] Add basic flag to sample config, also fixed incorrect flag name for configs. --- sample_configs/bottom.toml | 3 +++ src/options.rs | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sample_configs/bottom.toml b/sample_configs/bottom.toml index a6b47855..1dd183af 100644 --- a/sample_configs/bottom.toml +++ b/sample_configs/bottom.toml @@ -34,6 +34,9 @@ #default_widget = "network_default" #default_widget = "process_default" +# Basic mode +#basic = true + # These are all the components that support custom theming. Currently, it only # supports taking in a string representing a hex colour. Note that colour support diff --git a/src/options.rs b/src/options.rs index d67e5ce7..fc92a915 100644 --- a/src/options.rs +++ b/src/options.rs @@ -26,7 +26,7 @@ pub struct ConfigFlags { pub regex: Option, pub default_widget: Option, pub show_disabled_data: Option, - pub basic_mode: Option, + pub basic: Option, //disabled_cpu_cores: Option>, // TODO: [FEATURE] Enable disabling cores in config/flags } @@ -176,8 +176,8 @@ pub fn get_use_basic_mode_option(matches: &clap::ArgMatches<'static>, config: &C if matches.is_present("BASIC_MODE") { return true; } else if let Some(flags) = &config.flags { - if let Some(basic_mode) = flags.basic_mode { - return basic_mode; + if let Some(basic) = flags.basic { + return basic; } }