this post was submitted on 11 Jul 2023
0 points (NaN% liked)

KDE

5023 readers
105 users here now

KDE is an international technology team creating user-friendly free and open source software for desktop and portable computing. KDE’s software runs on GNU/Linux, BSD and other operating systems, including Windows.

Plasma 6 Bugs

If you encounter a bug, proceed to https://bugs.kde.org, check whether it has been reported.

If it hasn't, report it yourself.

PLEASE THINK CAREFULLY BEFORE POSTING HERE.

Developers do not look for reports on social media, so they will not see it and all it does is clutter up the feed.

founded 1 year ago
MODERATORS
 

There's a proposal at the linked blog post for how to clean up the config directory.

The post goes into detail which changes would be required in KDE software using Qt.

After reading, I just have one question (the blog does not seem to have a comment section): how does this handle transitioning from the old location to the new location? Imagine having a katerc config file under ~/.config and one under ~/.config/kate (which is the suggestion from the post) - should those be merged once and then the old one gets deleted?

top 4 comments
sorted by: hot top controversial new old
[–] herzenschein@pawb.social 0 points 1 year ago (1 children)

I answered something similar elsewhere:

If you mean migrating the files yourself, it's just a matter of copying the file from the old place ~/.config/yourconfigrc to ~/.config/yourapp/yourconfigrc.

If you mean you want the application to manage the migration itself, that's an implementation detail I hadn't thought about yet, but which I assume wouldn't be difficult to do with KConfig.

You can see this bit of code from Konsole showing how to migrate from old entries to new entries in the same config file for example: >https://invent.kde.org/utilities/konsole/-/blob/master/src/main.cpp#L99

The implementation could probably be something similar, with two KConfig/KSharedConfigPtr instances I assume 👀 so:

  • if oldConfig exists, create an object for it
  • read all oldConfig entries
  • if it differs from newConfig, store which ones differ
  • write all different oldConfig entries in newConfig object
  • sync()

Something like that.

[–] MartinR@feddit.de 0 points 1 year ago

Just for clarification: this would be a one-time process per application, right? I'm sure this will work for 99% of users, but there'll always be the one (or a couple of users) that synchronizes their .config directory, then doesn't update all machines at the same time and all hell breaks loose - a.k.a https://xkcd.com/1172/ :-) But I'd say that's probably not worth losing the advantages of a cleaner .config-directory, so this might be one of those "tough-luck" situations... 🤷

[–] Thwompthwomp@lemmy.world 0 points 1 year ago (1 children)

Would this mean a copy and a paste of the config folder would bring up a new KDE system to my personalizing without going through konsave juggling?

I think that’s my biggest complaint that I don’t know how to import my desktop config (window decorations, panel layout, desktops, activities, fonts, application themes) into a new install easily or the “proper” way

[–] MartinR@feddit.de 0 points 1 year ago

I'm not sure (not the author) and I think syncing config is a lot more difficult than it would seem at first glance. Eg Panel Layout: Imagine syncing between a multi-monitor-setup (work PC) and a single-monitor-setup (Laptop) - how's that supposed to work? The panel might be on the second screen on the PC, but once synchronized to the Laptop, that would mean either

  • missing panel (off screen)
  • double panel (stacked on top of each other)
  • hidden second panel (one below the other)
  • ...

Syncing .config would (at first glance) work best for device independent settings (e.g.: Indentation in Kate with Tabs vs. Spaces) - but even "fonts" in Kate might already not be a good idea, as a font might not be installed in both systems (and it might get worse with font-sizes, scale-factors...)