diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-28 15:44:31 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-28 15:44:31 +0300 |
| commit | ebd800755832784e1e48e250bf1db11a8b286209 (patch) | |
| tree | c15022e702ae242b744d182a3c94e71007f275a9 /src/main.rs | |
| parent | 7380e0ed16470c570984485930048a80034ba381 (diff) | |
add config diagnostics and split configuration docs
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 93d79b2e..4f1d9cfe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -192,7 +192,19 @@ fn main() -> io::Result<()> { original_hook(info); })); - let config = config::Config::load(); + let loaded_config = config::Config::load(); + let config = &loaded_config.config; + let config_diagnostic = if loaded_config.diagnostics.is_empty() { + None + } else if loaded_config.diagnostics.len() == 1 { + Some(loaded_config.diagnostics[0].clone()) + } else { + Some(format!( + "{} (and {} more)", + loaded_config.diagnostics[0], + loaded_config.diagnostics.len() - 1 + )) + }; info!("herdr starting, pid={}", std::process::id()); // Background auto-update (non-blocking, best-effort) @@ -222,7 +234,7 @@ fn main() -> io::Result<()> { std::io::stdout().flush()?; } - let mut app = app::App::new(&config, no_session); + let mut app = app::App::new(config, no_session, config_diagnostic); let result = app.run(&mut terminal).await; // Reset modifyOtherKeys if we enabled it |
