]> git.eshelyaron.com Git - emacs.git/commitdiff
Support XFCE in wallpaper.el
authorStefan Kangas <stefankangas@gmail.com>
Fri, 16 Sep 2022 20:37:56 +0000 (22:37 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Fri, 16 Sep 2022 20:39:33 +0000 (22:39 +0200)
* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command): Support XFCE.  (Bug#57781)
Thanks to Thierry Volpiatto <thievol@posteo.net>.

lisp/image/wallpaper.el

index 9572349c366b671a013526602514287c53fa9d0b..4572a8c06282072e318db214202295e0232822fd 100644 (file)
@@ -63,6 +63,9 @@
     ("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 @@ will be replaced as described in `wallpaper-command-args'.")
 (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 @@ systems, where a native API is used instead."
     (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")