rmenu/rmenu-plugin/src/lib.rs

34 lines
717 B
Rust
Raw Normal View History

2023-07-18 07:49:07 +02:00
use serde::{Deserialize, Serialize};
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Method {
Terminal,
Desktop,
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct Action {
2023-07-19 00:55:35 +02:00
pub name: String,
2023-07-18 07:49:07 +02:00
pub exec: String,
pub comment: Option<String>,
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct Entry {
pub name: String,
2023-07-19 00:55:35 +02:00
pub actions: Vec<Action>,
2023-07-18 07:49:07 +02:00
pub comment: Option<String>,
pub icon: Option<String>,
}
impl Entry {
pub fn new(name: &str) -> Self {
Self {
name: name.to_owned(),
actions: Default::default(),
comment: Default::default(),
icon: Default::default(),
}
}
}