Bug 412906

Summary: Feature to save current layout as a new Global Theme package
Product: [Applications] systemsettings Reporter: Nate Graham <nate>
Component: kcm_lookandfeelAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: alizardx, cullen.delangie, dmatteo002, hauke.winkler, jlp, kde, launchpad, lv215bd5, mike.pike, mv.horizonv, notmart, nunogomes.pt+kde, postix, roberthollander156, tamisgnct1991, temp.o5kdx, the.entropyst, tneo, tom, WithLithum
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://discuss.kde.org/t/how-do-i-save-the-current-kde-plasma-configuration-as-a-theme/5303/17
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nate Graham 2019-10-13 13:58:51 UTC
This came up surrounding the discussion about https://phabricator.kde.org/D24223. It turns out that some people are hesitant to change global theme packages because if they don't like the new one, returning to a customized layout is annoying and time-consuming.

I think there's merit to this observation and I have had the same hesitancy myself. I'd like to propose that the KCM gain a feature to save the current layout as a new global theme package which would then appear in the KCM.

This would not only allow people to easily restore their prior settings if they don't like a particular global theme that they're trying, but it would also make it easily for people to export and share their own settings in the store.
Comment 1 David Edmundson 2019-10-13 16:54:29 UTC
See lookandfeelexplorer

Also, there's a task at T11746 which has a different proposed implementation of doing things which I think makes a lot more sense. Lets not split the discussion especially when this only represents one side of the comments.
Comment 2 postix 2019-10-13 17:56:58 UTC
> See lookandfeelexplorer
There's no way to save the current theme settings as a new global theme package, isn't it? What exactly should I look for?

> Also, there's a task at T11746 
I am not sure, why both should be mutual exclusive.
Comment 3 Nate Graham 2019-10-15 21:25:51 UTC
(In reply to David Edmundson from comment #1)
> See lookandfeelexplorer
As Postix implies, this doesn't really satisfy the request here. It doesn't actually have a "save current settings as a new theme" feature (or at least, not that I can find).

> Also, there's a task at T11746 which has a different proposed implementation
> of doing things which I think makes a lot more sense. Lets not split the
> discussion especially when this only represents one side of the comments.
Assuming you're referring to https://phabricator.kde.org/T11746#202374, I can accept that, and we can keep the conversation there.
Comment 4 David Edmundson 2019-10-15 22:21:19 UTC
It's maybe a bit obscure.

new theme -> fill in the details -> layout from current plasma setup
Comment 5 Nate Graham 2019-10-15 22:22:25 UTC
Thanks! That is quite obscure and could do with some UI polish IMO. Still it's there, so that's nice.
Comment 6 postix 2019-10-16 07:19:40 UTC
> lookandfeelexplorer -> new theme 

Sorry, I still don't find it. :-(
Can you please point me to the lookandfeelexplorer, maybe show me a screenshot? 
The only buttons I find at the look and feel section are for downloading a new theme or to install a theme by a file.
Comment 7 Christoph Feck 2019-10-16 08:30:55 UTC
You need to install 'plasma-sdk'.

https://cgit.kde.org/plasma-sdk.git/tree/
Comment 8 postix 2019-10-16 08:41:38 UTC
Thanks! Unfortunately it was not preinstalled on my distro (Manjaro) and so I could not find it. Nevertheless I would have expected in a different place, namely in the system settings, anyway.

That's why I suggest to integrate it into the system settings, to overhaul its UI and to add an option to only create a theme for a local installation (currently an email and website is required to create a new theme for example). 

But maybe let's discuss it here: https://phabricator.kde.org/T11746 :)
Comment 9 Nate Graham 2021-06-08 21:24:15 UTC
*** Bug 437963 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2021-06-08 21:25:25 UTC
Work on https://phabricator.kde.org/T11746 has stalled; re-opening this since another person has asked for it as well and I still think it's a reasonable request. :)
Comment 11 Nate Graham 2022-10-10 21:54:15 UTC
*** Bug 460210 has been marked as a duplicate of this bug. ***
Comment 12 Tom Atkinson 2024-10-04 03:02:55 UTC
Hello, I've just made a lengthy post at [1] and added it as URL for this bug (hope that's OK?!). The OP's thread title is "How do I save the current KDE Plasma configuration as a theme?" which seems to match this bug in that we are both trying to save current settings as a global theme. Me personally, it's the keyboard shortcuts, taskbar placement, sound scheme, mime types, Nemo settings, window decorations and desktop effects that are most important. I can find no way to create a Global Theme although I have tried for years.

To summaries my post from the forum:
- can't find any page about Global Themes at [2]
- according to Google, there isn't any page with title global theme on whole site:develop.kde.org global theme
- site only has 303 pages, am I using the wrong name? The word "global" does not appear on ANY page in this site. wrong site?
- switching to keyword "theme" I find 113 pages, that's odd? opening up a bunch I see [3] understanding and [4] The KDE wiki has a few tutorials that haven't been ported to https://develop.kde.org yet.
- should I be googling "look and feel" instead?



