[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master f25f4699d7 2/2: Support several new DEs in wallpaper.el
From: |
Stefan Kangas |
Subject: |
Re: master f25f4699d7 2/2: Support several new DEs in wallpaper.el |
Date: |
Fri, 23 Sep 2022 09:06:53 -0400 |
Po Lu <luangruo@yahoo.com> writes:
> Only that they are encoded on my system running GNOME Shell:
>
> file:///usr/local/share/backgrounds/Simple%20white.png
OK, how about something like this (100 % untested)?
diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el
index aea13227a8..0f4fc8b133 100644
--- a/lisp/image/wallpaper.el
+++ b/lisp/image/wallpaper.el
@@ -56,7 +56,7 @@ wallpaper--default-commands
;; When updating this, also update the custom :type for `wallpaper-command'.
'(
;; Gnome
- ("gsettings" "set" "org.gnome.desktop.background" "picture-uri"
"file://%f")
+ ("gsettings" "set" "org.gnome.desktop.background" "picture-uri"
"file://%F")
;; KDE Plasma
("plasma-apply-wallpaperimage" "%f")
;; XFCE
@@ -69,9 +69,9 @@ wallpaper--default-commands
;; ;; Mate
;; ("gsettings" "set" "org.mate.background" "picture-filename" "%f")
;; ;; Cinnamon
- ;; ("gsettings" "set" "org.cinnamon.desktop.background"
"picture-uri" "file://%f")
+ ;; ("gsettings" "set" "org.cinnamon.desktop.background"
"picture-uri" "file://%F")
;; ;; Deepin
- ;; ("gsettings" "set" "com.deepin.wrap.gnome.desktop.background"
"picture-uri" "file://%f")
+ ;; ("gsettings" "set" "com.deepin.wrap.gnome.desktop.background"
"picture-uri" "file://%F")
;; Sway (Wayland)
("swaybg" "-o" "*" "-i" "%f" "-m" "fill")
;; Wayland General
@@ -310,6 +310,9 @@ wallpaper-set
(unless wallpaper-command
(error "Couldn't find a command to set the wallpaper with"))
(let* ((fmt-spec `((?f . ,(expand-file-name file))
+ (?F . ,(mapconcat #'url-hexify-string
+ (split-string file "/")
+ "/"))
(?h . ,(wallpaper--get-height-or-width
"height"
#'display-pixel-height