config: add app-id window criteria
This commit is contained in:
parent
6ef7655dbd
commit
da64166e82
13 changed files with 102 additions and 24 deletions
|
|
@ -115,4 +115,5 @@ pub enum WindowCriterionIpc {
|
|||
#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq)]
|
||||
pub enum WindowCriterionStringField {
|
||||
Title,
|
||||
AppId,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1655,6 +1655,8 @@ impl ConfigClient {
|
|||
}
|
||||
WindowCriterion::Title(t) => string!(t, Title, false),
|
||||
WindowCriterion::TitleRegex(t) => string!(t, Title, true),
|
||||
WindowCriterion::AppId(t) => string!(t, AppId, false),
|
||||
WindowCriterion::AppIdRegex(t) => string!(t, AppId, true),
|
||||
};
|
||||
let res = self.send_with_response(&ClientMessage::CreateWindowMatcher { criterion });
|
||||
get_response!(
|
||||
|
|
|
|||
|
|
@ -240,6 +240,10 @@ pub enum WindowCriterion<'a> {
|
|||
Title(&'a str),
|
||||
/// Matches the title of the window with a regular expression.
|
||||
TitleRegex(&'a str),
|
||||
/// Matches the app-id of the window verbatim.
|
||||
AppId(&'a str),
|
||||
/// Matches the app-id of the window with a regular expression.
|
||||
AppIdRegex(&'a str),
|
||||
}
|
||||
|
||||
impl WindowCriterion<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue