From 7c0a037af09fe35a6fd7f8beb9ecd28e47b498ba Mon Sep 17 00:00:00 2001 From: dejan <31327026+Lija321@user.noreply.github.com> Date: Sun, 12 Jul 2026 14:46:05 +0200 Subject: [PATCH] Decode picture-uri before passing wallpaper path to imagemagick The blur-background feature passes the raw picture-uri gsettings value to the convert command. When the wallpaper filename contains characters that are percent-encoded in the URI (e.g. spaces as %20), imagemagick fails to open the file and the blurred background is never generated. Decode the URI with GLib.filename_from_uri() so convert receives the actual filesystem path. Co-Authored-By: Claude Fable 5 --- extension.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extension.js b/extension.js index 81d5e0f..6c5fa57 100644 --- a/extension.js +++ b/extension.js @@ -335,7 +335,15 @@ export default class SearchLightExt extends Extension { // let a = Math.floor(100 - color[3] * 100); // let rgb = this._style.hex(color); // let cmd = `convert -scale 10% -blur 0x2.5 -resize 200% -fill "${rgb}" -tint ${a} "${bg}" ${this.desktop_background_blurred}`; - let cmd = `convert -scale 10% -blur 0x2.5 -resize 200% "${this.desktop_background}" ${this.desktop_background_blurred}`; + // picture-uri is a file:// URI; decode it (spaces etc. are + // percent-encoded) before handing the path to imagemagick + let bgPath = this.desktop_background; + try { + [bgPath] = GLib.filename_from_uri(this.desktop_background); + } catch (err) { + // not a file:// URI; use as-is + } + let cmd = `convert -scale 10% -blur 0x2.5 -resize 200% "${bgPath}" ${this.desktop_background_blurred}`; console.log(cmd); trySpawnCommandLine(cmd); }