config: add comm client criteria
This commit is contained in:
parent
bdabb7bbdd
commit
cc734a135c
12 changed files with 73 additions and 2 deletions
|
|
@ -92,4 +92,5 @@ pub enum ClientCriterionStringField {
|
|||
SandboxEngine,
|
||||
SandboxAppId,
|
||||
SandboxInstanceId,
|
||||
Comm,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1545,6 +1545,8 @@ impl ConfigClient {
|
|||
ClientCriterion::Uid(p) => ClientCriterionIpc::Uid(p),
|
||||
ClientCriterion::Pid(p) => ClientCriterionIpc::Pid(p),
|
||||
ClientCriterion::IsXwayland => ClientCriterionIpc::IsXwayland,
|
||||
ClientCriterion::Comm(t) => string!(t, Comm, false),
|
||||
ClientCriterion::CommRegex(t) => string!(t, Comm, true),
|
||||
};
|
||||
let res = self.send_with_response(&ClientMessage::CreateClientMatcher { criterion });
|
||||
get_response!(
|
||||
|
|
|
|||
|
|
@ -83,6 +83,10 @@ pub enum ClientCriterion<'a> {
|
|||
Pid(i32),
|
||||
/// Matches if the client is Xwayland.
|
||||
IsXwayland,
|
||||
/// Matches the `/proc/pid/comm` of the client verbatim.
|
||||
Comm(&'a str),
|
||||
/// Matches the `/proc/pid/comm` of the client with a regular expression.
|
||||
CommRegex(&'a str),
|
||||
}
|
||||
|
||||
impl ClientCriterion<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue