Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As far as I know, Dired and Dired+ work better by default (give better color contrast) on color themes with clear backgrounds. I know I can customize face colors on Dired+ for Emacs manually using M-x customize-face, but this can be tedious when customizing multiple faces one by one.

Given this, I was wondering if anybody knows of a code snippet that automatically customizes those faces that don't work well on dark themes such as Zenburn or Tango.

I am mostly interested on a solution for Dired+, but I wonder if a solution exists for Bookmarks+ too.

share|improve this question
up vote 1 down vote accepted

Make sure that the background-mode frame parameter of your frames is set correctly (to dark).

(add-to-list 'default-frame-alist '(background-mode . dark))

This may not be enough as some modes use additional faces whose default value doesn't depend on default-frame-alist. After you've done that, use list-faces-display to see what faces have poor contrast, and add lines like these to your .emacs:

(set-face-background 'something-face "SomeDarkColor")
(set-face-foreground 'something-face "SomeLightColor")
share|improve this answer
How can I apply my main color theme, monokai, to dired+ buffers? – mcandre Mar 28 '13 at 19:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.