aboutsummaryrefslogtreecommitdiff
path: root/modules/auto-dim-config.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-25 11:54:39 -0500
committerCraig Jennings <c@cjennings.net>2026-05-25 11:54:39 -0500
commit32cfe216b4f5917b1a979e0372edf9b8f1ab62ea (patch)
tree7fe70b4d8a120dd8402d19faa3546f388d8e17cf /modules/auto-dim-config.el
parent56da3d940b26a51102bce39b3b82dfbbc2b391fd (diff)
downloaddotemacs-32cfe216b4f5917b1a979e0372edf9b8f1ab62ea.tar.gz
dotemacs-32cfe216b4f5917b1a979e0372edf9b8f1ab62ea.zip
fix(theme): register dupre faces so org status colors are themed
The dupre theme defined its own faces (dupre-accent, the headings, and the org status faces) only through custom-theme-set-faces, never defface. That leaves them unregistered, so they render through :inherit but silently fail when applied directly as a text property. org-todo-keyword-faces and org-priority-faces apply faces that way, so the org keyword and priority colors never showed as dupre tones. I added a defface registration block to dupre-faces.el for all of dupre's own faces, so they're real faces. The theme still sets their colors. Then I pointed org-todo-keyword-faces and org-priority-faces (in org-config.el) at named dupre-org-* faces, each the closest palette color to its former hard-coded name, and gave each a dimmed variant that auto-dim-config.el swaps in for unfocused windows. A keyword in a dimmed window now shows a darker shade of its own color rather than flat gray or full brightness. A regression test asserts dupre's faces stay registered, since that was the latent bug behind all of this.
Diffstat (limited to 'modules/auto-dim-config.el')
-rw-r--r--modules/auto-dim-config.el18
1 files changed, 17 insertions, 1 deletions
diff --git a/modules/auto-dim-config.el b/modules/auto-dim-config.el
index 83c5b17c..5ce426d2 100644
--- a/modules/auto-dim-config.el
+++ b/modules/auto-dim-config.el
@@ -54,7 +54,23 @@
(font-lock-constant-face . (auto-dim-other-buffers . nil))
(font-lock-builtin-face . (auto-dim-other-buffers . nil))
(font-lock-preprocessor-face . (auto-dim-other-buffers . nil))
- (font-lock-warning-face . (auto-dim-other-buffers . nil))))
+ (font-lock-warning-face . (auto-dim-other-buffers . nil))
+ ;; Org TODO-keyword + priority faces dim to their own -dim variant
+ ;; (a darker shade of the same colour) rather than the flat gray, so
+ ;; a dimmed window's keywords stay recognizable. Faces are defined
+ ;; in themes/dupre-faces.el and wired in modules/org-config.el.
+ (dupre-org-todo . (dupre-org-todo-dim . nil))
+ (dupre-org-project . (dupre-org-project-dim . nil))
+ (dupre-org-doing . (dupre-org-doing-dim . nil))
+ (dupre-org-waiting . (dupre-org-waiting-dim . nil))
+ (dupre-org-verify . (dupre-org-verify-dim . nil))
+ (dupre-org-stalled . (dupre-org-stalled-dim . nil))
+ (dupre-org-failed . (dupre-org-failed-dim . nil))
+ (dupre-org-done . (dupre-org-done-dim . nil))
+ (dupre-org-priority-a . (dupre-org-priority-a-dim . nil))
+ (dupre-org-priority-b . (dupre-org-priority-b-dim . nil))
+ (dupre-org-priority-c . (dupre-org-priority-c-dim . nil))
+ (dupre-org-priority-d . (dupre-org-priority-d-dim . nil))))
(auto-dim-other-buffers-mode 1))
(provide 'auto-dim-config)