diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-25 12:36:03 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-25 12:36:03 -0400 |
| commit | 439fb0e65fcf341b9f0b92c47f8aebe138bcb9e5 (patch) | |
| tree | d52dca9be96825cd808f642a1d3976fcc8dee1a2 /modules | |
| parent | 0ac6d798b48a7d075a7da4485832990872d09152 (diff) | |
| download | dotemacs-439fb0e65fcf341b9f0b92c47f8aebe138bcb9e5.tar.gz dotemacs-439fb0e65fcf341b9f0b92c47f8aebe138bcb9e5.zip | |
refactor: strip all literal colors from config modules
Remove every hardcoded color from the config so nothing assigns a non-themeable value. Stripped: the org-faces defface defaults (28 hex foregrounds, which the theme overrides at runtime anyway), the hl-todo keyword colors, the eshell prompt gray/white, the org-noter and music active-window #1d1b19 bg tint (face-remap is now a no-op), the pdf-view midnight palette, and the calibredb/nov epub sepia. The config now renders with default/theme faces, which surfaces where theming support is missing. Those gaps are tracked in todo.org as the next phase. 0 hex colors remain; validate-modules clean and the org-faces/build-theme/face-diagnostic tests pass.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/calibredb-epub-config.el | 10 | ||||
| -rw-r--r-- | modules/eshell-config.el | 10 | ||||
| -rw-r--r-- | modules/music-config.el | 2 | ||||
| -rw-r--r-- | modules/org-faces-config.el | 56 | ||||
| -rw-r--r-- | modules/org-noter-config.el | 2 | ||||
| -rw-r--r-- | modules/pdf-config.el | 1 | ||||
| -rw-r--r-- | modules/prog-general.el | 11 |
7 files changed, 41 insertions, 51 deletions
diff --git a/modules/calibredb-epub-config.el b/modules/calibredb-epub-config.el index 6c69ca0e8..1e6437d26 100644 --- a/modules/calibredb-epub-config.el +++ b/modules/calibredb-epub-config.el @@ -313,11 +313,11 @@ A positive DELTA narrows the text column; a negative DELTA widens it." "Apply preferences after nov-mode has launched." (interactive) ;; Use Merriweather for comfortable reading with appropriate scaling. - ;; Darker sepia color (#E8DCC0) is easier on the eyes than pure white. - (let ((sepia "#E8DCC0")) - (face-remap-add-relative 'variable-pitch :family "Merriweather" :height 1.0 :foreground sepia) - (face-remap-add-relative 'default :family "Merriweather" :height 180 :foreground sepia) - (face-remap-add-relative 'fixed-pitch :height 180 :foreground sepia)) + ;; (Reading fg color stripped; falls back to the theme default until a + ;; themeable reading face exists -- see todo.org.) + (face-remap-add-relative 'variable-pitch :family "Merriweather" :height 1.0) + (face-remap-add-relative 'default :family "Merriweather" :height 180) + (face-remap-add-relative 'fixed-pitch :height 180) ;; Enable visual-line-mode for proper text wrapping (visual-line-mode 1) ;; Set fill-column as a fallback diff --git a/modules/eshell-config.el b/modules/eshell-config.el index 723a7e61e..c2ec6d152 100644 --- a/modules/eshell-config.el +++ b/modules/eshell-config.el @@ -101,15 +101,15 @@ pairs where COMMAND is the `cd' string `eshell/alias' should run." (setq eshell-prompt-function (lambda () (concat - (propertize (format-time-string "[%d-%m-%y %T]") 'face '(:foreground "gray")) + (propertize (format-time-string "[%d-%m-%y %T]") 'face 'default) " " - (propertize (user-login-name) 'face '(:foreground "gray")) + (propertize (user-login-name) 'face 'default) " " - (propertize (system-name) 'face '(:foreground "gray")) + (propertize (system-name) 'face 'default) ":" - (propertize (abbreviate-file-name (eshell/pwd)) 'face '(:foreground "gray")) + (propertize (abbreviate-file-name (eshell/pwd)) 'face 'default) "\n" - (propertize "%" 'face '(:foreground "white")) + (propertize "%" 'face 'default) " "))) (add-hook diff --git a/modules/music-config.el b/modules/music-config.el index 0874c4982..76fff283b 100644 --- a/modules/music-config.el +++ b/modules/music-config.el @@ -824,7 +824,7 @@ For URL tracks: decoded URL." (cond ((and active (not cj/music--bg-remap-cookie)) (setq cj/music--bg-remap-cookie - (face-remap-add-relative 'default :background "#1d1b19"))) + (face-remap-add-relative 'default))) ((and (not active) cj/music--bg-remap-cookie) (face-remap-remove-relative cj/music--bg-remap-cookie) (setq cj/music--bg-remap-cookie nil))))))) diff --git a/modules/org-faces-config.el b/modules/org-faces-config.el index e0dfa83fd..dfbfe9d0d 100644 --- a/modules/org-faces-config.el +++ b/modules/org-faces-config.el @@ -35,72 +35,72 @@ ;; --------------------------- Keyword faces (focused) ------------------------- -(defface org-faces-todo '((t (:foreground "#8fbf73" :weight bold))) +(defface org-faces-todo '((t (:weight bold))) "Face for the TODO keyword." :group 'org-faces-config) -(defface org-faces-project '((t (:foreground "#7a9abe" :weight bold))) +(defface org-faces-project '((t (:weight bold))) "Face for the PROJECT keyword." :group 'org-faces-config) -(defface org-faces-doing '((t (:foreground "#e8c668" :weight bold))) +(defface org-faces-doing '((t (:weight bold))) "Face for the DOING keyword." :group 'org-faces-config) -(defface org-faces-waiting '((t (:foreground "#c9b08a" :weight bold))) +(defface org-faces-waiting '((t (:weight bold))) "Face for the WAITING keyword." :group 'org-faces-config) -(defface org-faces-verify '((t (:foreground "#d98a5a" :weight bold))) +(defface org-faces-verify '((t (:weight bold))) "Face for the VERIFY keyword." :group 'org-faces-config) -(defface org-faces-stalled '((t (:foreground "#9a8fb0" :weight bold))) +(defface org-faces-stalled '((t (:weight bold))) "Face for the STALLED keyword." :group 'org-faces-config) -(defface org-faces-delegated '((t (:foreground "#7fc0a8" :weight bold))) +(defface org-faces-delegated '((t (:weight bold))) "Face for the DELEGATED keyword." :group 'org-faces-config) -(defface org-faces-failed '((t (:foreground "#d05a5a" :weight bold))) +(defface org-faces-failed '((t (:weight bold))) "Face for the FAILED keyword." :group 'org-faces-config) -(defface org-faces-done '((t (:foreground "#6f7a82" :weight bold))) +(defface org-faces-done '((t (:weight bold))) "Face for the DONE keyword." :group 'org-faces-config) -(defface org-faces-cancelled '((t (:foreground "#6f7a82" :weight bold :strike-through t))) +(defface org-faces-cancelled '((t (:weight bold :strike-through t))) "Face for the CANCELLED keyword." :group 'org-faces-config) ;; -------------------------- Priority faces (focused) ------------------------- -(defface org-faces-priority-a '((t (:foreground "#7aa0d0" :weight bold))) +(defface org-faces-priority-a '((t (:weight bold))) "Face for the [#A] priority cookie." :group 'org-faces-config) -(defface org-faces-priority-b '((t (:foreground "#e8c668"))) +(defface org-faces-priority-b '((t ())) "Face for the [#B] priority cookie." :group 'org-faces-config) -(defface org-faces-priority-c '((t (:foreground "#8fbf73"))) +(defface org-faces-priority-c '((t ())) "Face for the [#C] priority cookie." :group 'org-faces-config) -(defface org-faces-priority-d '((t (:foreground "#8a8a8a"))) +(defface org-faces-priority-d '((t ())) "Face for the [#D] priority cookie." :group 'org-faces-config) ;; ----------------------------- Keyword faces (dim) --------------------------- ;; auto-dim-config.el remaps the focused faces above to these in non-selected ;; windows; a darker shade of the same hue keeps the keyword recognizable. -(defface org-faces-todo-dim '((t (:foreground "#5f7a4d" :weight bold))) +(defface org-faces-todo-dim '((t (:weight bold))) "Dimmed TODO keyword for non-selected windows." :group 'org-faces-config) -(defface org-faces-project-dim '((t (:foreground "#4f6680" :weight bold))) +(defface org-faces-project-dim '((t (:weight bold))) "Dimmed PROJECT keyword for non-selected windows." :group 'org-faces-config) -(defface org-faces-doing-dim '((t (:foreground "#9a8544" :weight bold))) +(defface org-faces-doing-dim '((t (:weight bold))) "Dimmed DOING keyword for non-selected windows." :group 'org-faces-config) -(defface org-faces-waiting-dim '((t (:foreground "#87745c" :weight bold))) +(defface org-faces-waiting-dim '((t (:weight bold))) "Dimmed WAITING keyword for non-selected windows." :group 'org-faces-config) -(defface org-faces-verify-dim '((t (:foreground "#8f5a3c" :weight bold))) +(defface org-faces-verify-dim '((t (:weight bold))) "Dimmed VERIFY keyword for non-selected windows." :group 'org-faces-config) -(defface org-faces-stalled-dim '((t (:foreground "#665e75" :weight bold))) +(defface org-faces-stalled-dim '((t (:weight bold))) "Dimmed STALLED keyword for non-selected windows." :group 'org-faces-config) -(defface org-faces-delegated-dim '((t (:foreground "#547d6c" :weight bold))) +(defface org-faces-delegated-dim '((t (:weight bold))) "Dimmed DELEGATED keyword for non-selected windows." :group 'org-faces-config) -(defface org-faces-failed-dim '((t (:foreground "#8a3c3c" :weight bold))) +(defface org-faces-failed-dim '((t (:weight bold))) "Dimmed FAILED keyword for non-selected windows." :group 'org-faces-config) -(defface org-faces-done-dim '((t (:foreground "#4a5158" :weight bold))) +(defface org-faces-done-dim '((t (:weight bold))) "Dimmed DONE keyword for non-selected windows." :group 'org-faces-config) -(defface org-faces-cancelled-dim '((t (:foreground "#4a5158" :weight bold :strike-through t))) +(defface org-faces-cancelled-dim '((t (:weight bold :strike-through t))) "Dimmed CANCELLED keyword for non-selected windows." :group 'org-faces-config) ;; ---------------------------- Priority faces (dim) --------------------------- -(defface org-faces-priority-a-dim '((t (:foreground "#4f6a8a" :weight bold))) +(defface org-faces-priority-a-dim '((t (:weight bold))) "Dimmed [#A] priority cookie for non-selected windows." :group 'org-faces-config) -(defface org-faces-priority-b-dim '((t (:foreground "#9a8544"))) +(defface org-faces-priority-b-dim '((t ())) "Dimmed [#B] priority cookie for non-selected windows." :group 'org-faces-config) -(defface org-faces-priority-c-dim '((t (:foreground "#5f7a4d"))) +(defface org-faces-priority-c-dim '((t ())) "Dimmed [#C] priority cookie for non-selected windows." :group 'org-faces-config) -(defface org-faces-priority-d-dim '((t (:foreground "#5a5a5a"))) +(defface org-faces-priority-d-dim '((t ())) "Dimmed [#D] priority cookie for non-selected windows." :group 'org-faces-config) ;; ---------------------------------- Wiring ----------------------------------- diff --git a/modules/org-noter-config.el b/modules/org-noter-config.el index b9b7bbff2..f28f61bb7 100644 --- a/modules/org-noter-config.el +++ b/modules/org-noter-config.el @@ -307,7 +307,7 @@ From a PDF/EPUB: starts org-noter session if inactive, then inserts note." (cond ((and active (not cj/org-noter--bg-remap-cookie)) (setq cj/org-noter--bg-remap-cookie - (face-remap-add-relative 'default :background "#1d1b19"))) + (face-remap-add-relative 'default))) ((and (not active) cj/org-noter--bg-remap-cookie) (face-remap-remove-relative cj/org-noter--bg-remap-cookie) (setq cj/org-noter--bg-remap-cookie nil)))))))) diff --git a/modules/pdf-config.el b/modules/pdf-config.el index 233a610d5..56b397df3 100644 --- a/modules/pdf-config.el +++ b/modules/pdf-config.el @@ -40,7 +40,6 @@ :custom (pdf-view-display-size 'fit-page) (pdf-view-resize-factor 1.1) - (pdf-view-midnight-colors '("#F1D5AC" . "#0F0E06")) ;; fg . bg ;; Avoid searching for unicodes to speed up pdf-tools. ;; ... and yes, 'ligther' is not a typo (pdf-view-use-unicode-ligther nil) diff --git a/modules/prog-general.el b/modules/prog-general.el index 8e317413c..f22f89923 100644 --- a/modules/prog-general.el +++ b/modules/prog-general.el @@ -384,16 +384,7 @@ defer to `electric-pair-default-inhibit' for any other CHAR." (use-package hl-todo :defer 1 :hook - (prog-mode . hl-todo-mode) - :config - (setq hl-todo-keyword-faces - '(("FIXME" . "#FF0000") - ("BUG" . "#FF0000") - ("HACK" . "#FF0000") - ("ISSUE" . "#DAA520") - ("TASK" . "#DAA520") - ("NOTE" . "#2C780E") - ("WIP" . "#1E90FF")))) + (prog-mode . hl-todo-mode)) ;; --------------------------- Whitespace Management --------------------------- ;; trims trailing whitespace only from lines you've modified when saving buffer |
