diff options
| author | lukeflo | 2025-02-21 21:55:17 +0100 |
|---|---|---|
| committer | lukeflo | 2025-02-21 21:55:17 +0100 |
| commit | c34412d9e3725bed48af925646110f2ca34b1bd4 (patch) | |
| tree | e7f48bb25a605aeccf0c31ed310f1c7a1ae9e067 /src/main.rs | |
| parent | ddb6326c1896b82b759d930fb08ea46a820e275a (diff) | |
| download | bibiman-c34412d9e3725bed48af925646110f2ca34b1bd4.tar.gz bibiman-c34412d9e3725bed48af925646110f2ca34b1bd4.zip | |
implement working config file construct, error handling should be improved
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 13 |
1 files changed, 7 insertions, 6 deletions
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(()) } |
