exwm-enable: Set environment variable INSIDE_EXWM

* exwm.el (exwm-enable): Set environment variable INSIDE_EXWM such that EXWM can
be detected inside nested Emacs sessions.
This commit is contained in:
Daniel Mendler 2024-12-23 19:50:09 +01:00
parent 53ea124e99
commit ac80bf13a9

View file

@ -1002,6 +1002,7 @@ FRAME, if given, indicates the X display EXWM should manage."
(xcb:disconnect exwm--connection))
(setq exwm--connection nil)
(setq exwm--terminal nil)
(setenv "INSIDE_EXWM" nil)
(exwm--log "Exited"))
;;;###autoload
@ -1025,6 +1026,7 @@ Optional argument UNDO may be either of the following symbols:
(setq frame-resize-pixelwise t ;mandatory; before init
window-resize-pixelwise t
x-no-window-manager t)
(setenv "INSIDE_EXWM" "1")
;; Ignore unrecognized command line arguments. This can be helpful
;; when EXWM is launched by some session manager.
(push #'vector command-line-functions)