feat: Switch from smol runtime to tokio
This commit is contained in:
parent
4153f9f060
commit
dbfb3921ae
23 changed files with 242 additions and 235 deletions
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
use pop_launcher_plugins as plugins;
|
||||
use pop_launcher_service as service;
|
||||
use smol::block_on;
|
||||
use std::io;
|
||||
|
||||
fn main() {
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn main() {
|
||||
tracing_subscriber::fmt()
|
||||
.with_writer(io::stderr)
|
||||
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
|
||||
|
|
@ -16,17 +16,17 @@ fn main() {
|
|||
let start = plugin.rfind('/').map(|v| v + 1).unwrap_or(0);
|
||||
let cmd = &plugin.as_str()[start..];
|
||||
match cmd {
|
||||
"calc" => block_on(plugins::calc::main()),
|
||||
"desktop-entries" => block_on(plugins::desktop_entries::main()),
|
||||
"find" => block_on(plugins::find::main()),
|
||||
"files" => block_on(plugins::files::main()),
|
||||
"pop-launcher" => block_on(service::main()),
|
||||
"pop-shell" => block_on(plugins::pop_shell::main()),
|
||||
"pulse" => block_on(plugins::pulse::main()),
|
||||
"recent" => block_on(plugins::recent::main()),
|
||||
"scripts" => block_on(plugins::scripts::main()),
|
||||
"terminal" => block_on(plugins::terminal::main()),
|
||||
"web" => block_on(plugins::web::main()),
|
||||
"calc" => plugins::calc::main().await,
|
||||
"desktop-entries" => plugins::desktop_entries::main().await,
|
||||
"find" => plugins::find::main().await,
|
||||
"files" => plugins::files::main().await,
|
||||
"pop-launcher" => service::main().await,
|
||||
"pop-shell" => plugins::pop_shell::main().await,
|
||||
"pulse" => plugins::pulse::main().await,
|
||||
"recent" => plugins::recent::main().await,
|
||||
"scripts" => plugins::scripts::main().await,
|
||||
"terminal" => plugins::terminal::main().await,
|
||||
"web" => plugins::web::main().await,
|
||||
unknown => {
|
||||
eprintln!("unknown cmd: {}", unknown);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue