How do I save the current KDE Plasma configuration as a theme?

I want to try out some interesting KDE Plasma themes, but it warns me beforehand that it will replace all my existing settings which took me a long time to set up, and I strongly suspect that everything will change and not allow me to revert back to what I had.

How do I actually save the current theme so that I can just revert back with one click, by clicking “My theme” in the list of themes? I don’t understand why this feature appears to be missing. It prevents me from daring to try themes.

2 Likes

I haven’t tested it myself, and it’s not a GUI app but you might like to try konsave. It defaults to saving your KDE config but can be used to save other configs too

You can back up your ~/.config directory - which contains all the configuration for most of the applications, including KDE applications and Plasma. Then after you mess with things and want to rollback - you can copy the relevant configuration files back.

What do you think about “Plasma Customization Saver” found on KDE Store (Plasma Customization Saver - KDE Store) ?

I’ve reviewed the code is the Plasma Customization Saver and there are some worrisome patterns: it uses the execute data source to run a shell script, and it doesn’t properly quote arguments - not in calling the script and not in the script itself. This is the same problem that caused the big “Plasma global theme deleted my home directory” issue a while back.

I do not recommend using the Plasma Customization Saver from the KDE store

4 Likes

Hi Guss77.
Yeah, I saw that behavior too. Hopefully, I always do a system backup before.
Would be nice if you can solve this problem and to propose it for everyone using KDE Plasma.

I believe in did :sweat_smile: it goes like this: backup your system, and especially the ~/.config directory.

KBackup is very useful, I can also recommend Deja Dup from the GNOME project.

I personally use restic because of various reasons, but it doesn’t have a good UI frontend.

I use Symantec Ghost (Broadcom Ghost now) from an offline full system disk backup (in case some dependencies are broken or worse). It take me 5mn to backup.

Sounds like it would be a good addition to settings.

That seems like a bad idea - taking the system offline (and booting Windows instead?) then taking 5 minutes, then restarting everything - to take a backup, means you aren’t doing enough backups.

All tools I mentioned above are taking online backups from a live system - which is the correct way to do it. My restic setup is taking a backup every 6 hours, in the background, so I never worry that I missed a backup point.

1 Like

Well, that’s the way I do my backups and I never had any problems when in trouble. My method is OK for me and, after 40 years of experience in computers and servers, it proved it was the best suited for my needs (disk, partition crashes and many distros testings) and even more when talking of context system backup on (high speed) SSDs. Rsync and such are ok if you use always the same system but not for various OS testings on the same machine.
Your method is not the one I prefer for my needs.

BTW, we are not here to talk about system backups but about how to save and restore KDE plasma themes.

OK, granted.

I think the second best way to save and restore your Plasma theme is to create a Global Theme from your current setup, and upload that to the Pling KDE store. If you ever want to reapply it - you just go to the System Settings Global Themes section, click “Get New” and redownload it.

So, back to the original question… how, from the control panel (or any other tool), do you make a backup of the current global theme to backup on Pling KDE?

Well - there is no automated tool - you need to created a Plasma Global Theme as any theme developer does - by reading the documentation and editing some text files and running some commands.

LOL. I can’t say that to my wife and childrens… :joy: I sold Linux (KDE Neon) as a “user friendly” OS, without command line actions and a fully graphical control panel to stick to their daily mood and taste.
For me, I don’t care about shell actions, but saving the themes which is a very “dumb user” action, could be something the devs can add in next releases for those who don’t like scripting.

1 Like

I can imagine that adding a “Save” button to the System Settings Global Themes tool - that will ask you which theming features (you currently have selected) you want to save, then create the global theme package with these options - wouldn’t be a big uplift. You should open a ticket about this…

Yes. Absolutely. Opening a ticket to add (request) this “so useful” (and simple ?) feature, I think that’s the best solution.
Now, where can I open this ticket since KDE website redirect to this forum for assistance?

Well - you’re here, you got assistance :slight_smile:

Looking at bugs.kde.org - there’s actually an existing ticket about this, based on internal discussions and opened by Nate Graham, that covers your use case pretty well: 412906 – Feature to save current layout as a new Global Theme package

Unfortunately, it has been idle for a while - but maybe renewed interest will help.

Haven’t used it yet, but doesn’t Koi save settings to a file?
https://github.com/baduhai/Koi

1 Like

I skimmed a review of Koi’s code and it looks very reasonable. Though if you don’t want to actually use Koi, then using it to backup/export your setting will be quite ridiculous:

  1. Install Koi.
  2. Open the Koi configuration dialog and reproduce - manually - every single one of the Plasma style setting that you want to export. Probably best to choose the same setting for both light and dark modes.
  3. Copy the ~/.config/koirc file to another computer.
  4. On the other computer - download and install whatever 3rd-party styles / custom styles you have in your original setup, but don’t select them in the configuration.
  5. Install and launch Koi on the other computer, and let it change the theme (there’s a manual button to change light/dark, I believe).
  6. Uninstall Koi from both computers.

If you can do (4) and (2), then there’s no point in throwing Koi into the mix :man_shrugging: