feat: add a toolkit crate for both client and pop-launcher-bin
This commit is contained in:
parent
a5c2569654
commit
47852e53cb
12 changed files with 56 additions and 24 deletions
|
|
@ -5,6 +5,8 @@ mod client;
|
|||
mod plugins;
|
||||
|
||||
pub use client::*;
|
||||
pub use plugins::config;
|
||||
pub use plugins::external::load;
|
||||
|
||||
use crate::plugins::*;
|
||||
use flume::{Receiver, Sender};
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use std::{
|
|||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
#[derive(Debug, Default, Deserialize)]
|
||||
#[derive(Debug, Default, Deserialize, Clone)]
|
||||
pub struct PluginConfig {
|
||||
pub name: Cow<'static, str>,
|
||||
pub description: Cow<'static, str>,
|
||||
|
|
@ -32,7 +32,7 @@ pub struct PluginConfig {
|
|||
pub history: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Deserialize)]
|
||||
#[derive(Debug, Default, Deserialize, Clone)]
|
||||
pub struct PluginBinary {
|
||||
path: Cow<'static, str>,
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ pub struct PluginBinary {
|
|||
args: Vec<Cow<'static, str>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Deserialize)]
|
||||
#[derive(Debug, Default, Deserialize, Clone)]
|
||||
pub struct PluginQuery {
|
||||
#[serde(
|
||||
default,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
// Copyright 2021 System76 <info@system76.com>
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
mod config;
|
||||
pub(crate) mod external;
|
||||
pub mod config;
|
||||
pub mod help;
|
||||
|
||||
pub use external::load;
|
||||
|
||||
pub use self::config::{PluginBinary, PluginConfig, PluginPriority, PluginQuery};
|
||||
pub use self::external::ExternalPlugin;
|
||||
pub use self::help::HelpPlugin;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue