   "Face used for the dirname part of the buffer path."
   :group '+doom-modeline)
 
-(defface doom-modeline-buffer-project
-  '((t (:inherit doom-modeline-buffer-path :bold nil)))
+(defface doom-modeline-buffer-file
+  '((t (:inherit doom-modeline-buffer-path)))
   "Face used for the filename part of the mode-line buffer path."
   :group '+doom-modeline)
 

                          data))))
        'xpm t :ascent 'center)))))

(defun +doom-modeline--buffer-path ()
  "Displays the buffer's full path relative to the project root (includes the
project root). Excludes the file basename. See `doom-buffer-name' for that."
  (if buffer-file-name
      (let* ((default-directory (file-name-directory buffer-file-name))
             (buffer-path (file-relative-name buffer-file-name (doom-project-root))))
        (when (and buffer-path (not (equal buffer-path ".")))
          (let ((max-length (truncate (* (window-body-width) 0.4))))
            (if (> (length buffer-path) max-length)
                (let ((path (nreverse (split-string buffer-path "/" t)))
                      (output ""))
                  (when (and path (equal "" (car path)))
                    (setq path (cdr path)))
                  (while (and path (<= (length output) (- max-length 4)))
                    (setq output (concat (car path) "/" output))
                    (setq path (cdr path)))
                  (when path
                    (setq output (concat "../" output)))
                  (when (string-suffix-p "/" output)
                    (setq output (substring output 0 -1)))
                  output)
              buffer-path))))
    "%b"))


;;

(def-modeline-segment! buffer-project
  "Displays `doom-project-root'. This is for special buffers like the scratch
buffer where knowing the current project directory is important."
  (let ((face (if (active) 'doom-modeline-buffer-path)))
    (concat (all-the-icons-octicon
             "file-directory"
             :face face
