https://bugs.kde.org/show_bug.cgi?id=412906

--- Comment #14 from Tom Atkinson <t...@funk.co.nz> ---
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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to