From 56da3d940b26a51102bce39b3b82dfbbc2b391fd Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 25 May 2026 09:25:32 -0500 Subject: feat(auto-dim): dim non-selected windows via auto-dim-other-buffers I added auto-dim-config, a module that loads my local auto-dim-other-buffers fork and dims windows that don't have focus so the selected window stands out. A non-selected window drops to a pure-black background with faded gray text. The dimmed faces live in the dupre theme (themes/dupre-faces.el) so they track theme switches, and the module remaps default, the font-lock faces, and org-block onto them so syntax-highlighted code fades too rather than staying lit. Fringe is left out because dimming it forces a full-frame refresh that flickers on this non-pgtk build. dim-on-focus-out is nil, so tabbing to a browser or terminal on Hyprland doesn't dim the whole frame. vterm and agent windows don't dim either, because the terminal paints its own per-cell colors past the face remap. I'm keeping that, since the agent's output stays readable while I work in code on the other side. The module loads after the theme, carries a load-graph header, joins the header-contract allowlist, and the inventory moves to 103 of 103 classified. --- themes/dupre-faces.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'themes') diff --git a/themes/dupre-faces.el b/themes/dupre-faces.el index fdd61a55..648fded3 100644 --- a/themes/dupre-faces.el +++ b/themes/dupre-faces.el @@ -832,6 +832,16 @@ `(shr-code ((t (:foreground ,green :background ,bg+1)))) `(shr-mark ((t (:background ,yellow-2)))) +;;;;; auto-dim-other-buffers + ;; Non-selected windows recede to a pure-black background with faded + ;; gray text, so an inactive window reads as "disabled". This face is + ;; remapped onto default, the font-lock faces, and org-block (see + ;; auto-dim-config.el), so code text fades too rather than staying lit. + ;; The -hide face keeps org hidden text invisible in dimmed windows (its + ;; foreground must match the dimmed background). + `(auto-dim-other-buffers ((t (:foreground ,gray-1 :background "#000000")))) + `(auto-dim-other-buffers-hide ((t (:foreground "#000000" :background "#000000")))) + ))) (provide 'dupre-faces) -- cgit v1.2.3