conf: recurse into arrays before matching

When the value looks like an array, recurse into it and do the matching
on the array items instead of the whole value.
This commit is contained in:
Wim Taymans 2026-05-26 09:42:49 +02:00
parent 784a9dd00f
commit f195140702
2 changed files with 33 additions and 9 deletions

View file

@ -527,6 +527,7 @@ The general rules object follows the following pattern:
{
# <key> = <value>
# all keys must match the value. ! negates. ~ starts regex.
# if <value> is an array, matching is done on its elements.
#application.process.binary = "teams"
#application.name = "~speech-dispatcher.*"
@ -644,6 +645,19 @@ matches = [
]
```
When the value is an array, the match is performed on the array elements until
one succeeds. For example:
```css
matches = [
{
pipewire.sec.gids = 42
}
]
```
Matches `pipewire.sec.gids = [ 10, 20, 42, 1000 ]`.
# CONTEXT PROPERTIES RULES @IDX@ pipewire.conf context.properties.rules