[1] https://discuss.kde.org/t/how-do-i-save-the-current-kde-plasma-configuration-as-a-theme/5303/1 
[2] https://develop.kde.org/docs/plasma/theme/quickstart/
[3] https://develop.kde.org/docs/plasma/theme/theme-details/
[4] https://techbase.kde.org/Development/Tutorials/Plasma5
Comment 13 Tom Atkinson 2024-10-04 03:17:29 UTC
Essentially the bug/feature is: Missing/Add "Save Global Theme..." button on Global Themes / Appearance / System Settings.

It would perhaps package up the relevant files in ~/ and output a .zip file or whatever.

My own attempt I created a brand new user account, and listed all the default files made by the (my) system **after just 1 login.**

Obviously there is plenty that should be removed (clementine defaults, session files, private keys, not kactivitymanagerd etc) but this list is no less than a **comprehensive snapshot** of what I assume is what a reasonable person might conclude goes into a "Global Theme" and certainly not less than the full amount (I hope).

.
./.config
./.config/gwenviewrc
./.config/Trolltech.conf
./.config/fcitx5
./.config/fcitx5/profile
./.config/fcitx5/conf
./.config/fcitx5/conf/cached_layouts
./.config/fcitx5/conf/notifications.conf
./.config/kateschemarc
./.config/gtkrc
./.config/kwinrc
./.config/kdeconnect
./.config/kdeconnect/privateKey.pem       <--------- NOT THIS
./.config/kdeconnect/config
./.config/kdeconnect/certificate.pem     <--------- NOT THIS
./.config/kglobalshortcutsrc
./.config/okularpartrc
./.config/akregatorrc
./.config/krunnerrc
./.config/kde.org
./.config/kde.org/UserFeedback.org.kde.discover.conf
./.config/kde.org/UserFeedback.org.kde.dolphin.conf
./.config/kde.org/UserFeedback.org.kde.plasmashell.conf
./.config/konquerorrc
./.config/ibus
./.config/ibus/bus
./.config/kconf_updaterc
./.config/libaccounts-glib
./.config/libaccounts-glib/accounts.db-wal
./.config/libaccounts-glib/accounts.db
./.config/libaccounts-glib/accounts.db-shm
./.config/plasma-welcomerc
./.config/powerdevilrc
./.config/konsolerc
./.config/dolphinrc
./.config/kcminputrc
./.config/khotkeysrc
./.config/plasmashellrc
./.config/fcitx
./.config/fcitx/dbus
./.config/kdeglobals
./.config/plasma-localerc
./.config/dconf
./.config/dconf/user
./.config/session
./.config/session/dolphin_dolphin_dolphin
./.config/session/systemsettings_10de757469000172631136900000431660010_1726311419_658226
./.config/session/dolphin_10de757469000172631136900000431660011_1726311419_658260
./.config/powermanagementprofilesrc
./.config/user-dirs.locale
./.config/jack
./.config/kded5rc
./.config/xsettingsd
./.config/xsettingsd/xsettingsd.conf
./.config/Clementine
./.config/Clementine/jamendo.db
./.config/Clementine/clementine.db
./.config/Clementine/Clementine.conf
./.config/discoverrc
./.config/khtml
./.config/khtml/formcompletions
./.config/autojack
./.config/autojack/autojack.json
./.config/kmixrc
./.config/gtk-3.0
./.config/gtk-3.0/gtk.css
./.config/gtk-3.0/window_decorations.css
./.config/gtk-3.0/colors.css
./.config/gtk-3.0/assets
./.config/gtk-3.0/assets/maximized-backdrop-active.svg
./.config/gtk-3.0/assets/maximized-active.svg
./.config/gtk-3.0/assets/close-backdrop-normal.svg
./.config/gtk-3.0/assets/minimize-backdrop-active.svg
./.config/gtk-3.0/assets/maximize-active.svg
./.config/gtk-3.0/assets/minimize-normal.svg
./.config/gtk-3.0/assets/maximize-backdrop-hover.svg
./.config/gtk-3.0/assets/maximized-backdrop-normal.svg
./.config/gtk-3.0/assets/maximize-backdrop-active.svg
./.config/gtk-3.0/assets/minimize-hover.svg
./.config/gtk-3.0/assets/maximized-hover.svg
./.config/gtk-3.0/assets/close-backdrop-active.svg
./.config/gtk-3.0/assets/minimize-backdrop-hover.svg
./.config/gtk-3.0/assets/maximized-normal.svg
./.config/gtk-3.0/assets/close-backdrop-hover.svg
./.config/gtk-3.0/assets/close-active.svg
./.config/gtk-3.0/assets/minimize-backdrop-normal.svg
./.config/gtk-3.0/assets/maximized-backdrop-hover.svg
./.config/gtk-3.0/assets/maximize-backdrop-normal.svg
./.config/gtk-3.0/assets/close-hover.svg
./.config/gtk-3.0/assets/minimize-active.svg
./.config/gtk-3.0/assets/maximize-hover.svg
./.config/gtk-3.0/assets/close-normal.svg
./.config/gtk-3.0/assets/maximize-normal.svg
./.config/gtk-3.0/settings.ini
./.config/kactivitymanagerd-statsrc
./.config/kactivitymanagerdrc
./.config/kscreenlockerrc
./.config/ktimezonedrc
./.config/bluedevilglobalrc
./.config/pulse
./.config/KDE
./.config/KDE/UserFeedback.org.kde.plasma-welcome.conf
./.config/plasma-org.kde.plasma.desktop-appletsrc
./.config/kxkbrc
./.config/spectaclerc
./.config/ksmserverrc
./.config/systemsettingsrc
./.config/gtk-4.0
./.config/gtk-4.0/gtk.css
./.config/gtk-4.0/window_decorations.css
./.config/gtk-4.0/colors.css
./.config/gtk-4.0/assets
./.config/gtk-4.0/settings.ini
./.config/kdedefaults
./.config/kdedefaults/kwinrc
./.config/kdedefaults/plasmarc
./.config/kdedefaults/package
./.config/kdedefaults/kcminputrc
./.config/kdedefaults/kdeglobals
./.config/kdedefaults/ksplashrc
./.config/kdedefaults/kscreenlockerrc
./.config/gtkrc-2.0
./.config/user-dirs.dirs
./.config/knfsshare
./.config/kwinrulesrc
./.Xauthority
./Templates
./.cache
./.cache/flatpak
./.cache/flatpak/system-cache
./.cache/flatpak/system-cache/summaries
./.cache/flatpak/system-cache/summaries/flathub.idx.sig
./.cache/flatpak/system-cache/summaries/flathub.idx
./.cache/update-manager-core
./.cache/update-manager-core/meta-release-lts
./.cache/ksplash
./.cache/ksplash/qmlcache
./.cache/plasma_theme_kubuntu.kcache
./.cache/gstreamer-1.0
./.cache/gstreamer-1.0/registry.x86_64.bin
./.cache/plasma-svgelements
./.cache/icon-cache.kcache
./.cache/plasmashell
./.local
./.local/share
./.local/share/kcookiejar
./.local/share/dolphin
./.local/share/dolphin/view_properties
./.local/share/dolphin/view_properties/global
./.local/share/dolphin/view_properties/global/.directory
./.local/share/dolphin/dolphinstaterc
./.local/share/flatpak
./.local/share/flatpak/.changed
./.local/share/flatpak/db
./.local/share/flatpak/repo
./.local/share/flatpak/repo/extensions
./.local/share/flatpak/repo/tmp
./.local/share/flatpak/repo/tmp/cache
./.local/share/flatpak/repo/config
./.local/share/flatpak/repo/objects
./.local/share/flatpak/repo/state
./.local/share/flatpak/repo/refs
./.local/share/flatpak/repo/refs/remotes
./.local/share/flatpak/repo/refs/mirrors
./.local/share/flatpak/repo/refs/heads
./.local/share/xorg
./.local/share/xorg/Xorg.1.log
./.local/share/krunnerstaterc
./.local/share/Trash      <--------- NOT THIS
./.local/share/Trash/files     <--------- NOT THIS
./.local/share/Trash/info     <--------- NOT THIS
./.local/share/knewstuff3
./.local/share/user-places.xbel.tbcache
./.local/share/session_migration-plasma
./.local/share/kscreen
./.local/share/kscreen/outputs
./.local/share/kded5
./.local/share/kded5/keyboard
./.local/share/kded5/keyboard/session
./.local/share/kded5/keyboard/session/layout_memory.xml
./.local/share/user-places.xbel
./.local/share/kactivitymanagerd
./.local/share/kactivitymanagerd/resources
./.local/share/kactivitymanagerd/resources/working-backup
./.local/share/kactivitymanagerd/resources/errors.log
./.local/share/kactivitymanagerd/resources/database-wal
./.local/share/kactivitymanagerd/resources/database-shm
./.local/share/kactivitymanagerd/resources/test-backup
./.local/share/kactivitymanagerd/resources/test-backup/database-wal
./.local/share/kactivitymanagerd/resources/test-backup/database-shm
./.local/share/kactivitymanagerd/resources/test-backup/database
./.local/share/kactivitymanagerd/resources/database
./.local/share/sddm
./.local/state
./.local/state/wireplumber
./.local/state/wireplumber/restore-stream      <--------- NOT THIS
./.var
./.var/app
./.bash_history      <--------- NOT THIS
./.xsession-errors     <--------- NOT THIS
./.gtkrc-2.0
Comment 14 Tom Atkinson 2024-10-04 03:37:06 UTC
Apologies this is my final post today. I think I might have found the latent functionality that needs to be pulled out of the SDK into the main user branch. Put another way, I think the functionality to export current global theme is here:

