(This variable was introduced in XDG Desktop Entry Specification
version 1.2.)
+---
+*** New function 'xdg-session-type'.
+It returns the 'XDG_SESSION_TYPE' environment variable. (This is not
+part of any official standard; see the man page pam_systemd(8) for
+more information.)
+
+++
** New macro 'with-delayed-message'.
This macro is like 'progn', but will output the specified message if
;; - Thumbnail Managing Standard
;; - xdg-user-dirs configuration
;; - Desktop Entry Specification
+;; - Unofficial extension $XDG_SESSION_TYPE from systemd
;;; Code:
(put 'xdg-mime-table 'mtime (current-time)))
(puthash subtype (delq nil files) (cdr (assoc type xdg-mime-table)))))))
+\f
+;; Unofficial extension from systemd.
+
+(defun xdg-session-type ()
+ "Return the value of $XDG_SESSION_TYPE.
+Should be one of \"unspecified\", \"tty\", \"x11\", \"wayland\",
+or \"mir\".
+
+This is not part of any official Freedesktop.org standard, but is
+documented in the man page `pam_systemd'."
+ (getenv "XDG_SESSION_TYPE"))
+
(provide 'xdg)
;;; xdg.el ends here