Bug 427815 - Store configuration in textfiles where only non default config values are tracked
Summary: Store configuration in textfiles where only non default config values are tra...
Status: RESOLVED WORKSFORME
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: 5.20.0
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-16 15:47 UTC by Claudius Ellsel
Modified: 2020-10-16 21:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Claudius Ellsel 2020-10-16 15:47:01 UTC
SUMMARY
I am not that experienced in this field. However, I think I read somewhere about a configuration approach where the user declares all values he wants to have changed and all other values remain untouched and stay on default (might have been Ansible). I also think that VS code has something like that where changed settings are stored in a settings.json file that only contains changed settings (and is rather easy to edit, extend and version, I guess).

This way it is pretty easy to detect when a user set a value or whether the value might just be an old default value that got changed in between to a different default.

Another benefit is that one has minimal config files with only specific changes stored instead of the whole configuration.

One future benefit might be having easier backup and restore options plus maybe making it easier to implement a settings sync option.

Maybe such an approach can also be used for systemsettings (and possibly other places in Plasma or KDE apps).
Comment 1 Nate Graham 2020-10-16 16:40:19 UTC
This is in fact what we already do, globally, for everything using KConfig--which is to say, all KDE software :)

The default settings are defined in the code, and the text config file only ever contains divergences from the defaults. In this way, deleting your config file will reset to default settings the state of whatever app whose config file you got rid of.
Comment 2 Claudius Ellsel 2020-10-16 18:23:44 UTC
Cool, did not know that :)