       (f-filename buffer-file-name)
     (s-trim-left (format-mode-line "%b"))))
 
-(defun *buffer-pwd ()
+(defun *buffer-project ()
   "Displays `default-directory', for special buffers like the scratch buffer."
   (concat
+   " "
    (all-the-icons-octicon
     "file-directory"
     :face 'doom-modeline-alternate :v-adjust -0.05 :height 1.3)

(defvar-local doom-ml--env-command nil)

;; So the mode-line can keep track of "the current window"
(defvar mode-line-selected-window nil)
(defun doom|set-selected-window (&rest _)
  (let ((window (frame-selected-window)))
    (when (and (windowp window)
               (not (minibuffer-window-active-p window)))
      (setq mode-line-selected-window window))))
(add-hook 'window-configuration-change-hook #'doom|set-selected-window)
(add-hook 'focus-in-hook #'doom|set-selected-window)
(advice-add 'select-window :after 'doom|set-selected-window)

                      (when (string-suffix-p "/" output)
                        (setq output (substring output 0 -1)))
                      output)
                  buffer-path))))))

(defun *buffer-name ()
  "The buffer's base name or id."
