Emacs 24: Mode-Line Style
Asked Answered
C

1

7

I am trying to change the styling of the modeline in emacs 24.

I want to add an overline and an underline. Underline works fine, but overline is not working for some reason. Here is my code so far (added to .emacs):

(set-face-attribute 'mode-line nil
   :foreground "gray0"
   :background "cyan"
   :overline "cyan"
   :underline "cyan")

Any ideas on how to get the overline working?

Also is there a way to set the distance between the borders and text?

Thanks

Calumnious answered 26/5, 2013 at 20:25 Comment(5)
For me it is working? I did change the background color to grey, otherwise I was not able to see the overline and underline anyway.Foreworn
The underline appears to be within the background color actually.Foreworn
It seems to me that the color of underline/overlines is being the determined by the color provided by ':background' even though it should take a string value if provided so that is another issue. But whatever I set the ':background' to no change. I am currently using the solarized theme if that is worth mentioning!Calumnious
Try testing without using any theme, first. FWIW, it works for me. I customize option mode-line-buffer-id to use a spec like this: ((t (:overline "red" :underline "red"))), so the buffer name (only) has both overline and underline.Croy
Can you use both overline and underline at the same time? Perhaps just use a box instead and set the border to your liking.Flame
B
1

If I remember correctly, the default mode-line spec has a non-nil :box spec, so it might solve your problem to add the line :box nil to your code listed above.

Biflagellate answered 14/12, 2013 at 17:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.