* feat: add a history attribute to plugin config as described in #110 closes #110 * fix: Correct grammar mistake in comment Co-authored-by: Jacob Kauffmann <jacobgkau@users.noreply.github.com>
This commit is contained in:
parent
1552b585d6
commit
a5c2569654
9 changed files with 15 additions and 5 deletions
|
|
@ -54,7 +54,7 @@ A plugin's metadata is defined `pop-launcher/plugins/{plugin}/plugin.ron`.
|
||||||
description: "Plugin Description: Example",
|
description: "Plugin Description: Example",
|
||||||
bin: (
|
bin: (
|
||||||
path: "name-of-executable-in-plugin-folder",
|
path: "name-of-executable-in-plugin-folder",
|
||||||
)
|
),
|
||||||
icon: Name("icon-name-or-path"),
|
icon: Name("icon-name-or-path"),
|
||||||
// Optional
|
// Optional
|
||||||
query: (
|
query: (
|
||||||
|
|
@ -65,7 +65,9 @@ A plugin's metadata is defined `pop-launcher/plugins/{plugin}/plugin.ron`.
|
||||||
// Optional -- avoid sorting results from this plugin
|
// Optional -- avoid sorting results from this plugin
|
||||||
no_sort: true,
|
no_sort: true,
|
||||||
// Optional -- pattern that a query must have to be sent to plugin
|
// Optional -- pattern that a query must have to be sent to plugin
|
||||||
regex: "pattern"
|
regex: "pattern",
|
||||||
|
// Optional -- the launcher should keep a history for this plugin
|
||||||
|
history: true,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,6 @@
|
||||||
isolate_with: "^(=).*",
|
isolate_with: "^(=).*",
|
||||||
),
|
),
|
||||||
bin: (path: "calc"),
|
bin: (path: "calc"),
|
||||||
icon: Name("x-office-spreadsheet")
|
icon: Name("x-office-spreadsheet"),
|
||||||
|
history: false,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,5 @@
|
||||||
description: "Query applications by their .desktop entries",
|
description: "Query applications by their .desktop entries",
|
||||||
bin: (path: "desktop-entries"),
|
bin: (path: "desktop-entries"),
|
||||||
icon: Name("new-window-symbolic"),
|
icon: Name("new-window-symbolic"),
|
||||||
|
history: true,
|
||||||
)
|
)
|
||||||
|
|
@ -8,5 +8,5 @@
|
||||||
no_sort: true,
|
no_sort: true,
|
||||||
),
|
),
|
||||||
bin: (path: "files"),
|
bin: (path: "files"),
|
||||||
icon: Name("system-file-manager")
|
icon: Name("system-file-manager"),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,5 @@
|
||||||
isolate: true,
|
isolate: true,
|
||||||
),
|
),
|
||||||
bin: (path: "find"),
|
bin: (path: "find"),
|
||||||
icon: Name("system-file-manager")
|
icon: Name("system-file-manager"),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,5 @@
|
||||||
),
|
),
|
||||||
bin: (path: "terminal"),
|
bin: (path: "terminal"),
|
||||||
icon: Name("utilities-terminal"),
|
icon: Name("utilities-terminal"),
|
||||||
|
history: true,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,5 @@
|
||||||
query: (help: "ddg ", priority: High),
|
query: (help: "ddg ", priority: High),
|
||||||
bin: (path: "web"),
|
bin: (path: "web"),
|
||||||
icon: Name("system-search"),
|
icon: Name("system-search"),
|
||||||
|
history: true,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@ pub struct PluginConfig {
|
||||||
|
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub query: PluginQuery,
|
pub query: PluginQuery,
|
||||||
|
|
||||||
|
#[serde(default)]
|
||||||
|
pub history: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Default, Deserialize)]
|
#[derive(Debug, Default, Deserialize)]
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ pub const CONFIG: PluginConfig = PluginConfig {
|
||||||
regex: None,
|
regex: None,
|
||||||
},
|
},
|
||||||
icon: Some(IconSource::Name(Cow::Borrowed("system-help-symbolic"))),
|
icon: Some(IconSource::Name(Cow::Borrowed("system-help-symbolic"))),
|
||||||
|
history: false
|
||||||
};
|
};
|
||||||
pub struct HelpPlugin {
|
pub struct HelpPlugin {
|
||||||
pub id: usize,
|
pub id: usize,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue