]> git.eshelyaron.com Git - emacs.git/commitdiff
Support wbg in wallpaper.el (Bug#57781)
authorStefan Kangas <stefankangas@gmail.com>
Wed, 14 Sep 2022 02:44:12 +0000 (04:44 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 14 Sep 2022 05:20:47 +0000 (07:20 +0200)
* lisp/image/wallpaper.el (wallpaper-commands): Add "wbg".
(wallpaper--check-command): New cl-defmethod for "wbg".

lisp/image/wallpaper.el

index 4c90559183f6a5976f367867e447b943af546bbb..ca2b36db2e35092137aa3594e5ec7dc27bd5c202 100644 (file)
@@ -38,6 +38,8 @@
   '(
     ;; Sway (Wayland)
     ("swaybg" "-o" "*" "-i" "%f" "-m" "fill")
+    ;; Wayland General
+    ("wbg" %f)
     ;; Gnome
     ("gsettings" "set" "org.gnome.desktop.background" "picture-uri" "file://%f")
     ;; Other / General X
@@ -89,6 +91,9 @@ You can also use \\[report-emacs-bug]."
   (and (getenv "WAYLAND_DISPLAY")
        (getenv "SWAYSOCK")))
 
+(cl-defmethod wallpaper--check-command ((_type (eql 'wbg)))
+  (getenv "WAYLAND_DISPLAY"))
+
 (cl-defmethod wallpaper--check-command (_type)
   t)