   (add-hook 'focus-in-hook #'doom|run-switch-frame-hooks)
   (advice-add! '(switch-to-buffer display-buffer) :around #'doom*run-switch-buffer-hooks))
 
-;; Set fonts
-(add-hook 'doom-init-ui-hook #'doom|init-fonts)
-;; Apply themes
+;; Apply `doom-theme'
 (unless (daemonp)
   (add-hook 'doom-init-ui-hook #'doom|init-theme))
-;; Run `doom-load-theme-hook'
-(advice-add #'load-theme :after #'doom*load-theme-hooks)
-;; Run `doom-init-ui-hook'
+;; Apply `doom-font' et co
+(add-hook 'doom-after-init-modules-hook #'doom|init-fonts)
+;; Setup `doom-load-theme-hook'
+(advice-add #'load-theme :after #'doom*run-load-theme-hooks)
+
 (add-hook 'window-setup-hook #'doom|init-ui)
 
 

      (load-theme doom-theme t))
    (setq doom-last-window-system (framep-on-display frame))))

(defun doom|reload-theme-maybe (_frame)
  "Reloads the theme after closing the last frame of a type."
  (unless (cl-find doom-last-window-system (frame-list) :key #'framep-on-display)
    (setq doom-last-window-system nil)
    (doom|reload-theme-in-frame (selected-frame))))


;;
;;; Bootstrap

  (add-to-list 'kill-buffer-query-functions #'doom|protect-visible-buffer nil 'eq)
  (add-hook 'after-change-major-mode-hook #'doom|highlight-non-default-indentation)

  ;; Reload theme if the display device has changed
  (add-hook 'after-make-frame-functions #'doom|reload-theme-in-frame-maybe)
  (add-hook 'after-delete-frame-functions #'doom|reload-theme-maybe)

