improv(plugins): Convert web plugin to Rust plugin, with config support
This commit is contained in:
parent
251dcd5b2c
commit
48f09be4c9
15 changed files with 324 additions and 164 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use pop_launcher_plugins as plugins;
|
||||
use pop_launcher_service::Service;
|
||||
use pop_launcher_service as service;
|
||||
use smol::block_on;
|
||||
use std::io;
|
||||
|
||||
|
|
@ -15,14 +15,12 @@ fn main() {
|
|||
let start = plugin.rfind('/').map(|v| v + 1).unwrap_or(0);
|
||||
let cmd = &plugin.as_str()[start..];
|
||||
match cmd {
|
||||
"pop-launcher" => {
|
||||
let stdout = io::stdout();
|
||||
block_on(Service::new(stdout.lock()).exec())
|
||||
},
|
||||
"desktop-entries" => block_on(plugins::desktop_entries::main()),
|
||||
"pop-shell" => block_on(plugins::pop_shell::main()),
|
||||
"find" => block_on(plugins::find::main()),
|
||||
"pop-launcher" => block_on(service::main()),
|
||||
"pop-shell" => block_on(plugins::pop_shell::main()),
|
||||
"scripts" => block_on(plugins::scripts::main()),
|
||||
"web" => block_on(plugins::web::main()),
|
||||
unknown => {
|
||||
eprintln!("unknown cmd: {}", unknown);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue