dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.
MIT License
8.34k stars 325 forks source link

wallpaper doesn't change on kde plasma #697

Open robert-edward-lee opened 1 year ago

robert-edward-lee commented 1 year ago

without -n argument wallpaper doesn't change

robert-edward-lee commented 1 year ago
diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py
index 6a50627..2ba07ff 100644
--- a/pywal/wallpaper.py
+++ b/pywal/wallpaper.py
@@ -119,10 +119,13 @@ def set_desktop_wallpaper(desktop, img):

     elif "kde" in desktop:
         string = """
-            var allDesktops = desktops();for (i=0;i<allDesktops.length;i++){
-            d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";
-            d.currentConfigGroup = Array("Wallpaper", "org.kde.image",
-            "General");d.writeConfig("Image", "%s")};
+            var Desktops = desktops();
+            for (i = 0; i < Desktops.length; i++) {
+                d = Desktops[i];
+                d.wallpaperPlugin = "org.kde.image";
+                d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");
+                d.writeConfig("Image", "%s");
+            }
         """
         util.disown(["qdbus", "org.kde.plasmashell", "/PlasmaShell",
                      "org.kde.PlasmaShell.evaluateScript", string % img])
robert-edward-lee commented 1 year ago

there is a missing semicolon