The text in my modeline fits exactly in the modeline, I would like to have some more padding above and below the text, couldn't find an option for it and don't know much about text properties in Emacs. How can I achieve that?
You can customize the
:box attribute of the
mode-line-face. From the documentation (C-h
VALUE specifies whether characters in FACE should have a box drawn around them. If VALUE is nil, explicitly don't draw boxes. If VALUE is t, draw a box with lines of width 1 in the foreground color of the face. If VALUE is a string, the string must be a color name, and the box is drawn in that color with a line width of 1. Otherwise, VALUE must be a property list of the form `(:line-width WIDTH :color COLOR :style STYLE)'. If a keyword/value pair is missing from the property list, a default value will be used for the value, as specified below. WIDTH specifies the width of the lines to draw; it defaults to 1.
So that following should give you the padding you want
(set-face-attribute 'mode-line nil :box '(:line-width 3))
You might also want to give a certain background to the box, you can do that by specifying the
:color property to the
:box property something like below
(set-face-attribute 'mode-line nil :box '(:line-width 6 :color "gray20"))
Credits: I got this trick from Amit Patel's blog