https://github.com/KDE/plasma-sdk/blob/master/lookandfeelexplorer/src/lnflogic.cpp

It's full of lines like:
    emit messageRequested(ErrorLevel::Info, i18n("Defaults config file saved from your current setup"));
and appears to be going through all the areas doing exports  with dumpCurrentPlasmaLayout() and dumpDefaultsConfigFile(m_themeName)



```
// write the defaults file, read from kde config files and save to the defaultsrc
...
    KConfigGroup defaultsConfigGroup(&defaultsConfig, "kdeglobals");
...
    // widget style
    KConfigGroup systemCG(KSharedConfig::openConfig(QStringLiteral("kdeglobals")), "KDE");
    defaultsConfigGroup.writeEntry("widgetStyle", systemCG.readEntry("widgetStyle", QStringLiteral("breeze")));
...
    // color scheme (TODO: create an in-place color scheme?)
    defaultsConfigGroup.writeEntry("ColorScheme", systemCG.readEntry("ColorScheme", QStringLiteral("Breeze")));
...
    // icon theme
    defaultsConfigGroup.writeEntry("Theme", systemCG.readEntry("Theme", QStringLiteral("breeze")));
...
    // plasma theme
    systemCG = KConfigGroup(KSharedConfig::openConfig(QStringLiteral("plasmarc")), "Theme");
    defaultsConfigGroup.writeEntry("name", systemCG.readEntry("name", QStringLiteral("default")));
...
    // cursor theme
    defaultsConfigGroup.writeEntry("cursorTheme", systemCG.readEntry("cursorTheme", QStringLiteral("breeze_cursors")));
...
    // KWin window switcher theme
    defaultsConfigGroup.writeEntry("LayoutName", systemCG.readEntry("LayoutName", QStringLiteral("org.kde.breeze.desktop")));
...
    // kwin
    defaultsConfigGroup.writeEntry("LayoutName", systemCG.readEntry("DesktopLayout", QStringLiteral("org.kde.breeze.desktop")));
...
    emit messageRequested(ErrorLevel::Info, i18n("Defaults config file saved from your current setup"));
```
I would like to run this but no idea how.
Comment 15 JPS 2024-12-17 21:22:23 UTC
I ask myself what cloud be so difficult to implement such feature?

