pop-os / cosmic-epoch

Next generation Cosmic desktop environment
1.72k stars 55 forks source link

[Question] Config File for Cosmic #216

Open tudorjnu opened 4 months ago

tudorjnu commented 4 months ago

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.

Drakulix commented 4 months ago

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.

wiiznokes commented 4 months ago

I was wondering, could a software similar to dconf could be written with cosmic-config ?

Drakulix commented 4 months ago

I was wondering, could a software similar to dconf could be written with cosmic-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.

wiiznokes commented 4 months ago

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

Drakulix commented 4 months ago

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.

wiiznokes commented 3 months ago

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: