diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 06d6741f9..881e86e5a 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -42,6 +42,7 @@ (setq doom-fallback-buffer +doom-dashboard-name) (add-hook 'emacs-startup-hook '+doom-dashboard/open) +(add-hook 'after-make-frame-functions '+doom-dashboard-deferred-reload) (add-hook! 'kill-buffer-query-functions (if (not (+doom-dashboard-p)) t @@ -84,6 +85,11 @@ (setq fringe-indicator-alist +doom-dashboard--old-fringe-indicator) (remove-hook 'evil-insert-state-entry-hook 'doom|mode-erase-on-insert t))) +(defun +doom-dashboard-deferred-reload (&rest _) + "Reload the dashboard after a brief pause. This is necessary for new frames, +whose dimensions may not be fully initialized by the time this is run." + (run-with-timer 0.1 nil '+doom-dashboard-reload)) + (defun +doom-dashboard-reload (&optional dir) "Update the DOOM scratch buffer (or create it, if it doesn't exist)." (when (and (not +doom-dashboard-inhibit-refresh)