Design developers should know where the files of the global design are stored and therefore could write a script to export the configuration files into a zip and import all the configurations from zip to the correct locations...!?

i am no developer and cant do this, but perhaps someone can tell me what is so difficult implementing this feature?
Comment 16 tneo 2025-05-06 20:18:36 UTC
This would be a great thing to have. I can make my own default theme and toggle between global themes more easily. 
@Nate do you have a timeline for this or is work not started?
Comment 17 Nate Graham 2025-05-06 20:56:34 UTC
The work hasn't been started.
Comment 18 Marco Martin 2025-05-28 09:19:05 UTC
(In reply to Nate Graham from comment #5)
> Thanks! That is quite obscure and could do with some UI polish IMO. Still
> it's there, so that's nice.

if is something we want to make explicit for the user it would need to be exposed somewhere else anyways, like in thee kcm or something.
What's important, is that the feature is implemented in plasmashell aalready, as a DBus interface, so whatever UI exposes it, would just need to use such api (maybe not "just that", but a big part of the work is there, in plasma-workspace already) with not that much else to implement
Comment 19 Nate Graham 2025-05-28 15:54:04 UTC
I think it would make sense to expose in a simple manner via a button in the KCM, yeah.
Comment 20 JPS 2025-05-28 21:08:45 UTC
There is already the "Plasma Configuration Saver" Widget from Dhruvesh Surolia (dhruv8sh@proton.me) which seems to work just fine.

It has an export and import function and the user could save the actual settings and themes and restore it easily.

BUT in my memory the installation needs some extra files and dependencies, it was not very fluent.
Perhaps the widget could be a good starting point or "bridge" to the implemented feature?
Comment 21 Nate Graham 2025-08-30 02:50:05 UTC
*** Bug 508907 has been marked as a duplicate of this bug. ***
Comment 22 The Entropyst 2025-08-30 13:20:59 UTC
(In reply to Nate Graham from comment #19)
> I think it would make sense to expose in a simple manner via a button in the KCM, yeah.

+1 This feature would be a nice addition especialy with day/night theme switching.
Just make it ask to name the theme and the current config get saved as a global theme.