mirror of
https://gitgud.io/wackyideas/aerothemeplasma.git
synced 2024-08-15 00:43:43 +00:00
24 lines
790 B
C++
24 lines
790 B
C++
#include <KColorScheme>
|
|
#include <KConfig>
|
|
#include <KConfigGroup>
|
|
|
|
#include <QDebug>
|
|
|
|
int main(int, char**)
|
|
{
|
|
KConfig globals("kdeglobals");
|
|
KConfigGroup general(&globals, QStringLiteral("General"));
|
|
if (general.readEntry("ColorScheme") != QLatin1String("Breeze")) {
|
|
return 0;
|
|
}
|
|
QString breezeLightPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("color-schemes/BreezeLight.colors"));
|
|
if (breezeLightPath.isEmpty()) {
|
|
return 0;
|
|
}
|
|
KConfig breezeLight(breezeLightPath, KConfig::SimpleConfig);
|
|
for (const auto &group : breezeLight.groupList()) {
|
|
auto destination = KConfigGroup(&globals, group);
|
|
KConfigGroup(&breezeLight, group).copyTo(&destination, KConfig::Notify);
|
|
}
|
|
return 0;
|
|
}
|