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

@ -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)]

View file

@ -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(),
})
}
}

View file

@ -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);