Emacs mode line color custimization
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.
Related posts
- Colorized, interactive "git blame" in Emacs: vc-annotate — posted 2011-05-28
- My Emacs Python environment — posted 2010-05-10
- Emacs espresso-mode for jQuery — posted 2010-03-10
- Notes on C++ development with Emacs on Ubuntu Linux — posted 2009-07-08
- Creating remote server nicknames with .ssh/config — posted 2008-11-20
- Emacs notes — posted 2008-11-03
7
Comments
—
Comments feed for this post
#3 yung choi commented on 2008-10-27:
How can I set the custom color for the modeline of the non-active window? My non-active window's modeline is same color as that of text buffer. So it is hard to distinguish it when I do ediff. Thank you for any help, - yung
#4 Eliot commented on 2008-10-27:
Yung, I actually would like to know how to do this as well. If you figure it out, please let me know.
#5 tapio commented on 2009-01-12:
Maybe 'modeline-inactive is what you should use? For emacs 22.2.1 my .emacs contains:
;; see http://www.gnu.org/software/emacs/manual/html_node/emacs/Standard-Faces.html
(set-face-background 'modeline "#4466aa")
(set-face-background 'modeline-inactive "#99aaff")
(set-face-background 'fringe "#809088")
Post a comment
About
I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »
Search Blog
Tags
-
algorithms
(5)
-
aws
(9)
-
blogproject
(20)
-
c_cplusplus
(12)
-
cardstore
(8)
-
colinux
(2)
-
concurrency
(13)
-
conkeror
(2)
-
core
(2)
-
cygwin
(17)
-
datastructures
(14)
-
datetime
(4)
-
decorators
(4)
-
django
(40)
-
emacs
(22)
-
files_directories
(11)
-
git
(5)
-
hardware
(5)
-
install_setup
(8)
-
javascript
(3)
-
keyboard
(9)
-
matplotlib
(5)
-
mercurial
(4)
-
nginx
(2)
-
persistence
(5)
-
preferences
(7)
-
processes
(4)
-
pyqt
(18)
-
python
(144)
-
ratpoison
(3)
-
regexes
(6)
-
rsync
(3)
-
softwaretools
(17)
-
sql
(14)
-
ssh
(10)
-
subversion
(6)
-
twisted
(7)
-
ubuntu
(65)
-
urxvt
(5)
-
vxworks
(25)
-
webdev
(5)
-
wmii
(7)
Blogroll
- Adam Gomaa
- Alex Clemesha
- Amir Salihefendic
- Armin Ronacher
- David Beazley
- David Ziegler
- Duncan McGreggor
- Gareth Rushgrave
- Glyph Lefkowitz
- Guido van Rossum
- Ian Bicking
- Jacob Kaplan-Moss
- James Bennett
- James Tauber
- Jesper Noehr
- Marty Alchin
- Matt Harrison
- Nikolay Kolev
- Parand Darugar
- Peter Baumgartner
- Peter Bengtsson
- Rob Hudson
- Simon Willison
- Will McGugan
#1 Rich commented on 2008-05-17:
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!