1
0
Fork 0
forked from wry/wry

config: add visibility window criteria

This commit is contained in:
Julian Orth 2025-05-01 18:35:29 +02:00
parent 8bb8b2a649
commit dcf57db3df
14 changed files with 50 additions and 3 deletions

View file

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

View file

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

View file

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