diff --git a/espanso/src/engine/process/middleware/context_menu.rs b/espanso/src/engine/process/middleware/context_menu.rs index 654b4e3..f4109ce 100644 --- a/espanso/src/engine/process/middleware/context_menu.rs +++ b/espanso/src/engine/process/middleware/context_menu.rs @@ -31,6 +31,7 @@ const CONTEXT_ITEM_ENABLE: u32 = 2; const CONTEXT_ITEM_DISABLE: u32 = 3; const CONTEXT_ITEM_SECURE_INPUT_EXPLAIN: u32 = 4; const CONTEXT_ITEM_SECURE_INPUT_TRIGGER_WORKAROUND: u32 = 5; +const CONTEXT_ITEM_OPEN_SEARCH: u32 = 6; pub struct ContextMenuMiddleware { is_enabled: RefCell, @@ -71,6 +72,10 @@ impl Middleware for ContextMenuMiddleware { label: "Enable".to_string(), } }), + MenuItem::Simple(SimpleMenuItem { + id: CONTEXT_ITEM_OPEN_SEARCH, + label: "Open search bar".to_string(), + }), MenuItem::Separator, MenuItem::Simple(SimpleMenuItem { id: CONTEXT_ITEM_RELOAD, @@ -133,6 +138,10 @@ impl Middleware for ContextMenuMiddleware { dispatch(Event::caused_by(event.source_id, EventType::LaunchSecureInputAutoFix)); Event::caused_by(event.source_id, EventType::NOOP) } + CONTEXT_ITEM_OPEN_SEARCH => { + dispatch(Event::caused_by(event.source_id, EventType::ShowSearchBar)); + Event::caused_by(event.source_id, EventType::NOOP) + } custom => { // TODO: handle dynamic items todo!()