            (warn "`+doom-dashboard-pwd-policy' has an invalid value of '%s'"
                  policy)))))
 
-;; widgets
+
+;;
+;; Widgets
+;;
+
 (defun doom-dashboard-widget--banner ()
   (mapc (lambda (line)
           (insert (propertize (+doom-dashboard--center +doom-dashboard--width line)

(defun +doom-dashboard|make-frame (frame)
  "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/open frame))

(defun +doom-dashboard|server-visit (&rest _)
  "Inhibit dashboard refresh when opening files via emacsclient."
  (setq +doom-dashboard-inhibit-refresh t))

(add-hook 'window-setup-hook #'+doom-dashboard|init)
(add-hook 'after-make-frame-functions #'+doom-dashboard|make-frame)
(add-hook 'server-visit-hook #'+doom-dashboard|server-visit)


;;
(defun +doom-dashboard/open (frame)
  (interactive (list (selected-frame)))
  (unless (run-hook-with-args-until-success '+doom-dashboard-inhibit-functions)
    (unless +doom-dashboard-inhibit-refresh
      (with-selected-frame frame
        (switch-to-buffer (doom-fallback-buffer))
        (+doom-dashboard-reload)))
    (setq +doom-dashboard-inhibit-refresh nil)))

;
(defun +doom-dashboard-p (&optional buffer)
  "Returns t if BUFFER is the dashboard buffer."
  (eq (or buffer (current-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))))
    fallback-buffer))

;; helpers
(defun +doom-dashboard--center (len s)
