Expose the worker's expansion-enabled state in a queryable form
espanso currently offers no way for an external tool to learn whether text expansion is enabled — only whether the daemon is alive:
espanso statusprintsespanso is runningregardless of the enabled state, and there is no flag to change what it reports.espanso cmd(enable/disable/toggle/search) only sends commands.- The IPC protocol (
espanso/src/ipc.rs,IPCEvent) has onlyEnableRequest/DisableRequest/ToggleRequest— no query event.
Meanwhile the information already exists in the worker: DisableMiddleware (espanso-engine/src/process/middleware/disable.rs) keeps an in-memory enabled flag and dispatches EventType::Enabled/EventType::Disabled on every change (which is what drives the tray icon), and logs each transition:
toggled enabled state, is_enabled = falseThis matters for third-party UIs such as macspanso (a macOS menu-bar GUI for espanso's config files): we offer enable/disable/snooze commands next to a status header, and we can display daemon liveness but not the paused state — the most likely reason a user's snippets "stopped working".
Suggestion: expose the state in a queryable form, e.g.
espanso statusalso reporting the paused state (e.g.expansions are disabled);- a query subcommand (
espanso cmd status); or - a queryable
IPCEventanswered with the worker's current state.
Interim workaround we ship: parsing the log line above and reconstructing the state (last toggle after the newest worker's first reading configs from: banner; the engine resets to enabled on worker start). Fragile by nature — log formats are not contracts — which is why a supported query would be welcome.
Verified against espanso 2.4.1 (macOS).
Source: espanso/espanso