settings.toml
in the following format:
toml
PLUGIN = { path = "PLUGIN PATH", prefix = "OPTIONAL USER DEFINED PREFIX", config = {} }
Only Rust based plugins are supported.
cdylib
libraryfindex-plugin
and abi_stable
as dependencysrc/lib.rs
```rust
use findexplugin::{defineplugin, FResult};
use abistable::stdtypes::{RHashMap, ROption, RStr, RString, RVec};fn init(_: &RHashMap
fn handle_query(query: RStr) -> RVec
RVec::from(vec![FResult {
cmd: RString::from(format!("xdg-open {query}")),
name: RString::from(format!("Open {query}")),
desc: ROption::RNone,
score: isize::MAX,
icon: RString::from("browser"),
}])
}
defineplugin!("url!", init, handlequery);
``
*This is the code of
urlopen` plugin*
- Edit this to create your plugin.
- After writing code, follow user guide to test your plugin
The first argument to define_plugin! macro is the prefix used to call the plugin's query handler. The user can overwrite this.