From ac80bf13a931dda2035debb426a048d42a00ddb2 Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Mon, 23 Dec 2024 19:50:09 +0100 Subject: [PATCH] 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. --- exwm.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exwm.el b/exwm.el index 8e94a80..a0731d9 100644 --- a/exwm.el +++ b/exwm.el @@ -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)