   (when buffer-file-name
     (propertize
      (f-dirname
-      (let ((buffer-path (file-relative-name buffer-file-name (doom/project-root)))
+      (let ((buffer-path (file-relative-name buffer-file-name (projectile-project-root)))
             (max-length (truncate (/ (window-body-width) 1.75))))
         (concat (projectile-project-name) "/"
                 (if (> (length buffer-path) max-length)

;; Where (py|rb)env version strings will be stored
(defvar-local doom-ml--env-version nil)
(defvar-local doom-ml--env-command nil)

;; Make certain unicode glyphs bigger for the mode-line.
;; FIXME Replace with all-the-icons?
(doom-fix-unicode '("DejaVu Sans Mono" 15) ?✱) ;; modified symbol
(let ((font "DejaVu Sans Mono for Powerline"))
  (doom-fix-unicode (list font 12) ?)  ;; git symbol
  (doom-fix-unicode (list font 16) ?∄)  ;; non-existent-file symbol
  (doom-fix-unicode (list font 15) ?)) ;; read-only symbol

;; So the mode-line can keep track of "the current window"
(defvar mode-line-selected-window nil)

              (- length (-elem-index this-oc iedit-occurrences-overlays))
            "-"))
        length))
     'face (if active 'doom-modeline-count))))

(defun *buffer-position ()
  "A more vim-like buffer position."
  (let ((start (window-start))
        (end (window-end))
        (pend (point-max)))
    (propertize
     (concat
      " %l:%c :"
      (if (and (= start 1)
               (= end pend))
          "All"
        (cond ((= start 1) "Top")
              ((= end pend) "Bot")
              (t (format "%d%%%%" (/ end 0.01 pend))))))
     'face (if active 'doom-modeline-alternate))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun doom-mode-line (&optional id)
  `(:eval
    (let* ((active (eq (selected-window) mode-line-selected-window))
           (lhs (list (propertize " "
                                  'display
                                  (pl/percent-xpm doom-modeline-height 100 0 100 0 3
                                                  (face-attribute (if active 'doom-modeline-bar 'doom-modeline-inactive-bar) :background nil t)
                                                  nil))
                      (*macro-recording)
                      (*selection-info)
                      (*anzu)
                      (*evil-substitute)
                      (*iedit)
                      " "
                      ,(if (eq id 'scratch)
                           '(*buffer-pwd)
                         '(list (*buffer-path) (*buffer-name) " "))
                      (*buffer-state)
                      (*flycheck)))
           (rhs (list (*buffer-encoding-abbrev)
                      (*vc)
                      (*major-mode)
                      (*buffer-position)))
           (middle (propertize
                    " " 'display `((space :align-to (- (+ right right-fringe right-margin)
                                                       ,(1+ (string-width (format-mode-line rhs)))))))))
