emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f25f4699d7 2/2: Support several new DEs in wallpaper.el


From: Stefan Kangas
Subject: master f25f4699d7 2/2: Support several new DEs in wallpaper.el
Date: Thu, 22 Sep 2022 21:28:00 -0400 (EDT)

branch: master
commit f25f4699d760c5409a1571dcfdf4ed0fdac9e0ec
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Support several new DEs in wallpaper.el
    
    * lisp/image/wallpaper.el (wallpaper--default-commands)
    (wallpaper--check-command, wallpaper-command): Add support for Unity,
    Pantheon, Budgie, LXQt, and LXDE.  Also add support for Lubuntu,
    Xubuntu, and Pop!_OS.
---
 lisp/image/wallpaper.el | 43 +++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 41 insertions(+), 2 deletions(-)

diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el
index ff47d37e3a..effa25b180 100644
--- a/lisp/image/wallpaper.el
+++ b/lisp/image/wallpaper.el
@@ -62,6 +62,16 @@
     ;; XFCE
     ("xfconf-query" "-c" "xfce4-desktop" "-p"
      "/backdrop/screen0/monitoreDP/workspace0/last-image" "-s" "%f")
+    ;; LXDE
+    ("pcmanfm" "--set-wallpaper=%f")
+    ;; LXQt
+    ("pcmanfm-qt" "--set-wallpaper=%f") ; "--wallpaper-mode=MODE"
+    ;; ;; Mate
+    ;; ("gsettings" "set" "org.mate.background" "picture-filename" "%f")
+    ;; ;; Cinnamon
+    ;; ("gsettings" "set" "org.cinnamon.desktop.background" "picture-uri" 
"file://%f")
+    ;; ;; Deepin
+    ;; ("gsettings" "set" "com.deepin.wrap.gnome.desktop.background" 
"picture-uri" "file://%f")
     ;; Sway (Wayland)
     ("swaybg" "-o" "*" "-i" "%f" "-m" "fill")
     ;; Wayland General
@@ -95,13 +105,40 @@ In each of the command line arguments, \"%f\", \"%h\" and 
\"%w\"
 will be replaced as described in `wallpaper-command-args'.")
 
 (cl-defmethod wallpaper--check-command ((_type (eql 'gsettings)))
-  (member "GNOME" (xdg-current-desktop)))
+  (or (member (downcase (env "DESKTOP_SESSION"))
+              '("gnome" "gnome" "gnome-wayland" "gnome-xorg"
+                "unity" "ubuntu" "pantheon" "budgie-desktop"
+                "pop"))
+      (member "GNOME" (xdg-current-desktop))
+      (member "Budgie" (xdg-current-desktop))
+      (member "GNOME-Classic" (xdg-current-desktop))))
 
 (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)))
+  (or (member (lowercase (env "DESKTOP_SESSION"))
+              '("xubuntu" "ubuntustudio"))
+      (member "XFCE" (xdg-current-desktop))))
+
+(cl-defmethod wallpaper--check-command ((_type (eql 'pcmanf)))
+  (member "LXDE" (xdg-current-desktop)))
+
+(cl-defmethod wallpaper--check-command ((_type (eql 'pcmanf-qt)))
+  (or (member (lowercase (env "DESKTOP_SESSION"))
+              '("lubuntu" "lxqt"))
+      (member "LXQt" (xdg-current-desktop))))
+
+;; (cl-defmethod wallpaper--check-command ((_type (eql 'gsettings)))
+;;   (or (equal "mate" (lowercase (env "DESKTOP_SESSION")))
+;;       (member "MATE" (xdg-current-desktop))))
+
+;; (cl-defmethod wallpaper--check-command ((_type (eql 'gsettings)))
+;;   (or (equal "cinnamon" (lowercase (env "DESKTOP_SESSION")))
+;;       (member "X-Cinnamon" (xdg-current-desktop))))
+
+;; (cl-defmethod wallpaper--check-command ((_type (eql 'gsettings)))
+;;   (member "Deepin" (xdg-current-desktop)))
 
 (cl-defmethod wallpaper--check-command ((_type (eql 'swaybg)))
   (and (getenv "WAYLAND_DISPLAY")
@@ -163,6 +200,8 @@ systems, where a native API is used instead."
      (const :tag "gsettings                   (GNOME)"            "gsettings")
      (const :tag "plasma-apply-wallpaperimage (KDE Plasma)"       
"plasma-apply-wallpaperimage")
      (const :tag "xfconf-query                (XFCE)"             
"xfconf-query")
+     (const :tag "pcmanf                      (LXDE)"             "pcmanf")
+     (const :tag "pcmanf-qt                   (LXQt)"             "pcmanf-qt")
      (const :tag "swaybg                      (Wayland/Sway)"     "swaybg")
      (const :tag "wbg                         (Wayland)"          "wbg")
      (const :tag "gm                          (X Window System)"  "gm")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]