2

My main font doesn't render the minor modes glyphs correctly, they are smaller, so I wanted to force the glyphs of the minor modes list to use the default source code pro font which renders them at the right height, without changing the font of the entire modeline.

see here, minor modes are unaligned and smaller than they should be

enter image description here

1

The mode-line can become rather complex -- e.g., powerline, etc. Answering a mode-line question is somewhat like opening a "Pandora's Box" due to the seemingly endless combinations users may have in their own setup.

This answer only deals with the minor-mode-alist component -- the lighters are green and the mouse-over is red. The 'face property can be changed to whatever components are supported -- e.g., :foreground "yellow" :family "Times" :height 180, etc.

(setq mode-line-format (list
    `(:propertize ("" minor-mode-alist)
      face '(:foreground "green")
      mouse-face '(:foreground "red")
      help-echo "Minor mode\n\
mouse-1: Display minor mode menu\n\
mouse-2: Show help for minor mode\n\
mouse-3: Toggle minor modes"
      local-map ,mode-line-minor-mode-keymap)))

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.