Skip to content

Commit a5c2569

Browse files
oknozorjacobgkau
andauthored
feat: add a history attribute to plugin config as described in #110 (#112)
* 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 <[email protected]>
1 parent 1552b58 commit a5c2569

File tree

9 files changed

+15
-5
lines changed

9 files changed

+15
-5
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ A plugin's metadata is defined `pop-launcher/plugins/{plugin}/plugin.ron`.
5454
description: "Plugin Description: Example",
5555
bin: (
5656
path: "name-of-executable-in-plugin-folder",
57-
)
57+
),
5858
icon: Name("icon-name-or-path"),
5959
// Optional
6060
query: (
@@ -65,7 +65,9 @@ A plugin's metadata is defined `pop-launcher/plugins/{plugin}/plugin.ron`.
6565
// Optional -- avoid sorting results from this plugin
6666
no_sort: true,
6767
// Optional -- pattern that a query must have to be sent to plugin
68-
regex: "pattern"
68+
regex: "pattern",
69+
// Optional -- the launcher should keep a history for this plugin
70+
history: true,
6971
)
7072
)
7173
```

plugins/src/calc/plugin.ron

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
isolate_with: "^(=).*",
99
),
1010
bin: (path: "calc"),
11-
icon: Name("x-office-spreadsheet")
11+
icon: Name("x-office-spreadsheet"),
12+
history: false,
1213
)

plugins/src/desktop_entries/plugin.ron

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
description: "Query applications by their .desktop entries",
44
bin: (path: "desktop-entries"),
55
icon: Name("new-window-symbolic"),
6+
history: true,
67
)

plugins/src/files/plugin.ron

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
no_sort: true,
99
),
1010
bin: (path: "files"),
11-
icon: Name("system-file-manager")
11+
icon: Name("system-file-manager"),
1212
)

plugins/src/find/plugin.ron

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
isolate: true,
88
),
99
bin: (path: "find"),
10-
icon: Name("system-file-manager")
10+
icon: Name("system-file-manager"),
1111
)

plugins/src/terminal/plugin.ron

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
),
99
bin: (path: "terminal"),
1010
icon: Name("utilities-terminal"),
11+
history: true,
1112
)

plugins/src/web/plugin.ron

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
query: (help: "ddg ", priority: High),
55
bin: (path: "web"),
66
icon: Name("system-search"),
7+
history: true,
78
)

service/src/plugins/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ pub struct PluginConfig {
2727

2828
#[serde(default)]
2929
pub query: PluginQuery,
30+
31+
#[serde(default)]
32+
pub history: bool,
3033
}
3134

3235
#[derive(Debug, Default, Deserialize)]

service/src/plugins/help.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub const CONFIG: PluginConfig = PluginConfig {
2323
regex: None,
2424
},
2525
icon: Some(IconSource::Name(Cow::Borrowed("system-help-symbolic"))),
26+
history: false
2627
};
2728
pub struct HelpPlugin {
2829
pub id: usize,

0 commit comments

Comments
 (0)