diff --git a/espanso-engine/src/process/middleware/context_menu.rs b/espanso-engine/src/process/middleware/context_menu.rs index 79de2e3..9ee53fd 100644 --- a/espanso-engine/src/process/middleware/context_menu.rs +++ b/espanso-engine/src/process/middleware/context_menu.rs @@ -32,6 +32,7 @@ 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; +const CONTEXT_ITEM_SHOW_LOGS: u32 = 7; pub struct ContextMenuMiddleware { is_enabled: RefCell, @@ -82,6 +83,10 @@ impl Middleware for ContextMenuMiddleware { id: CONTEXT_ITEM_RELOAD, label: "Reload config".to_string(), }), + MenuItem::Simple(SimpleMenuItem { + id: CONTEXT_ITEM_SHOW_LOGS, + label: "Show logs".to_string(), + }), MenuItem::Separator, MenuItem::Simple(SimpleMenuItem { id: CONTEXT_ITEM_EXIT, @@ -155,6 +160,10 @@ impl Middleware for ContextMenuMiddleware { dispatch(Event::caused_by(event.source_id, EventType::ShowSearchBar)); Event::caused_by(event.source_id, EventType::NOOP) } + CONTEXT_ITEM_SHOW_LOGS => { + dispatch(Event::caused_by(event.source_id, EventType::ShowLogs)); + Event::caused_by(event.source_id, EventType::NOOP) + } _ => { // TODO: handle dynamic items todo!()