1

Windows 10, Emacs 25.1

Here my mode line with 3 windows.

enter image description here

As you can see the mode line for active window (text.html) has more lighter color. And two another non active windows has more darker color for mode line.

Now, I want to try package smart-mode-line: https://github.com/Malabarba/smart-mode-line

Is a possible to have different colors mode-lines for active and non active windows? I want to set my custom colors for active and non active mode-lines.

  • Those mode-line colors are controlled by faces mode-line and mode-line-inactive. If smart-mode-line overrides these faces, i.e., if it does not respect your customization of them, then consider filing a bug report / enhancement request with the smart-mode-line maintainer. If it does respect your customizations then just customize those faces, usingM-x customize-face. – Drew Sep 11 '17 at 14:16
  • It looks like smart-mode-line wants you to use its own function to customize mode-line faces: sml/customize-faces. – Drew Sep 11 '17 at 14:18
  • mode-line and mode-line-inactive - this what I need. Thank you. – user8542613 Sep 11 '17 at 16:45
3

Those mode-line colors are normally controlled by faces mode-line and mode-line-inactive.

It looks like smart-mode-line might want you to use its own function to customize mode-line faces: sml/customize-faces. It may not respect / make use of the standard faces mode-line and mode-line-inactive.

The code of smart-mode-line.el has this comment:

;;  5. **Very easy to configure**:
;;     All colors and variables are customizable. You can change the
;;     whole theme with `sml/apply-theme', or just customize anything
;;     manually with `sml/customize' and `sml/customize-faces'. There are
;;     *DOZENS* of variables to customize your mode-line, just pop over
;;     there and have a look!

So try M-x sml/customize-faces.

And the doc string for Customize group smart-mode-line-faces says this:

Note that, by default, smart-mode-line overrides your theme's settings for the background and foreground color of the modeline face. We need to override, otherwise some elements become unreadable on lighter themes. If you'd rather configure these unreadable colors yourself and keep your theme's settings, just set sml/override-theme to nil.

So try setting sml/override-theme to nil, as another alternative.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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