          (doom-modeline-spc)))))
   ;;;; Custom modeline definitions
   ;; Default mode line
-  (doom-modeline-def-modeline 'danylo/mode-line
+  (doom-modeline-def-modeline 'main
     '(bar window-number danylo/matches buffer-info remote-host buffer-position selection-info)
     '(danylo/mu4e input-method debug lsp major-mode danylo/vcs process))
-  (add-hook 'doom-modeline-mode-hook
-            (lambda ()
-              (doom-modeline-set-modeline 'danylo/mode-line 'default)
-              (when (bound-and-true-p doom-modeline-mode)
-                (doom-modeline-set-modeline 'danylo/mode-line))))
   ;; Helm mode line
   (doom-modeline-def-modeline 'helm
     '(bar window-number helm-buffer-id helm-number helm-follow helm-prefix-argument) '())

    recentf-mode
    electric-pair-mode
    helm-mode
    google-this-mode)
  "Emacs minor modes that I whitelist for being performant enough.")

(defvar danylo/mode-list-cache '()

  ;; Messages and scratch buffer mode line
  (doom-modeline-def-modeline 'danylo/bare-modeline
    '(bar window-number window-number buffer-info-simple) '(danylo/mu4e))
  ;;;; Set modeline
  (add-hook 'after-init-hook 'doom-modeline-mode)
  (add-hook 'doom-modeline-mode-hook
            (lambda ()
              (when (bound-and-true-p doom-modeline-mode)
                (danylo/doom-modeline-set-special))
              (force-mode-line-update t)))
  )

(defun danylo/doom-modeline-set-special ()
  "Set the doom modeline for special buffers."
  (dolist (bname '("*Messages*"))
    (if (buffer-live-p (get-buffer bname))
        (with-current-buffer bname
          (doom-modeline-set-modeline 'danylo/bare-modeline)))))

(defun danylo/doom-modeline-multiple-cursors ()
  "Show the number of multiple cursors."
