maximbaz / wluma

Automatic brightness adjustment based on screen contents and ALS
ISC License
665 stars 28 forks source link

[Feature request]: be lenient with config file and assume defaults #106

Open Atemu opened 6 months ago

Atemu commented 6 months ago

Please describe your feature request

Currently, you must manually declare a lot of fields with their default value in order to set any one particular setting or else wluma will crash complaining about a missing field. This is rather annoying.

wluma should be able to start up using an empty config file and any config file where any one setting is set without a whole set of settings present.

maximbaz commented 6 months ago

Thanks for the idea! I think it might be a bit tricky, especially with the array fields. Consider if user had this config.toml:

[[output.backlight]]
name = "eDP-2"

Was the intention to edit name in the default backlight, or to have a second output?

Perhaps I should just remove the default config altogether, the only reason it assumes Intel + Dell hardware is because that was the hardware I used to develop wluma :sweat_smile: