Improve config yaml schema (#16)

Leverages custom unmarshaling to be more declarative for our config specification.

Reviewed-on: #16
Co-authored-by: Anna Rose Wiggins <annabunches@gmail.com>
Co-committed-by: Anna Rose Wiggins <annabunches@gmail.com>
This commit is contained in:
Anna Rose Wiggins 2025-08-09 16:33:46 +00:00 committed by Anna Rose Wiggins
parent 1a7b288083
commit d9babf5dc0
8 changed files with 364 additions and 238 deletions

View file

@ -8,19 +8,16 @@ type RuleTargetRelaxis struct {
DeviceName string
Device Device
Axis evdev.EvCode
Inverted bool
}
func NewRuleTargetRelaxis(device_name string,
device Device,
axis evdev.EvCode,
inverted bool) (*RuleTargetRelaxis, error) {
axis evdev.EvCode) (*RuleTargetRelaxis, error) {
return &RuleTargetRelaxis{
DeviceName: device_name,
Device: device,
Axis: axis,
Inverted: inverted,
}, nil
}