65 lines
1.9 KiB
Rust
65 lines
1.9 KiB
Rust
use jay_config::window::{ContentType, WindowType};
|
|
|
|
#[derive(Default, Debug, Clone)]
|
|
pub struct GenericMatch<Match> {
|
|
pub name: Option<String>,
|
|
pub not: Option<Box<Match>>,
|
|
pub all: Option<Vec<Match>>,
|
|
pub any: Option<Vec<Match>>,
|
|
pub exactly: Option<MatchExactly<Match>>,
|
|
}
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct MatchExactly<Match> {
|
|
pub num: usize,
|
|
pub list: Vec<Match>,
|
|
}
|
|
|
|
#[derive(Default, Debug, Clone)]
|
|
pub struct ClientMatch {
|
|
pub generic: GenericMatch<Self>,
|
|
pub sandbox_engine: Option<String>,
|
|
pub sandbox_engine_regex: Option<String>,
|
|
pub sandbox_app_id: Option<String>,
|
|
pub sandbox_app_id_regex: Option<String>,
|
|
pub sandbox_instance_id: Option<String>,
|
|
pub sandbox_instance_id_regex: Option<String>,
|
|
pub sandboxed: Option<bool>,
|
|
pub uid: Option<i32>,
|
|
pub pid: Option<i32>,
|
|
pub is_xwayland: Option<bool>,
|
|
pub comm: Option<String>,
|
|
pub comm_regex: Option<String>,
|
|
pub exe: Option<String>,
|
|
pub exe_regex: Option<String>,
|
|
pub tag: Option<String>,
|
|
pub tag_regex: Option<String>,
|
|
}
|
|
|
|
#[derive(Default, Debug, Clone)]
|
|
pub struct WindowMatch {
|
|
pub generic: GenericMatch<Self>,
|
|
pub types: Option<WindowType>,
|
|
pub client: Option<ClientMatch>,
|
|
pub title: Option<String>,
|
|
pub title_regex: Option<String>,
|
|
pub app_id: Option<String>,
|
|
pub app_id_regex: Option<String>,
|
|
pub floating: Option<bool>,
|
|
pub visible: Option<bool>,
|
|
pub urgent: Option<bool>,
|
|
pub focused: Option<bool>,
|
|
pub fullscreen: Option<bool>,
|
|
pub just_mapped: Option<bool>,
|
|
pub tag: Option<String>,
|
|
pub tag_regex: Option<String>,
|
|
pub x_class: Option<String>,
|
|
pub x_class_regex: Option<String>,
|
|
pub x_instance: Option<String>,
|
|
pub x_instance_regex: Option<String>,
|
|
pub x_role: Option<String>,
|
|
pub x_role_regex: Option<String>,
|
|
pub workspace: Option<String>,
|
|
pub workspace_regex: Option<String>,
|
|
pub content_types: Option<ContentType>,
|
|
}
|