From c34412d9e3725bed48af925646110f2ca34b1bd4 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Fri, 21 Feb 2025 21:55:17 +0100 Subject: implement working config file construct, error handling should be improved --- src/main.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 8ec3b77..3325f80 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,12 +45,13 @@ async fn main() -> Result<()> { std::process::exit(0); } - // let mut cfg = if parsed_args.cfg_path.is_file() { - // BibiConfig::new(&parsed_args)? - // } else { - // BibiConfig::default() - // }; + // Build default config let mut cfg = BibiConfig::default(); + + if parsed_args.light_theme { + cfg.light_colors(); + } + // Merge values from config file if present cfg.parse_config(&parsed_args)?; init_error_hooks()?; @@ -58,6 +59,6 @@ async fn main() -> Result<()> { // Create an application. let mut app = App::new(&mut parsed_args, &mut cfg)?; - app.run(&mut parsed_args, &cfg).await?; + app.run(&cfg).await?; Ok(()) } -- cgit v1.2.3