1
0
Fork 0
forked from wry/wry

config: add urgency window criteria

This commit is contained in:
Julian Orth 2025-05-01 18:38:57 +02:00
parent dcf57db3df
commit eb172e9d8c
15 changed files with 56 additions and 5 deletions

View file

@ -261,6 +261,7 @@ pub struct WindowMatch {
pub app_id_regex: Option<String>,
pub floating: Option<bool>,
pub visible: Option<bool>,
pub urgent: Option<bool>,
}
#[derive(Debug, Clone)]

View file

@ -56,7 +56,7 @@ impl Parser for WindowMatchParser<'_> {
title,
title_regex,
),
(app_id, app_id_regex, floating, visible),
(app_id, app_id_regex, floating, visible, urgent),
) = ext.extract((
(
opt(str("name")),
@ -74,6 +74,7 @@ impl Parser for WindowMatchParser<'_> {
opt(str("app-id-regex")),
opt(bol("floating")),
opt(bol("visible")),
opt(bol("urgent")),
),
))?;
let mut not = None;
@ -121,6 +122,7 @@ impl Parser for WindowMatchParser<'_> {
app_id_regex: app_id_regex.despan_into(),
floating: floating.despan(),
visible: visible.despan(),
urgent: urgent.despan(),
types,
client,
})

View file

@ -260,6 +260,7 @@ impl Rule for WindowRule {
value!(AppIdRegex, app_id_regex);
bool!(Floating, floating);
bool!(Visible, visible);
bool!(Urgent, urgent);
Some(())
}