Add cli_label to criteria and JSON output

Similar to app_id or con_id, labels are present in the IPC JSON output and can
be matched in criteria using [cli_label="regex"].  This can be useful to
support instance-specific rules in applications that do not support changing
app_id/class based on a command line argument.
This commit is contained in:
Daniel De Graaf 2020-12-08 11:30:38 -05:00
parent 05a418c9fe
commit b7f62c9d7a
3 changed files with 33 additions and 0 deletions

View file

@ -35,6 +35,7 @@ struct criteria {
struct pattern *shell;
struct pattern *app_id;
struct pattern *con_mark;
struct pattern *cli_label;
uint32_t con_id; // internal ID
#if HAVE_XWAYLAND
struct pattern *class;