                 mode-line-format)))
     (let ((old-pwd (or dir default-directory)))
       (with-current-buffer (doom-fallback-buffer)
+        (read-only-mode -1)
         (+doom-dashboard-mode)
-        (add-hook 'evil-insert-state-entry-hook #'+doom-dashboard|clear-on-insert nil t)
-        (add-hook 'after-change-major-mode-hook #'+doom-dashboard|clear-on-insert nil t)
+        ;; (add-hook 'evil-insert-state-entry-hook #'+doom-dashboard|clear-on-insert nil t)
+        ;; (add-hook 'after-change-major-mode-hook #'+doom-dashboard|clear-on-insert nil t)
         (setq +doom-dashboard-edited-p nil
               fringe-indicator-alist (mapcar (lambda (i) (cons (car i) nil))
                                              fringe-indicator-alist))
-
         (erase-buffer)
         (let* ((+doom-dashboard--width  (window-width (get-buffer-window (doom-fallback-buffer))))
                (+doom-dashboard--height (window-height (get-buffer-window (doom-fallback-buffer)))))

(defvar +doom-dashboard--height 0)
(defvar +doom-dashboard--old-fringe-indicator fringe-indicator-alist)



(def-package! all-the-icons :when (display-graphic-p))

  (let ((all-the-icons-scale-factor 1.3)
        (all-the-icons-default-adjust -0.05)
        (start (point))
        (last-session-p (and (and (featurep 'persp-mode) persp-mode)
                             (file-exists-p (expand-file-name persp-auto-save-fname persp-save-dir)))))
    (mapc (lambda (btn)
            (when btn
              (let ((label (car btn))
                    (icon (nth 1 btn))
                    (fn (nth 2 btn)))
                (insert
                 (with-temp-buffer
                   (insert-text-button
                    (concat (all-the-icons-octicon
                             icon
                             :face 'font-lock-keyword-face)
                            (propertize (concat " " label) 'face 'font-lock-keyword-face))
                    'action fn
                    'follow-link t)
                   (s-center (1- +doom-dashboard--width) (buffer-string))))
                (insert "\n\n"))))
          `(("Homepage" "mark-github"
             (lambda (_) (browse-url "https://github.com/hlissner/.emacs.d")))
            ,(when last-session-p
               '("Reload last session" "history"
                 (lambda (_) (+workspace:load-session))))
            ("Recently opened files" "file-text"
             (lambda (_) (call-interactively (command-remapping 'recentf))))
            ("Recent opened projects" "briefcase"
             (lambda (_) (call-interactively (command-remapping 'projectile-switch-project))))
            ("Jump to bookmark" "bookmark"
             (lambda (_) (call-interactively (command-remapping 'bookmark-jump))))
            ("Edit emacs.d" "tools"
             (lambda (_) (find-file (expand-file-name "init.el" doom-emacs-dir))))))))
