* lisp/image/wallpaper.el (xdg): Require.
(wallpaper--check-command): Use xdg-current-desktop instead of reading
XDG_CURRENT_DESKTOP directly. This fixes things on e.g. Ubuntu, where
XDG_CURRENT_DESKTOP might contain a string like "ubuntu:GNOME".
;;; Code:
(eval-when-compile (require 'subr-x))
+(require 'xdg)
(defcustom wallpaper-commands
'(
(cdr args))))
(cl-defmethod wallpaper--check-command ((_type (eql 'gsettings)))
- (equal (getenv "XDG_CURRENT_DESKTOP") "GNOME"))
+ (member "GNOME" (xdg-current-desktop)))
(cl-defmethod wallpaper--check-command ((_type (eql 'swaybg)))
(and (getenv "WAYLAND_DISPLAY")