[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3502fd9831: wallpaper: URI-encode gsettings argument
From: |
Stefan Kangas |
Subject: |
master 3502fd9831: wallpaper: URI-encode gsettings argument |
Date: |
Sun, 25 Sep 2022 09:06:28 -0400 (EDT) |
branch: master
commit 3502fd98310ad0870965511f600a92cd888a6de0
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
wallpaper: URI-encode gsettings argument
* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command-args, wallpaper-set): URI-encode gsettings
argument.
---
lisp/image/wallpaper.el | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el
index aea13227a8..893161bd1a 100644
--- a/lisp/image/wallpaper.el
+++ b/lisp/image/wallpaper.el
@@ -56,7 +56,7 @@
;; 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 @@
;; ;; 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
@@ -232,10 +232,11 @@ However, if you do need to change this, you might also
want to
customize `wallpaper-command' to match.
In each of the command line arguments, \"%f\" will be replaced
-with the full file name, \"%h\" with the height of the selected
-frame's display (as returned by `display-pixel-height'), and
-\"%w\" with the width of the selected frame's display (as
-returned by `display-pixel-width').
+with the full file name, \"%F\" with the full file name
+URI-encoded, \"%h\" with the height of the selected frame's
+display (as returned by `display-pixel-height'), and \"%w\" with
+the width of the selected frame's display (as returned by
+`display-pixel-width').
If `wallpaper-set' is run from a TTY frame, it will prompt for a
height and width for \"%h\" and \"%w\" instead.
@@ -310,6 +311,9 @@ so the value of `wallpaper-commands' is ignored."
(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
+ (file-name-split file)
+ "/"))
(?h . ,(wallpaper--get-height-or-width
"height"
#'display-pixel-height
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 3502fd9831: wallpaper: URI-encode gsettings argument,
Stefan Kangas <=