         (+doom-dashboard-reload)))
     (setq +doom-dashboard-inhibit-refresh nil)))
 
+;
 (defun +doom-dashboard-p (&optional buffer)
   "Returns t if BUFFER is the dashboard buffer."
-  (let ((buffer (or buffer (current-buffer))))
-    (and (buffer-live-p buffer)
-         (eq buffer (doom-fallback-buffer)))))
-
-(defun +doom-dashboard-center (len s)
+  (eq (or buffer (current-buffer))
+      (doom-fallback-buffer)))
+
+(defun +doom-dashboard-update-pwd ()
+  "TODO"
+  (with-current-buffer (doom-fallback-buffer)
+    (cd (or (+doom-dashboard--get-pwd)
+            default-directory))))
+
+(defun +doom-dashboard-reload (&optional force)
+  "Update the DOOM scratch buffer (or create it, if it doesn't exist)."
+  (let ((fallback-buffer (doom-fallback-buffer)))
+    (when (or (and after-init-time
+                   (not +doom-dashboard-inhibit-refresh)
+                   (get-buffer-window fallback-buffer)
+                   (not (window-minibuffer-p (frame-selected-window))))
+              force)
+      (with-current-buffer fallback-buffer
+        (+doom-dashboard-update-pwd)
+        (with-silent-modifications
+          (unless (eq major-mode '+doom-dashboard-mode)
+            (+doom-dashboard-mode))
+          (erase-buffer)
+          (let ((+doom-dashboard--height
+                 (window-height (get-buffer-window fallback-buffer)))
+                (lines 1)
+                content)
+            (with-temp-buffer
+              (dolist (widget-name +doom-dashboard-widgets)
+                (funcall (intern (format "doom-dashboard-widget--%s" widget-name)))
+                (insert "\n"))
+              (setq content (buffer-string)
+                    lines (count-lines (point-min) (point-max))))
+            (insert (make-string (max 0 (- (/ +doom-dashboard--height 2)
+                                           (/ lines 2)))
+                                 ?\n)
+                    content))
+          (unless (button-at (point))
+            (goto-char (next-button (point-min)))))))
+    ;; Update all dashboard windows
+    (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)))))
+  t)
+
+;; helpers
+(defun +doom-dashboard--center (len s)
   (concat (make-string (ceiling (max 0 (- len (length s))) 2) ? )
           s))
 

           (warn "`+doom-dashboard-pwd-policy' has an invalid value of '%s'"
                 +doom-dashboard-pwd-policy)))))

(defun +doom-dashboard-reload (&optional force)
  "Update the DOOM scratch buffer (or create it, if it doesn't exist)."
  (let ((fallback-buffer (doom-fallback-buffer)))
    (when (or force
              (and (get-buffer-window fallback-buffer)
                   (not (window-minibuffer-p (frame-selected-window)))))
      (with-current-buffer fallback-buffer
        (setq default-directory
              (or (+doom-dashboard--get-pwd)
                  default-directory))
        (unless +doom-dashboard-inhibit-refresh
          (with-silent-modifications
            (unless (eq major-mode '+doom-dashboard-mode)
              (+doom-dashboard-mode))
            (erase-buffer)
            (let ((+doom-dashboard--height (window-height (get-buffer-window fallback-buffer)))
                  (lines 1)
                  content)
              (with-temp-buffer
                (dolist (widget-name +doom-dashboard-widgets)
                  (funcall (intern (format "doom-dashboard-widget--%s" widget-name)))
                  (insert "\n"))
                (setq content (buffer-string)
                      lines (count-lines (point-min) (point-max))))
              (insert (make-string (max 0 (- (/ +doom-dashboard--height 2)
                                             (/ lines 2)))
                                   ?\n)
                      content))
            (unless (button-at (point))
              (goto-char (next-button (point-min))))))))
    ;; Update all dashboard windows
    (dolist (win (get-buffer-window-list (doom-fallback-buffer) nil t))
      (set-window-fringes win 0 0)
      (set-window-margins
       win (max 0 (/ (- (window-total-width win) +doom-dashboard--width) 2)))))
  t)

;; widgets
(defun doom-dashboard-widget--banner ()
  (mapc (lambda (line)
          (insert (propertize (+doom-dashboard-center +doom-dashboard--width line)
                              'face 'font-lock-comment-face) " ")
          (insert "\n"))
        '("=================     ===============     ===============   ========  ========"

    'face 'font-lock-comment-face)
   "\n"))

(defun doom-dashboard-widget--shortmenu ()
  (let ((all-the-icons-scale-factor 1.45)
        (all-the-icons-default-adjust -0.02))
