diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 6bcaa111..e3c54541 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,6 +18,7 @@ const NESTED_HERDR_MESSAGES: [&str; 6] = [ "recursion detected. base case not found. aborting.", ]; +mod api; mod app; mod config; mod detect; @@ -223,6 +224,9 @@ fn main() -> io::Result<()> { init_logging(); + let (api_tx, api_rx) = std::sync::mpsc::channel(); + let _api_server = api::start_server(api_tx)?; + let no_session = std::env::args().any(|a| a == "--no-session"); let in_tmux = std::env::var("TMUX").is_ok(); @@ -284,7 +288,7 @@ fn main() -> io::Result<()> { std::io::stdout().flush()?; } - let mut app = app::App::new(config, no_session, config_diagnostic); + let mut app = app::App::new(config, no_session, config_diagnostic, api_rx); let result = app.run(&mut terminal).await; // Reset modifyOtherKeys if we enabled it |
