1
0
Fork 0
forked from wry/wry

config: add WM_CLASS window criteria

This commit is contained in:
Julian Orth 2025-05-03 13:37:23 +02:00
parent 6d3d4dcabb
commit faa0b27ef8
15 changed files with 159 additions and 10 deletions

View file

@ -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,
})