doomemacs/modules/ui/doom-modeline
Henrik Lissner 09cb4f6716
Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
..
autoload.el ui/doom-modeline: adjust bars when height/width is changed 2018-05-04 15:12:44 +02:00
config.el Major refactor & optimization of how modules load their packages 2018-05-25 00:46:16 +02:00
packages.el Anzu mode made right. 2018-05-03 21:23:35 +02:00
README.org [develop] Fix links. 2018-04-17 20:59:59 -07:00

:ui doom-modeline

This module customizes the Emacs mode-line.

The DOOM modeline was designed for minimalism, and offers:

  • A match count panel (for evil-search, iedit and evil-substitute)
  • An indicator for recording a macro
  • Local python/ruby version in the major-mode
  • A customizable mode-line height (see +doom-modeline-height)
  • An error/warning count segment for flycheck

/screenshots/ml.png /screenshots/ml-search.png /screenshots/ml-subst.png /screenshots/ml-macro.png /screenshots/ml-version.png /screenshots/ml-errors.png

Install

This module requires the fonts included with all-the-icons to be installed.

Run M-x all-the-icons-install-fonts to do so.

Extracting my modeline

Some might want my modeline without the DOOM config altogether. I've tried to make this easier for you, but there are a few things you'll need to do:

  • Ensure projectile and all-the-icons are installed.
  • Ensure projectile-mode is enabled.
  • Ensure the fonts included with all-the-icons are installed (M-x all-the-icons-install-fonts).
  • Replace def-package! calls with use-package.
  • Replace doom-project-root calls with projectile-project-root.
  • The +doom-modeline--make-xpm function is memoized with the def-memoized! macro. Change def-memoized! to defun.
  • Copy the add-hook! macro definition from core/core-lib.el.
  • Copy the following macros and functions from core/core-ui.el:

    • def-modeline-segment!
    • def-modeline!
    • doom--prepare-modeline-segments
    • doom-modeline
    • doom-set-modeline

That should be everything. As I have never used this out of my config I can't guarantee immediate success, but I'd be happy to help you out if you file an issue.

Troubleshooting

Where are my minor modes?

I didn't need it, so I removed it. Run M-x doom/what-minor-mode to investigate what minor modes are currently active.