From: Stefan Kangas <stefankangas@gmail.com>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: master f25f4699d7 2/2: Support several new DEs in wallpaper.el
Date: Fri, 23 Sep 2022 09:06:53 -0400 [thread overview]
Message-ID: <CADwFkmmB+g97=7K62fK2m9AzE6mRNgdp28m=-Nw6H3Z4wBZ2rQ@mail.gmail.com> (raw)
In-Reply-To: <87bkr6cn8f.fsf@yahoo.com>
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
next prev parent reply other threads:[~2022-09-23 13:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <166389647969.2861.15735332086175539466@vcs2.savannah.gnu.org>
[not found] ` <20220923012800.2B4E1C12D97@vcs2.savannah.gnu.org>
2022-09-23 4:52 ` master f25f4699d7 2/2: Support several new DEs in wallpaper.el Po Lu
2022-09-23 6:16 ` Eli Zaretskii
2022-09-23 6:22 ` Po Lu
2022-09-23 11:15 ` Stefan Kangas
2022-09-23 12:02 ` Po Lu
2022-09-23 13:06 ` Stefan Kangas [this message]
2022-09-25 13:07 ` Stefan Kangas
2022-09-23 13:20 ` Yuri Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmmB+g97=7K62fK2m9AzE6mRNgdp28m=-Nw6H3Z4wBZ2rQ@mail.gmail.com' \
--to=stefankangas@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.