Closed jschaf closed 8 years ago
Use set-face-background
to change background colour of a face. You also won’t need to call any of the adob--*
private functions.
Awesome, works like a charm. Here's the working code if anyone else stumbles onto this.
(defun my:reset-auto-dim-face (&rest args)
"Adjust `auto-dim-other-buffers-face' to the current background color.
ARGs is unused and are only for when this function is used as advice."
(interactive)
(let* ((percent-to-darken 3.5)
(current-background-color (face-background 'default))
(new-auto-dim-background-color
(color-darken-name current-background-color percent-to-darken)))
(set-face-background 'auto-dim-other-buffers-face
new-auto-dim-background-color)))
(add-hook 'after-init-hook #'auto-dim-other-buffers-mode)
(add-hook 'after-init-hook #'my:reset-auto-dim-face)
(advice-add 'load-theme :after 'my:reset-auto-dim-face)
Hi,
I'm having a bunch of trouble trying to change the auto-dim-other-buffers-face when the theme changes. The new face to remap
default
doesn't seem to get changed. When I start emacs, I expect the other buffers to be slightly dimmed (3.5%) compared to the background. Instead, they are the default black color.I can't figure out why the color isn't changing. Any ideas?