There should be a way to collect config files in home

The configuration files for the KDE software are scattered all over the home folder.
I think there should be a way to automatically gather them up, for example, a small utility to automatically create symbolic links and tags them with the software they come from.

1 Like

Most programs, including KDE ones, already neatly organise configuration under ~/.config, with some things under ~/.local. If they are elsewhere, it’s either because the programs that write them haven’t (yet) caught up with the modern convention or, more commonly, use the home dir directly for historical & backwards compatibility reasons.

If you decide to “tidy up” dotfiles, expect the programs that use them to break.

1 Like

This is the bane of using plasma unfortunately. Maybe some things will be tidied up a bit with plasma 6 but like someone mentionened there are so many different part of kde that there would be a lot of pull requests in a lot of different places to tidy it all up.

I’m using nixos and home manager to manage most of my dot files but all the plasma stuff is scattered all over the place like you say.

There is an attempt at making a home-manager module for managing all plasma related and KDE stuff declaratively at

plasma-manager

and this file specifically lists a large amount of the different files one might want to keep track of but it is in no means complete yet.

2 Likes

Programs like bash could easily move their .bashrc and .profile to the /.config/bash folder on their next update

It is much harder for bash to move, than for KDE apps:

  1. Many programs import or modify .bashrc. kdesrc-build, for example.
  2. Many tutorials tell you to modify .bashrc.

OTOH, the config file of an KDE app are usually only used by that app, and not supposed to be modified by the user.

1 Like

I think there might be a way that doesn’t require app developers to modify the config path, but still allows the user to “collect” config files in some sense:

The KConfig class should automatically symlink the config file to a central directory by the name of the application, just like OP said.

E.g. it would do ln -s ~/.config/dolphinrc ~/.config/KDE/apps/dolphin/dolphinrc.

Then you can do backup and other things by following symlinks from this directory.

Not sure how you feel about youtbes here, but I accidentally bumped into this yesterday.

GNU stow
Old blogpost

Many (but not all) KDE apps declare their configuration via .kcfg files, like this one for example. The filename is often (but not necessarily) part of that file. Theoretically it should be possible to look for the .kcfg files in one’s prefix, associate them with the config files in your home directory, and perhaps then figure out which package or repository the .kcfg files are coming from.

Or at least I can’t think of an immediate blocker that would prevent this from being done.