         (buffer-file-truename (or buffer-file-truename "")))
     (propertize
      (pcase +doom-modeline-buffer-file-name-style
-       ('truncate-upto-project (+doom-modeline--buffer-file-name 'shrink))
-       ('truncate-upto-root (+doom-modeline--buffer-file-name-truncate))
-       ('truncate-all (+doom-modeline--buffer-file-name-truncate t))
-       ('relative-to-project (+doom-modeline--buffer-file-name-relative))
-       ('relative-from-project (+doom-modeline--buffer-file-name-relative 'include-project))
-       ('file-name (propertize (file-name-nondirectory buffer-file-name)
+       (`truncate-upto-project (+doom-modeline--buffer-file-name 'shrink))
+       (`truncate-upto-root (+doom-modeline--buffer-file-name-truncate))
+       (`truncate-all (+doom-modeline--buffer-file-name-truncate t))
+       (`relative-to-project (+doom-modeline--buffer-file-name-relative))
+       (`relative-from-project (+doom-modeline--buffer-file-name-relative 'include-project))
+       (`file-name (propertize (file-name-nondirectory buffer-file-name)
                                'face
                                (let ((face (or (and (buffer-modified-p)
                                                     'doom-modeline-buffer-modified)

(defsubst active ()
  (eq (selected-window) +doom-modeline-current-window))

;; Inspired from `powerline's `pl/make-xpm'.
(defun +doom-modeline--make-xpm (face width height)
  "Create an XPM bitmap."
  (propertize
   " " 'display
   (let ((data (make-list height (make-list width 1)))

;; Bootstrap
;;

(doom-set-modeline 'main t) ; set default modeline

(add-hook 'doom-init-theme-hook #'+doom-modeline|init)
(add-hook 'doom-scratch-buffer-hook #'+doom-modeline|set-special-modeline)
