auto-dim-other-buffers.el
You might want to take a look at auto-dim-other-buffers.el
, available from MELPA.
The auto-dim-other-buffers-mode
is a global minor mode which makes
non-current buffer less prominent making it more apparent which window
has a focus.
The preferred way to install the mode is by installing a package from
MELPA:
M-x package-install RET auto-dim-other-buffers RET
Once installed, the mode can be turned on (globally) with:
M-x auto-dim-other-buffers-mode RET
To make the mode enabled every time Emacs starts, add the following to
Emacs initialisation file (~/.emacs
or ~/.emacs.d/init.el
):
(add-hook 'after-init-hook (lambda ()
(when (fboundp 'auto-dim-other-buffers-mode)
(auto-dim-other-buffers-mode t))))
To configure how dimmed buffers look like, customise
auto-dim-other-buffers-face
. This can be accomplished by:
M-x customize-face RET auto-dim-other-buffers-face RET
The auto-dim-other-buffers-mode
is a global minor mode which makes
non-current buffer less prominent making it more apparent which window
has a focus.
For a given active window, all other windows that does not show the same buffer will be set to a custom background. I.e., active window and other windows showing the same buffer will have a background color that differs from the rest of the windows. I believe this last part is the specific behaviour you are looking for, based on your comment to the accepted answer.
"Thank you very much. This is very close to what I want. Except for the
fact that having two windows opening the same buffer cause both
windows to be marked as 'inactive'. It's not super important, but is
there an easy way to resolve this?"