pub struct Manifest {
pub name: String,
pub description: String,
pub keyword: Option<String>,
pub query: String,
pub activate: Option<String>,
pub icon: Option<String>,
pub timeout_ms: Option<u64>,
}Expand description
Parsed manifest.toml.
Fields§
§name: StringHuman-readable name, shown as the result category.
description: StringOne-line explanation, shown as the result subtitle.
keyword: Option<String>When set, the plugin only runs for queries starting with this word. When absent the plugin runs on every query and must be fast.
query: StringExecutable invoked with the query text as a single argument.
activate: Option<String>Executable invoked with the selected item’s arg on activation.
Without it, activation falls back to the query program with
--activate.
icon: Option<String>Icon-theme name or path used for items that do not specify their own.
timeout_ms: Option<u64>Query deadline override in milliseconds, clamped to a hard ceiling. Only a keyworded plugin may raise it past the interactive default.
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn timeout(&self, keyword: Option<&str>) -> Duration
pub fn timeout(&self, keyword: Option<&str>) -> Duration
The deadline this plugin’s query command runs under while it answers
to keyword — the effective one, which a user override may have
added or removed.
timeout_ms is clamped to 50 ms–3 s, and without a keyword it can
only lower the interactive default: an always-on plugin runs on every
keystroke, and letting it hold a process for seconds each time is
exactly what the default exists to prevent.