-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use globs for input config #959
Conversation
Whoops, didn't see #819 I think this one is a bit more straight-forward though. Multiple configs matching an output is implicitly supported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach of storing the glob directly in the InputConfig seems good.
The one thing I think needs more consideration is the handling of multiple globs matching a single input device and the order in which the the configs are applied.
I think we should keep the list of input configs sorted by generality of the globs just as we do with the RuleList abstraction. When a new config is added we would then do the following algorithm to apply configs to input devices:
for each input device:
for each input config from most general to least general:
if config glob matches device:
apply config to device, possibly overwriting more general config
Does that make sense to you? We would also need to document this behavior in the man page.
I was initially going to leave input configs in order of declaration, but ordering by generality does make more sense on second thought. |
f9d7d5b
to
b1f4327
Compare
e7e23d6
to
e2ea8c8
Compare
50eebf4
to
92e71dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks!
implements #741