Emacs mode line color custimization



This is my OLD blog. I've copied this post over to my NEW blog at:

http://www.saltycrane.com/blog/2007/10/emacs-mode-line-color-custimization/

You should be redirected in 2 seconds.



If you have more than one window in your emacs session, it's nice to make the active window stand out by changing the color of the mode line. In my standard Windows emacs installation, the active window's mode line is gray and the inactive window's is light grey. This makes it difficult to distinguish which window is active. By adding the following line to your .emacs file, you can make the active window's mode line blue instead of gray.

(set-face-background 'modeline "#4477aa")

It'd be nice if I could make a thin blue border surrounding the window like in Eclipse, but I couldn't figure out how to do that. The commented-out lines in the screenshot didn't do the trick.

2 comments:

Rich said...

Ahh, thanks for this. Somehow an upgrade of ubuntu caused the active modeline and active modeline's text to be the same color... couldn't see anything. So, thanks for helping me fix that!

Windsor Schmidt said...

Thanks, this did the trick for me!

About

This is my *OLD* blog. I've copied all of my posts and comments over to my NEW blog at:

http://www.saltycrane.com/blog/.

Please go there for my updated posts. I will leave this blog up for a short time, but eventually plan to delete it. Thanks for reading.