1
0
Fork 0
forked from wry/wry

config: add exe client criteria

This commit is contained in:
Julian Orth 2025-05-03 13:09:13 +02:00
parent cc734a135c
commit a6257910bb
13 changed files with 85 additions and 2 deletions

View file

@ -93,4 +93,5 @@ pub enum ClientCriterionStringField {
SandboxAppId,
SandboxInstanceId,
Comm,
Exe,
}

View file

@ -1547,6 +1547,8 @@ impl ConfigClient {
ClientCriterion::IsXwayland => ClientCriterionIpc::IsXwayland,
ClientCriterion::Comm(t) => string!(t, Comm, false),
ClientCriterion::CommRegex(t) => string!(t, Comm, true),
ClientCriterion::Exe(t) => string!(t, Exe, false),
ClientCriterion::ExeRegex(t) => string!(t, Exe, true),
};
let res = self.send_with_response(&ClientMessage::CreateClientMatcher { criterion });
get_response!(

View file

@ -87,6 +87,10 @@ pub enum ClientCriterion<'a> {
Comm(&'a str),
/// Matches the `/proc/pid/comm` of the client with a regular expression.
CommRegex(&'a str),
/// Matches the `/proc/pid/exe` of the client verbatim.
Exe(&'a str),
/// Matches the `/proc/pid/exe` of the client with a regular expression.
ExeRegex(&'a str),
}
impl ClientCriterion<'_> {