I installed doom-emacs and modeline displayed as

enter image description here

How could I place the time 10:55 AM in the beginning, since if more windows are opened and arranged horizontally, the directory names are long enough to push "displayed time" out of view?

1 Answer 1


You can re-define the main mode line with doom-modeline-def-modeline. The first argument is the mode line type, the second argument is the left-hand segment list, and the third argument is the right-hand segment list.

Shift the misc-info entry from the right-hand segment list to the beginning of the left-hand segment list.

With the current version of the main mode line you get after this modification:

(with-eval-after-load "doom-modeline"
  (doom-modeline-def-modeline 'main
  '(misc-info bar workspace-name window-number modals matches buffer-info remote-host buffer-position word-count parrot selection-info)
  '(objed-state persp-name battery grip irc mu4e gnus github debug lsp minor-modes input-method indent-info buffer-encoding major-mode process vcs checker)))

Tested with emacs 26.3 and doom-modeline-20200110.440.

Disclaimer: I do not use doom-modeline. That is just what I got in a couple of minutes. Maybe, there is another way to re-configure doom-modeline.

  • I found the implicit "take-a-look-at-the-source" above to be on the money -- the doom-modeline source is pretty readable and informative.
    – dat
    Apr 27, 2021 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.