config: add just-mapped window criteria
This commit is contained in:
parent
e36ccd560c
commit
5f1268cada
16 changed files with 95 additions and 4 deletions
|
|
@ -264,6 +264,7 @@ pub struct WindowMatch {
|
|||
pub urgent: Option<bool>,
|
||||
pub focused: Option<bool>,
|
||||
pub fullscreen: Option<bool>,
|
||||
pub just_mapped: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ impl Parser for WindowMatchParser<'_> {
|
|||
title,
|
||||
title_regex,
|
||||
),
|
||||
(app_id, app_id_regex, floating, visible, urgent, focused, fullscreen),
|
||||
(app_id, app_id_regex, floating, visible, urgent, focused, fullscreen, just_mapped),
|
||||
) = ext.extract((
|
||||
(
|
||||
opt(str("name")),
|
||||
|
|
@ -77,6 +77,7 @@ impl Parser for WindowMatchParser<'_> {
|
|||
opt(bol("urgent")),
|
||||
opt(bol("focused")),
|
||||
opt(bol("fullscreen")),
|
||||
opt(bol("just-mapped")),
|
||||
),
|
||||
))?;
|
||||
let mut not = None;
|
||||
|
|
@ -127,6 +128,7 @@ impl Parser for WindowMatchParser<'_> {
|
|||
urgent: urgent.despan(),
|
||||
focused: focused.despan(),
|
||||
fullscreen: fullscreen.despan(),
|
||||
just_mapped: just_mapped.despan(),
|
||||
types,
|
||||
client,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -262,6 +262,7 @@ impl Rule for WindowRule {
|
|||
bool!(Visible, visible);
|
||||
bool!(Urgent, urgent);
|
||||
bool!(Fullscreen, fullscreen);
|
||||
bool!(JustMapped, just_mapped);
|
||||
if let Some(value) = match_.focused {
|
||||
let crit = WindowCriterion::Focus(state.persistent.seat);
|
||||
let matcher = match value {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue