From: Stefan Kangas Date: Wed, 14 Sep 2022 02:44:12 +0000 (+0200) Subject: Support wbg in wallpaper.el (Bug#57781) X-Git-Tag: emacs-29.0.90~1856^2~535 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f0798ac13dcb4c01a883f165e03c3cd7f208667c;p=emacs.git Support wbg in wallpaper.el (Bug#57781) * lisp/image/wallpaper.el (wallpaper-commands): Add "wbg". (wallpaper--check-command): New cl-defmethod for "wbg". --- diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index 4c90559183f..ca2b36db2e3 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -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)