1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-20 18:17:20 +00:00

Fix desktop environment check on Ubuntu

* 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".
This commit is contained in:
Stefan Kangas 2022-09-14 10:26:07 +02:00
parent 7d315ce630
commit d537e4c102

View File

@ -33,6 +33,7 @@
;;; Code:
(eval-when-compile (require 'subr-x))
(require 'xdg)
(defcustom wallpaper-commands
'(
@ -85,7 +86,7 @@ You can also use \\[report-emacs-bug]."
(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")