diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 5a59bfc4e..565724ea5 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -116,15 +116,20 @@ whose dimensions may not be fully initialized by the time this is run." (or (and (featurep! :ui doom-modeline) (doom-modeline 'project)) mode-line-format))) - (let ((old-pwd (or dir default-directory))) - (with-current-buffer (doom-fallback-buffer) + (let ((+doom-dashboard--width 80) + (old-pwd (or dir default-directory)) + (fallback-buffer (doom-fallback-buffer))) + (dolist (win (get-buffer-window-list fallback-buffer nil t)) + (set-window-fringes win 0 0) + (set-window-margins + win (max 0 (/ (- (window-total-width win) +doom-dashboard--width) 2)))) + (with-current-buffer fallback-buffer (with-silent-modifications (unless (eq major-mode '+doom-dashboard-mode) (+doom-dashboard-mode)) (erase-buffer) (setq default-directory old-pwd) - (let ((+doom-dashboard--width (window-width)) - (+doom-dashboard--height (window-height))) + (let ((+doom-dashboard--height (window-height))) (insert (make-string (max 0 (- (truncate (/ +doom-dashboard--height 2)) 16)) ?\n)) (dolist (widget-name +doom-dashboard-widgets) (funcall (intern (format "doom-dashboard-widget--%s" widget-name)))