config: add WM_CLASS window criteria
This commit is contained in:
parent
6d3d4dcabb
commit
faa0b27ef8
15 changed files with 159 additions and 10 deletions
|
|
@ -124,4 +124,6 @@ pub enum WindowCriterionStringField {
|
|||
Title,
|
||||
AppId,
|
||||
Tag,
|
||||
XClass,
|
||||
XInstance,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1665,6 +1665,10 @@ impl ConfigClient {
|
|||
WindowCriterion::JustMapped => WindowCriterionIpc::JustMapped,
|
||||
WindowCriterion::Tag(t) => string!(t, Tag, false),
|
||||
WindowCriterion::TagRegex(t) => string!(t, Tag, true),
|
||||
WindowCriterion::XClass(t) => string!(t, XClass, false),
|
||||
WindowCriterion::XClassRegex(t) => string!(t, XClass, true),
|
||||
WindowCriterion::XInstance(t) => string!(t, XInstance, false),
|
||||
WindowCriterion::XInstanceRegex(t) => string!(t, XInstance, true),
|
||||
};
|
||||
let res = self.send_with_response(&ClientMessage::CreateWindowMatcher { criterion });
|
||||
get_response!(
|
||||
|
|
|
|||
|
|
@ -264,6 +264,14 @@ pub enum WindowCriterion<'a> {
|
|||
Tag(&'a str),
|
||||
/// Matches the toplevel-tag of the window with a regular expression.
|
||||
TagRegex(&'a str),
|
||||
/// Matches the X class of the window verbatim.
|
||||
XClass(&'a str),
|
||||
/// Matches the X class of the window with a regular expression.
|
||||
XClassRegex(&'a str),
|
||||
/// Matches the X instance of the window verbatim.
|
||||
XInstance(&'a str),
|
||||
/// Matches the X instance of the window with a regular expression.
|
||||
XInstanceRegex(&'a str),
|
||||
}
|
||||
|
||||
impl WindowCriterion<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue