use std::sync::mpsc; use crate::keyboard::KeyboardInterceptor; use crate::matcher::Matcher; use crate::matcher::Match; use crate::matcher::scrolling::ScrollingMatcher; use crate::engine::Engine; mod keyboard; mod matcher; mod engine; fn main() { println!("espanso is running!"); let (txc, rxc) = mpsc::channel(); let interceptor = keyboard::get_interceptor(txc); interceptor.initialize(); interceptor.start(); let sender = keyboard::get_sender(); let engine = Engine::new(&sender); let matches = vec![Match{trigger:"e'".to_owned(), result: "รจ".to_owned()}, Match{trigger:":lol".to_owned(), result: "๐Ÿ˜‚".to_owned()}]; let mut matcher = ScrollingMatcher::new(&matches, &engine); matcher.watch(&rxc); }