config: add toplevel-tag window criteria
This commit is contained in:
parent
5f1268cada
commit
6d3d4dcabb
15 changed files with 106 additions and 8 deletions
|
|
@ -265,6 +265,8 @@ pub struct WindowMatch {
|
|||
pub focused: Option<bool>,
|
||||
pub fullscreen: Option<bool>,
|
||||
pub just_mapped: Option<bool>,
|
||||
pub tag: Option<String>,
|
||||
pub tag_regex: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
|
|
@ -56,7 +56,18 @@ impl Parser for WindowMatchParser<'_> {
|
|||
title,
|
||||
title_regex,
|
||||
),
|
||||
(app_id, app_id_regex, floating, visible, urgent, focused, fullscreen, just_mapped),
|
||||
(
|
||||
app_id,
|
||||
app_id_regex,
|
||||
floating,
|
||||
visible,
|
||||
urgent,
|
||||
focused,
|
||||
fullscreen,
|
||||
just_mapped,
|
||||
tag,
|
||||
tag_regex,
|
||||
),
|
||||
) = ext.extract((
|
||||
(
|
||||
opt(str("name")),
|
||||
|
|
@ -78,6 +89,8 @@ impl Parser for WindowMatchParser<'_> {
|
|||
opt(bol("focused")),
|
||||
opt(bol("fullscreen")),
|
||||
opt(bol("just-mapped")),
|
||||
opt(str("tag")),
|
||||
opt(str("tag-regex")),
|
||||
),
|
||||
))?;
|
||||
let mut not = None;
|
||||
|
|
@ -129,6 +142,8 @@ impl Parser for WindowMatchParser<'_> {
|
|||
focused: focused.despan(),
|
||||
fullscreen: fullscreen.despan(),
|
||||
just_mapped: just_mapped.despan(),
|
||||
tag: tag.despan_into(),
|
||||
tag_regex: tag_regex.despan_into(),
|
||||
types,
|
||||
client,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -258,6 +258,8 @@ impl Rule for WindowRule {
|
|||
value!(TitleRegex, title_regex);
|
||||
value!(AppId, app_id);
|
||||
value!(AppIdRegex, app_id_regex);
|
||||
value!(Tag, tag);
|
||||
value!(TagRegex, tag_regex);
|
||||
bool!(Floating, floating);
|
||||
bool!(Visible, visible);
|
||||
bool!(Urgent, urgent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue