config: add WM_CLASS window criteria
This commit is contained in:
parent
6d3d4dcabb
commit
faa0b27ef8
15 changed files with 159 additions and 10 deletions
|
|
@ -267,6 +267,10 @@ pub struct WindowMatch {
|
|||
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>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ impl Parser for WindowMatchParser<'_> {
|
|||
tag,
|
||||
tag_regex,
|
||||
),
|
||||
(x_class, x_class_regex, x_instance, x_instance_regex),
|
||||
) = ext.extract((
|
||||
(
|
||||
opt(str("name")),
|
||||
|
|
@ -92,6 +93,12 @@ impl Parser for WindowMatchParser<'_> {
|
|||
opt(str("tag")),
|
||||
opt(str("tag-regex")),
|
||||
),
|
||||
(
|
||||
opt(str("x-class")),
|
||||
opt(str("x-class-regex")),
|
||||
opt(str("x-instance")),
|
||||
opt(str("x-instance-regex")),
|
||||
),
|
||||
))?;
|
||||
let mut not = None;
|
||||
if let Some(value) = not_val {
|
||||
|
|
@ -144,6 +151,10 @@ impl Parser for WindowMatchParser<'_> {
|
|||
just_mapped: just_mapped.despan(),
|
||||
tag: tag.despan_into(),
|
||||
tag_regex: tag_regex.despan_into(),
|
||||
x_class: x_class.despan_into(),
|
||||
x_class_regex: x_class_regex.despan_into(),
|
||||
x_instance: x_instance.despan_into(),
|
||||
x_instance_regex: x_instance_regex.despan_into(),
|
||||
types,
|
||||
client,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -260,6 +260,10 @@ impl Rule for WindowRule {
|
|||
value!(AppIdRegex, app_id_regex);
|
||||
value!(Tag, tag);
|
||||
value!(TagRegex, tag_regex);
|
||||
value!(XClass, x_class);
|
||||
value!(XClassRegex, x_class_regex);
|
||||
value!(XInstance, x_instance);
|
||||
value!(XInstanceRegex, x_instance_regex);
|
||||
bool!(Floating, floating);
|
||||
bool!(Visible, visible);
|
||||
bool!(Urgent, urgent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue