mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-23 19:47:58 +01:00
Support starting EXWM from Emacs server not in daemon mode
* exwm.el (exwm-enable): Start EXWM from `window-setup-hook' or `after-make-frame-functions', whichever comes first.
This commit is contained in:
parent
f167bc979c
commit
10766e232b
1 changed files with 5 additions and 4 deletions
9
exwm.el
9
exwm.el
|
@ -892,10 +892,11 @@ manager. If t, replace it, if nil, abort and ask the user if `ask'."
|
||||||
;; Ignore unrecognized command line arguments. This can be helpful
|
;; Ignore unrecognized command line arguments. This can be helpful
|
||||||
;; when EXWM is launched by some session manager.
|
;; when EXWM is launched by some session manager.
|
||||||
(push #'vector command-line-functions)
|
(push #'vector command-line-functions)
|
||||||
(add-hook (if (daemonp)
|
;; In case EXWM is to be started from a graphical Emacs instance.
|
||||||
'after-make-frame-functions ;emacsclient
|
(add-hook 'window-setup-hook #'exwm-init t)
|
||||||
'window-setup-hook) ;emacs
|
;; In case EXWM is to be started with emacsclient.
|
||||||
#'exwm-init t)
|
(add-hook 'after-make-frame-functions #'exwm-init t)
|
||||||
|
;; Manage the subordinate Emacs server.
|
||||||
(add-hook 'kill-emacs-hook #'exwm--server-stop)
|
(add-hook 'kill-emacs-hook #'exwm--server-stop)
|
||||||
(dolist (i exwm-blocking-subrs)
|
(dolist (i exwm-blocking-subrs)
|
||||||
(advice-add i :around #'exwm--server-eval-at)))))
|
(advice-add i :around #'exwm--server-eval-at)))))
|
||||||
|
|
Loading…
Reference in a new issue