2024-02-17 22:51:19 +00:00
|
|
|
#include <KColorScheme>
|
|
|
|
#include <KConfig>
|
|
|
|
#include <KConfigGroup>
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
2024-08-09 01:20:25 +00:00
|
|
|
int main(int, char**)
|
2024-02-17 22:51:19 +00:00
|
|
|
{
|
|
|
|
KConfig globals("kdeglobals");
|
2024-08-09 01:20:25 +00:00
|
|
|
KConfigGroup general(&globals, QStringLiteral("General"));
|
2024-02-17 22:51:19 +00:00
|
|
|
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);
|
|
|
|
}
|
2024-08-09 01:20:25 +00:00
|
|
|
return 0;
|
2024-02-17 22:51:19 +00:00
|
|
|
}
|