I want a clean config directory!

Hint: You can either make it use relative URLs or set the base URL when running hugo via --baseUrl. I had to deal with this before :slight_smile:

It has a few convenience functions to move entries from one file to another like KConfig::copyTo(), KConfigGroup::copyTo(), KConfigGroup::KConfigGroup(KConfigBase, KConfigGroup) and KConfigGroup::KConfigGroup(KConfigGroup), but there’s no migrate function or automatic behavior I think.

The KConfig::OpenFlag enum lets you define some sort of hierarchy between config files (/etc/yourconfigrc~/.config/kdeglobals~/.config/yourconfigrc), but that’s for defaults only. It doesn’t have to do with the preference for reading files from what I can tell.

And there’s KConfig::addConfigSources(), but I don’t fully understand it yet.

In practice it should just need a simple if conditional though.

2 Likes

Perhaps not precisely about the original topic, but what’s up with plasma-org.kde.plasma.desktop-appletsrc? IME very fragile, and accumulates junk. IMO no use having a clean directory if the dirt has been shovelled into files.

It describes the structure of your desktop, from containments (panels, your actual desktop) and the applets that are located within them, and the settings of all of those.

I don’t find it fragile, but I think it could do with a nicer name and being filed away more cleanly as described in the blog.

It describes the structure of your desktop, from containments (panels, your actual desktop) and the applets that are located within them, and the settings of all of those.

I have a fair idea as to some of what it does, not least from what has broken over the years.

There’s too much in it; on one system I find 1500 lines. I really don’t like its complicated structure that acts to make it inaccessible; it looks like obfuscation. One is obviously not supposed to read it, let alone make changes. IMO config files should have comments explaining the meaning of the contents.

I don’t see that capability in the KConfig API. It would be nice to have.

One could argue that if you need comments, then the entry itself is non-descriptive and should be changed, but having comments would be a nice plus. Maybe a defaulted QString parameter that adds a comment line above the desired config entry.

Config files aren’t really meant to be modified manually. Default settings are omitted too.

Comments could be derived from KConfigXT’s kcfg XML, with <label>

1 Like

For the average, non-technical, user, perhaps.

[humour mode]But, I’m not that, and resent UX devs telling me how to use a desktop by making config changes inaccessible. Hey, if I was Joe average I’d use Gnome. Perhaps I need some drug to stop me thinking.