I would like to backup some KDE settings but don’t really know which files to copy from .config
Searching for their names in github.com/KDE has given me some idea about their purposes but I couldn’t find any comments or documentation there either.
I would like to backup some KDE settings but don’t really know which files to copy from .config
Searching for their names in github.com/KDE has given me some idea about their purposes but I couldn’t find any comments or documentation there either.
I have some advice on doing this. This is coming from my experience with creating an ansible role to fully setup a plasma desktop with all of my preferred configurations on a fresh computer from scratch: You can find the repo here for reference: github.com/alyxxy-net/ansible-role-alyxxy-kde
For context, this is coming out of a process of trying to minimize the amount of files to keep track of and creating a minimal base config that is easy to apply on any device, so it might not cover all of your needs if you have a more complex setup. It has also just been updated and tested for plasma 6 on Debian testing:
Enough context, here are the files that I have found important to backup and what they do:
~/.config/dolphinrc Contains the settings for the dolphin file manager
~/.config/kdeglobals Contains settings for color scheme, icon theme, and widget style, maybe other appearance settings as well if you aren’t using a default theme
~/.config/kglobalshortcutsrc Contains all of the keyboard shortcut/hotkey settings
~/.config/khotkeysrc This file is a bit harder to parse, but it looks like it covers custom user created shortcuts and well as a bunch of other stuff including gestures. I definitely plan to dig into this more, but I will admit that I don’t have the best understanding of this config file XD
~/.config/klaunchrc Covers application launch feedback, this is where I have the bouncing icons turned off
~/.config/kscreenlockerrc Contains settings for screen timeout and locking
~/.config/ksmserverrc Contains session settings, this is where I have the setting to login with a fresh setting instead of trying to restore an old one
~/.config/kwinrc Contains the virtual desktop settings (how many are defined and what layout they are in) as well as plugins/effects that enabled or disabled, the window focus policy, the global animation speed and hot corners settings. This is one of the more important configs that defines a lot of behavior, it probably also covers more things that I am not using. It is also very easily readable :)
~/.config/plasma-org.kde.plasma.desktop-appletsrc This is another really important config. It contains all of the panel and widget settings, including system tray settings. It can be a bit hard to parse and read, but it follows this basic format: [Containments][numeric id] This defines a panel
[Containments][numeric id][applets][numeric id] This defines a widget or other object that is part of the panel.
In general, there will be entries to define all of the panels and their components, and further entries (matching the [numeric id] of the definition entry) that define their configuration and placement within the panels.
~/.config/plasmashellrc Contains more panel definition settings for panel behavior and dimensions, much more brief and less comprehensive than the previous config, not sure why they are even separate in the first place shrug. The panels are identified with the same [numeric id]
~/.config/plasmarc Contains theme settings
~/.config/gtk-3.0 and ~/.config/gtk-4.0 directories Contains appearance settings for gtk apps to match the plasma theme and color settings
~/.config/xsettingsd directory Contains more settings for gtk apps appearance and behavior (icons, toolbar style, fonts, cursor settings, etc)
That’s all of the files I am keeping track of and porting over from ~/.config/ Next up is the stuff in ~/.local/share
~/.local/share/konsole Here be the terminal profile settings
~/.local/share/plasma/plasmoids This is where any extra plasmoids/widgets that you have downloaded and added are kept. These are pretty easy to copy around directly without having to track them down and download again, but they also might break between major plasma versions
Whew, ok, we are almost done! The following parts are how I handle wallpaper and themes/colors.
For wallpaper, I actually have a pretty janky method of nuking the contents directory of the default plasma theme at /usr/share/wallpapers and tossing my own images in there matching the file naming because I am a monster who was tired of analyzing config files when I decided on this approach XD
I used to use a custom theme (more details on porting that below) but when moving from plasma 5 to 6 and porting it over for testing… It broke so hard that I swore off custom themes completely (I couldn’t even open the settings menu, it would technically “open” but the window would never display)
My new approach is to use the plasma dark theme that is included by default, modify the colors settings and save them as a new profile. This actually got me everything I wanted from a theme anyway and only creates one file to keep track of!
~/.local/share/color-schemes/<name>.colors
Any custom themes you have downloaded will be in the following directories (including the one above)
~/.local/share/aurorae/themes/
~/.local/share/plasma/desktoptheme and ~/.local/share/plasma/look-and-feel
you really didn’t have to go through the trouble of writing all this, thats really kind of you!! thank you so much!
Your ansible thing sounds really cool but might be a bit too much for me tbh 😄 Maybe someday I ll have such a smooth setup but for now Im hoping I dont have to reset too much
There is actually an app, konsave, that can backup/restore plasma config but sadly it hasn’t been ported to plasma 6 yet.
Thanks again for all the explanation of the config files. Im planning to create a repo documenting all the info I find so this helps a lot.