4

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?

NickD
  • 29,717
  • 3
  • 27
  • 44
Wizard
  • 1,251
  • 6
  • 17

1 Answers1

6

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.

Tobias
  • 33,167
  • 1
  • 37
  • 77
  • 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 '21 at 19:14