From fe7c015b20b5bca07aa178d28b9fd5cc66ad16f9 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 22:37:56 +0200 Subject: [PATCH] Support XFCE in wallpaper.el * lisp/image/wallpaper.el (wallpaper--default-commands) (wallpaper-command): Support XFCE. (Bug#57781) Thanks to Thierry Volpiatto . --- lisp/image/wallpaper.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index 9572349c36..4572a8c062 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -63,6 +63,9 @@ wallpaper--default-commands ("gsettings" "set" "org.gnome.desktop.background" "picture-uri" "file://%f") ;; KDE Plasma ("plasma-apply-wallpaperimage" "%f") + ;; XFCE + ("xfconf-query" "-c" "xfce4-desktop" "-p" + "/backdrop/screen0/monitoreDP/workspace0/last-image" "-s" "%f") ;; macOS ("osascript" "-e" "tell application \"Finder\" to set desktop picture to POSIX file \"%f\"") ;; Other / General X @@ -97,6 +100,9 @@ wallpaper--check-command (cl-defmethod wallpaper--check-command ((_type (eql 'plasma-apply-wallpaperimage))) (member "KDE" (xdg-current-desktop))) +(cl-defmethod wallpaper--check-command ((_type (eql 'xfconf-query))) + (member "XFCE" (xdg-current-desktop))) + (cl-defmethod wallpaper--check-command ((_type (eql 'swaybg))) (and (getenv "WAYLAND_DISPLAY") (getenv "SWAYSOCK"))) @@ -156,6 +162,7 @@ wallpaper-command (radio (const :tag "gsettings (GNOME)" "gsettings") (const :tag "plasma-apply-wallpaperimage (KDE Plasma)" "plasma-apply-wallpaperimage") + (const :tag "xfconf-query (XFCE)" "xfconf-query") (const :tag "swaybg (Wayland/Sway)" "swaybg") (const :tag "wbg (Wayland)" "wbg") (const :tag "gm (X Window System)" "gm") -- 2.30.2