]> git.eshelyaron.com Git - emacs.git/commitdiff
Support recent KDE Plasma in wallpaper.el
authorStefan Kangas <stefankangas@gmail.com>
Wed, 14 Sep 2022 08:29:16 +0000 (10:29 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 14 Sep 2022 08:31:46 +0000 (10:31 +0200)
* lisp/image/wallpaper.el (wallpaper-commands): Support recent KDE
Plasma.
(wallpaper--check-command): New cl-defmethod.

lisp/image/wallpaper.el

index 97789fe3f53b826bea7b55e6aee9761bcd03fb2e..c31c54fd9f760423870790b88e20f91ecbadb421 100644 (file)
@@ -43,6 +43,8 @@
     ("wbg" %f)
     ;; Gnome
     ("gsettings" "set" "org.gnome.desktop.background" "picture-uri" "file://%f")
+    ;; KDE Plasma
+    ("plasma-apply-wallpaperimage" "%f")
     ;; Other / General X
     ("gm" "display" "-size" "%wx%h" "-window" "root" "%f")
     ("display" "-resize" "%wx%h" "-window" "root" "%f")
@@ -88,6 +90,9 @@ You can also use \\[report-emacs-bug]."
 (cl-defmethod wallpaper--check-command ((_type (eql 'gsettings)))
   (member "GNOME" (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 'swaybg)))
   (and (getenv "WAYLAND_DISPLAY")
        (getenv "SWAYSOCK")))