config: add exe client criteria
This commit is contained in:
parent
cc734a135c
commit
a6257910bb
13 changed files with 85 additions and 2 deletions
|
|
@ -237,6 +237,8 @@ pub struct ClientMatch {
|
|||
pub is_xwayland: Option<bool>,
|
||||
pub comm: Option<String>,
|
||||
pub comm_regex: Option<String>,
|
||||
pub exe: Option<String>,
|
||||
pub exe_regex: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ impl Parser for ClientMatchParser<'_> {
|
|||
is_xwayland,
|
||||
comm,
|
||||
comm_regex,
|
||||
exe,
|
||||
exe_regex,
|
||||
),
|
||||
) = ext.extract((
|
||||
(
|
||||
|
|
@ -79,6 +81,8 @@ impl Parser for ClientMatchParser<'_> {
|
|||
opt(bol("is-xwayland")),
|
||||
opt(str("comm")),
|
||||
opt(str("comm-regex")),
|
||||
opt(str("exe")),
|
||||
opt(str("exe-regex")),
|
||||
),
|
||||
))?;
|
||||
let mut not = None;
|
||||
|
|
@ -124,6 +128,8 @@ impl Parser for ClientMatchParser<'_> {
|
|||
is_xwayland: is_xwayland.despan(),
|
||||
comm: comm.despan_into(),
|
||||
comm_regex: comm_regex.despan_into(),
|
||||
exe: exe.despan_into(),
|
||||
exe_regex: exe_regex.despan_into(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,6 +122,8 @@ impl Rule for ClientRule {
|
|||
value_ref!(SandboxInstanceIdRegex, sandbox_instance_id_regex);
|
||||
value_ref!(Comm, comm);
|
||||
value_ref!(CommRegex, comm_regex);
|
||||
value_ref!(Exe, exe);
|
||||
value_ref!(ExeRegex, exe_regex);
|
||||
value!(Uid, uid);
|
||||
value!(Pid, pid);
|
||||
bool!(Sandboxed, sandboxed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue