config: add toplevel-tag window criteria
This commit is contained in:
parent
5f1268cada
commit
6d3d4dcabb
15 changed files with 106 additions and 8 deletions
|
|
@ -123,4 +123,5 @@ pub enum WindowCriterionIpc {
|
|||
pub enum WindowCriterionStringField {
|
||||
Title,
|
||||
AppId,
|
||||
Tag,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1663,6 +1663,8 @@ impl ConfigClient {
|
|||
WindowCriterion::Focus(seat) => WindowCriterionIpc::SeatFocus(seat),
|
||||
WindowCriterion::Fullscreen => WindowCriterionIpc::Fullscreen,
|
||||
WindowCriterion::JustMapped => WindowCriterionIpc::JustMapped,
|
||||
WindowCriterion::Tag(t) => string!(t, Tag, false),
|
||||
WindowCriterion::TagRegex(t) => string!(t, Tag, true),
|
||||
};
|
||||
let res = self.send_with_response(&ClientMessage::CreateWindowMatcher { criterion });
|
||||
get_response!(
|
||||
|
|
|
|||
|
|
@ -260,6 +260,10 @@ pub enum WindowCriterion<'a> {
|
|||
/// This is true for one iteration of the compositor's main loop immediately after the
|
||||
/// window has been mapped.
|
||||
JustMapped,
|
||||
/// Matches the toplevel-tag of the window verbatim.
|
||||
Tag(&'a str),
|
||||
/// Matches the toplevel-tag of the window with a regular expression.
|
||||
TagRegex(&'a str),
|
||||
}
|
||||
|
||||
impl WindowCriterion<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue