From f0798ac13dcb4c01a883f165e03c3cd7f208667c Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 14 Sep 2022 04:44:12 +0200 Subject: [PATCH] Support wbg in wallpaper.el (Bug#57781) * lisp/image/wallpaper.el (wallpaper-commands): Add "wbg". (wallpaper--check-command): New cl-defmethod for "wbg". --- lisp/image/wallpaper.el | 5 +++++ 1 file changed, 5 insertions(+) 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) -- 2.39.2