From 7cb718833b2d61280bda6363f3ace044b3c1bcdf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 6 Sep 2021 15:03:16 +1000 Subject: [PATCH] alsa-monitor: reword the match rule comment in the config file Each dictionary needs to fully match but out of the dicts we have, only one needs to match to apply. Reword that for clarity. Also document regex vs normal string comparison vs the magic null string. --- src/daemon/media-session.d/alsa-monitor.conf | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/daemon/media-session.d/alsa-monitor.conf b/src/daemon/media-session.d/alsa-monitor.conf index 764af1bc8..954135f12 100644 --- a/src/daemon/media-session.d/alsa-monitor.conf +++ b/src/daemon/media-session.d/alsa-monitor.conf @@ -18,9 +18,17 @@ properties = { rules = [ # An array of matches/actions to evaluate. { - # Rules for matching a device or node. It is an array of - # properties that all need to match the regexp. If any of the - # matches work, the actions are executed for the object. + # Rules for matching a device or node. Each dictionary in this array + # specifies the property to match as key and a string or regex match + # as value. A successful match requires all dictionary keys (i.e. + # properties) to match. + # + # Actions are are executed for the object if at least one successful + # match exists. + # + # Regular expressions are prefixed with the ~ (tilde) character, + # otherwise a standard string comparison is used. + # The special value "null" matches against empty properties. matches = [ { # This matches all cards. These are regular expressions