 
 ;; Adopt a sneaky garbage collection strategy of waiting until idle time to
 ;; collect; staving off the collector while the user is working.
-(when doom-interactive-mode
-  (add-transient-hook! 'pre-command-hook (gcmh-mode +1))
-  (with-eval-after-load 'gcmh
-    (setq gcmh-idle-delay 10
-          gcmh-verbose doom-debug-mode
-          gcmh-high-cons-threshold 16777216) ; 16mb
-    (add-hook 'focus-out-hook #'gcmh-idle-garbage-collect)))
+(setq gc-cons-percentage 0.6)
+(with-eval-after-load 'gcmh
+  (setq gcmh-idle-delay 10
+        gcmh-high-cons-threshold 16777216
+        gcmh-verbose doom-debug-mode  ; 16mb
+        gc-cons-percentage 0.1)
+  (add-hook 'focus-out-hook #'gcmh-idle-garbage-collect))
 
 ;; HACK `tty-run-terminal-initialization' is *tremendously* slow for some
 ;;      reason. Disabling it completely could have many side-effects, so we
-;;      defer it until later.
-(unless (display-graphic-p)
-  (advice-add #'tty-run-terminal-initialization :override #'ignore)
-  (add-hook! 'window-setup-hook
-    (defun doom-init-tty-h ()
-      (advice-remove #'tty-run-terminal-initialization #'ignore)
-      (tty-run-terminal-initialization (selected-frame) nil t))))
+;;      defer it until later, at which time it (somehow) runs very quickly.
+(advice-add #'tty-run-terminal-initialization :override #'ignore)
+(add-hook! 'window-setup-hook
+  (defun doom-init-tty-h ()
+    (advice-remove #'tty-run-terminal-initialization #'ignore)
+    (tty-run-terminal-initialization (selected-frame) nil t)))
 
 
 ;;

;;
;;; Optimizations

;; Disable bidirectional text rendering for a modest performance boost. Of
;; course, this renders Emacs unable to detect/display right-to-left languages
;; (sorry!), but for us left-to-right language speakers/writers, it's a boon.
(setq-default bidi-display-reordering 'left-to-right
              bidi-paragraph-direction 'left-to-right)


  Module config.el files
  ~/.doom.d/config.el
  `doom-init-modules-hook'
  `doom-after-init-hook' (`after-init-hook')
  `emacs-startup-hook'
  `doom-init-ui-hook'
  `window-setup-hook'
