config: add visibility window criteria
This commit is contained in:
parent
8bb8b2a649
commit
dcf57db3df
14 changed files with 50 additions and 3 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -259,6 +259,7 @@ impl Rule for WindowRule {
|
|||
value!(AppId, app_id);
|
||||
value!(AppIdRegex, app_id_regex);
|
||||
bool!(Floating, floating);
|
||||
bool!(Visible, visible);
|
||||
Some(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue