Defer tty-run-terminal-initialization to window-setup-hook
This seems to work just as well, and ensures it runs in time for interactive use.
This commit is contained in:
parent
5bff064ba8
commit
e8aa293bc0
1 changed files with 7 additions and 6 deletions
13
core/core.el
13
core/core.el
|
@ -273,14 +273,15 @@ users).")
|
||||||
gcmh-verbose doom-debug-mode)
|
gcmh-verbose doom-debug-mode)
|
||||||
(add-hook 'focus-out-hook #'gcmh-idle-garbage-collect)))
|
(add-hook 'focus-out-hook #'gcmh-idle-garbage-collect)))
|
||||||
|
|
||||||
;; HACK `tty-run-terminal-initialization' is *tremendously* slow. Disabling it
|
;; HACK `tty-run-terminal-initialization' is *tremendously* slow for some
|
||||||
;; completely could have side-effects, so we defer it until later.
|
;; reason. Disabling it completely could have many side-effects, so we
|
||||||
|
;; defer it until later.
|
||||||
(unless (display-graphic-p)
|
(unless (display-graphic-p)
|
||||||
(advice-add #'tty-run-terminal-initialization :override #'ignore)
|
(advice-add #'tty-run-terminal-initialization :override #'ignore)
|
||||||
(add-transient-hook! 'pre-command-hook
|
(add-hook! 'window-setup-hook
|
||||||
(advice-remove #'tty-run-terminal-initialization #'ignore)
|
(defun doom-init-tty-h ()
|
||||||
(dolist (frame (frame-list))
|
(advice-remove #'tty-run-terminal-initialization #'ignore)
|
||||||
(tty-run-terminal-initialization frame nil t))))
|
(tty-run-terminal-initialization (selected-frame) nil t))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue