From de433f54b6c7787373c600cab70323ca855c08b2 Mon Sep 17 00:00:00 2001 From: KockaAdmiralac <1405223@gmail.com> Date: Thu, 26 Jul 2018 20:46:46 +0200 Subject: [PATCH] Temporary attempted fix for KDE --- binding-mri/wallpaper-binding.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/binding-mri/wallpaper-binding.cpp b/binding-mri/wallpaper-binding.cpp index 62c5a8f..4b04a25 100644 --- a/binding-mri/wallpaper-binding.cpp +++ b/binding-mri/wallpaper-binding.cpp @@ -48,7 +48,8 @@ static bool defColorExists; static std::string optionImage, optionColor, optionImageStyle, optionColorStyle; // KDE settings - static std::map defPlugins, defPictures, defColors; + static std::map defPlugins, defPictures, defColors, defModes; + static std::map defBlurs; #endif #endif @@ -116,6 +117,10 @@ defPictures[containment] = val; } else if (key == "Color") { defColors[containment] = val; + } else if (key == "FillMode") { + defModes[containment] = val; + } else if (key == "Blur") { + defBlurs[containment] = (val == "true"); } } else if (line.at(0) == '[') { sections.clear(); @@ -318,13 +323,15 @@ end: boost::replace_all(concatPath, "\\", "\\\\"); boost::replace_all(concatPath, "\"", "\\\""); boost::replace_all(concatPath, "'", "\\x27"); - command << "qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript '" << + command << "qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'string:" << "var allDesktops = desktops();" << "for (var i = 0, l = allDesktops.length; i < l; ++i) {" << "var d = allDesktops[i];" << "d.wallpaperPlugin = \"org.kde.image\";" << "d.currentConfigGroup = [\"Wallpaper\", \"org.kde.image\", \"General\"];" << "d.writeConfig(\"Image\", \"file://" << concatPath << "\");" << + "d.writeConfig(\"FillMode\", \"6\");" << + "d.writeConfig(\"Blur\", false);" << "d.writeConfig(\"Color\", \"" << std::to_string((color >> 16) & 0xFF) << "," << std::to_string((color >> 8) & 0xFF) << "," <<