aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-14 14:22:07 -0500
committerCraig Jennings <c@cjennings.net>2026-06-14 14:22:07 -0500
commit808607872702075e638e5813f3c2958c100cdb6c (patch)
tree33769fc694566c502fb92ededa56216aba345e0f /modules
parentaf2ad1febf87027cbd4408312c1fff2815a9a0ff (diff)
downloaddotemacs-808607872702075e638e5813f3c2958c100cdb6c.tar.gz
dotemacs-808607872702075e638e5813f3c2958c100cdb6c.zip
refactor(faces): let the theme own face appearance
Strip per-module face configuration so the active theme is the single source of face styling. Removed the dired text-greying set-face-attribute calls (kept the buffer-local face-remap), the org appearance set-face-attribute calls, the highlight-indent-guides colors, the rainbow-delimiters depth colors (which were overriding the theme's blue with red), and the cj/music-* defface forms plus the emms-playlist custom-set-faces. Left nerd-icons' set-face-foreground alone, since it's runtime tint logic rather than static config. Each touched file is backed up beside it as <name>.el.faces.bak (untracked). The cj/music-* faces now come from the theme instead of the module, so until the theme provides them music rendering falls back to the default face.
Diffstat (limited to 'modules')
-rw-r--r--modules/dirvish-config.el12
-rw-r--r--modules/music-config.el48
-rw-r--r--modules/org-config.el17
-rw-r--r--modules/prog-general.el7
-rw-r--r--modules/prog-lisp.el12
5 files changed, 6 insertions, 90 deletions
diff --git a/modules/dirvish-config.el b/modules/dirvish-config.el
index 79d6ff41c..e2fc19f1d 100644
--- a/modules/dirvish-config.el
+++ b/modules/dirvish-config.el
@@ -513,15 +513,9 @@ Uses feh on X11, swww on Wayland."
;;; ----------------------------- Dired Text Greying ----------------------------
-;; The right-column file-size attribute uses `shadow' (#969385). Match the
-;; visible text faces to it so the column reads as one tone, with icon color
-;; supplying the only accent. `default' is remapped buffer-locally inside
-;; dired/dirvish so plain files match too — no global side effects.
-
-(with-eval-after-load 'dired
- (set-face-attribute 'dired-directory nil :foreground 'unspecified :inherit 'shadow)
- (set-face-attribute 'dired-symlink nil :foreground 'unspecified :inherit 'shadow)
- (set-face-attribute 'dired-header nil :foreground 'unspecified :inherit 'shadow))
+;; `default' is remapped buffer-locally to `shadow' inside dired/dirvish (see
+;; `cj/--dired-text-greyout' below) so plain files read grey, with icon color
+;; the only accent. The dired text faces themselves are left to the theme.
(defun cj/--dired-text-greyout ()
"Buffer-local: render `default' in `shadow' so plain files read grey."
diff --git a/modules/music-config.el b/modules/music-config.el
index 799db1333..be836429b 100644
--- a/modules/music-config.el
+++ b/modules/music-config.el
@@ -722,54 +722,6 @@ For URL tracks: decoded URL."
(setq emms-track-description-function #'cj/music--track-description)
- ;; Playlist faces
- (defface cj/music-header-face
- '((((class color) (background dark))
- (:foreground "#969385"))
- (((class color) (background light))
- (:foreground "gray50")))
- "Face for playlist header labels.")
-
- (defface cj/music-header-value-face
- '((((class color) (background dark))
- (:foreground "#d0cbc0"))
- (((class color) (background light))
- (:foreground "gray30")))
- "Face for playlist header values.")
-
- (defface cj/music-mode-on-face
- '((((class color) (background dark))
- (:foreground "#d7af5f"))
- (((class color) (background light))
- (:foreground "DarkGoldenrod")))
- "Face for active mode indicators in the playlist header.")
-
- (defface cj/music-mode-off-face
- '((((class color) (background dark))
- (:foreground "#58574e"))
- (((class color) (background light))
- (:foreground "gray70")))
- "Face for inactive mode indicators in the playlist header.")
-
- (defface cj/music-keyhint-face
- '((((class color) (background dark))
- (:foreground "#8a9496"))
- (((class color) (background light))
- (:foreground "gray50")))
- "Face for keybinding hints in the playlist header.")
-
- (custom-set-faces
- '(emms-playlist-track-face
- ((((class color) (background dark))
- (:foreground "#8a9496"))
- (((class color) (background light))
- (:foreground "gray50"))))
- '(emms-playlist-selected-face
- ((((class color) (background dark))
- (:foreground "#d7af5f" :weight bold))
- (((class color) (background light))
- (:foreground "DarkGoldenrod" :weight bold)))))
-
;; Multi-line header overlay
(defvar-local cj/music--header-overlay nil
"Overlay displaying the playlist header.")
diff --git a/modules/org-config.el b/modules/org-config.el
index d2a0be34f..34b618d1a 100644
--- a/modules/org-config.el
+++ b/modules/org-config.el
@@ -63,23 +63,8 @@
;; -------------------------- Org Appearance Settings --------------------------
(defun cj/org-appearance-settings()
- "Set foreground, background, and font styles for org mode."
+ "Set org-mode appearance options (org faces are left to the theme)."
(interactive)
- ;; org-hide should use fix-pitch to align indents for proportional fonts
- (set-face-attribute 'org-hide nil :inherit 'fixed-pitch)
- (set-face-attribute 'org-meta-line nil :inherit 'shadow)
-
- ;; Remove foreground and background from block faces
- (set-face-attribute 'org-block nil :foreground 'unspecified :background 'unspecified)
- (set-face-attribute 'org-block-begin-line nil :foreground 'unspecified :background 'unspecified)
- (set-face-attribute 'org-block-end-line nil :foreground 'unspecified :background 'unspecified)
-
- ;; Get rid of the background on column views
- (set-face-attribute 'org-column nil :background 'unspecified)
- (set-face-attribute 'org-column-title nil :background 'unspecified)
-
- ;; make sure org-links are underlined
- (set-face-attribute 'org-link nil :underline t)
(setq org-ellipsis " ▾") ;; change ellipses to down arrow
(setq org-hide-emphasis-markers t) ;; hide emphasis markers (org-appear shows them when editing)
diff --git a/modules/prog-general.el b/modules/prog-general.el
index 8b4dedda4..cb46ce6b8 100644
--- a/modules/prog-general.el
+++ b/modules/prog-general.el
@@ -336,14 +336,9 @@ defer to `electric-pair-default-inhibit' for any other CHAR."
(use-package highlight-indent-guides
:hook (prog-mode . cj/highlight-indent-guides-enable)
:config
- ;; Disable auto face coloring to use explicit faces for better visibility across themes
+ ;; Disable auto face coloring; the guide faces are left to the theme
(setq highlight-indent-guides-auto-enabled nil)
- ;; Set explicit face backgrounds and foreground for the indentation guides
- (set-face-background 'highlight-indent-guides-odd-face "darkgray")
- (set-face-background 'highlight-indent-guides-even-face "darkgray")
- (set-face-foreground 'highlight-indent-guides-character-face "dimgray")
-
(defun cj/highlight-indent-guides-enable ()
"Enable highlight-indent-guides with preferred settings for programming modes."
(setq-local highlight-indent-guides-method 'bitmap)
diff --git a/modules/prog-lisp.el b/modules/prog-lisp.el
index a51116698..30c04ad7e 100644
--- a/modules/prog-lisp.el
+++ b/modules/prog-lisp.el
@@ -131,17 +131,7 @@
(use-package rainbow-delimiters
:hook
- ((emacs-lisp-mode lisp-mode scheme-mode) . rainbow-delimiters-mode)
- :config
- (set-face-foreground 'rainbow-delimiters-depth-1-face "#c66") ;; red
- (set-face-foreground 'rainbow-delimiters-depth-2-face "#6c6") ;; green
- (set-face-foreground 'rainbow-delimiters-depth-3-face "#69f") ;; blue
- (set-face-foreground 'rainbow-delimiters-depth-4-face "#cc6") ;; yellow
- (set-face-foreground 'rainbow-delimiters-depth-5-face "#6cc") ;; cyan
- (set-face-foreground 'rainbow-delimiters-depth-6-face "#c6c") ;; magenta
- (set-face-foreground 'rainbow-delimiters-depth-7-face "#ccc") ;; light gray
- (set-face-foreground 'rainbow-delimiters-depth-8-face "#999") ;; medium gray
- (set-face-foreground 'rainbow-delimiters-depth-9-face "#666")) ;; dark gray
+ ((emacs-lisp-mode lisp-mode scheme-mode) . rainbow-delimiters-mode))
;; ----------------------------------- SLIME -----------------------------------
;; Superior Lisp Interaction Mode for Emacs (Common Lisp REPL/debugger)