config: add WM_WINDOW_ROLE window criteria
This commit is contained in:
parent
faa0b27ef8
commit
5ad6ca4dd3
14 changed files with 81 additions and 6 deletions
|
|
@ -126,4 +126,5 @@ pub enum WindowCriterionStringField {
|
|||
Tag,
|
||||
XClass,
|
||||
XInstance,
|
||||
XRole,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1669,6 +1669,8 @@ impl ConfigClient {
|
|||
WindowCriterion::XClassRegex(t) => string!(t, XClass, true),
|
||||
WindowCriterion::XInstance(t) => string!(t, XInstance, false),
|
||||
WindowCriterion::XInstanceRegex(t) => string!(t, XInstance, true),
|
||||
WindowCriterion::XRole(t) => string!(t, XRole, false),
|
||||
WindowCriterion::XRoleRegex(t) => string!(t, XRole, true),
|
||||
};
|
||||
let res = self.send_with_response(&ClientMessage::CreateWindowMatcher { criterion });
|
||||
get_response!(
|
||||
|
|
|
|||
|
|
@ -272,6 +272,10 @@ pub enum WindowCriterion<'a> {
|
|||
XInstance(&'a str),
|
||||
/// Matches the X instance of the window with a regular expression.
|
||||
XInstanceRegex(&'a str),
|
||||
/// Matches the X role of the window verbatim.
|
||||
XRole(&'a str),
|
||||
/// Matches the X role of the window with a regular expression.
|
||||
XRoleRegex(&'a str),
|
||||
}
|
||||
|
||||
impl WindowCriterion<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue