cosmic-epoch
cosmic-epoch copied to clipboard
[Question] Config File for Cosmic
I love the DE features and I was wondering if it is possible to have a configuration file. I would love to be able to have my desktop configured in this file and then just sync it with my other machines.
I apologise if this issue was raised before, I could not find any references.
The various components are (mostly, some are still migrating) using a common configuration system call cosmic-config
. All it's config files are stored in .config/cosmic
, so you should be able to easily sync that folder.
A notable exceptions (temporarily, eventually everything will use cosmic-config) are the cosmic-comp shortcuts.
I was wondering, could a software similar to dconf
could be written with cosmic-config
?
I was wondering, could a software similar to
dconf
could be written withcosmic-config
?
config-config
is more like a file-based alternative to dconf
. There is a daemon and of course software to inspect the config state could be written, but one of the main goals is to make this also easy to edit manually.
Yes, i like that the config file a text based, but the advantage of dconf
is it expose all the settings, even the one that where not edited, witch make it super easy to find somethings.
I guess this leaves 3 alternatives for a possible version of dconf
for cosmic
- generate the config-files entirely (probably not wanted)
- make a special directory where software can write their default config files, so that dconf could diff the default file with the user file
- dconf have access to the rust config struct (seems hard)
generate the config-files entirely (probably not wanted)
Not really possible. The files already contain every key, that can be set for the most part. But that alone doesn't show you the variants that can be set per key.
make a special directory where software can write their default config files, so that dconf could diff the default file with the user file
Yes the default isn't very accessible right now.
dconf have access to the rust config struct (seems hard)
Easier than you would think. All project separate the configuration parts into a separate crate, so that e.g. the settings application can easily depend on the configuration structs of the other components. You can also easily create default configuration files from there.
I just has a thought that may be a good solution, generate a shema from the config struct. This will have the benefit of keeping away the real code of cosmic-app to support all applets/app.
Link that could help:
- https://github.com/serde-rs/serde/issues/345
- https://github.com/oooutlk/reflection
- https://crates.io/crates/serde-reflection