The source code is on github: https://github.com/sdegutis/auto-dim-other-buffers.el

Window overlays seem inefficient here, given this line in the docs: "due to a different implementation, overlays generally don't scale well (many operations take a time that is proportional to the number of overlays in the buffer)" and the following recommendation to avoid them when dealing with "the visual appearance of many portions of the buffer". I don't quite know if that applies here since I'm actually affecting the entire portion of every buffer extremely often. I would assume so.

Then again, I don't really know elisp. And I only just started using emacs a few months ago. So who knows, maybe I'm way off.

-Steven


On Wed, Apr 3, 2013 at 8:03 AM, Michael Heerdegen <michael_heerdegen@web.de> wrote:
Steven Degutis <sbdegutis@gmail.com> writes:

> Originally I wanted to make it change the face per-window, so I could
> easily know which window I'm editing in. I even named it
> auto-dim-other-windows at first.
>
> Then I realized emacs only allows us to set per-buffer faces. It
> doesn't allow us to set per-window faces. Please file a bug asking
> for the feature to set per-window faces. For now, this is the best we
> can do with what emacs gives us.

You can use the `window' overlay property for that - see (elisp) Overlay
Properties.

Apropos color: To get a dim color that is always derived live from the
current background color, you can (optionally) use "hexrgb" by Drew
Adam's for color transformation.  I can help with the coding if you are
interested.


Regards,

Michael.