aboutsummaryrefslogtreecommitdiff
path: root/modules/auto-dim-config.el
Commit message (Collapse)AuthorAgeFilesLines
* fix(auto-dim): dim the remaining org faces, and test for the next oneCraig Jennings2 days1-0/+14
| | | | | | | | | | | | Four rounds of this bug had one shape: a face nobody enumerated, sitting ahead of a mapped face in a face list and outranking it. A table header renders as (org-table-header org-table), so the mapped org-table underneath never got a say. So this round adds a test instead of another guess. It fontifies a representative org buffer, collects every face the buffer actually uses (including the line-prefix and wrap-prefix that org-indent hangs its faces on), and fails on anything neither mapped nor deliberately excluded. It caught org-checkbox while I was writing it. Newly dimmed: org-table-header, org-formula, org-checkbox, org-checkbox-statistics-done, org-headline-done, org-drill-visible-cloze-face. org-indent joins org-hide and org-superstar-leading on the -hide face. All three resolve to the background colour, which is what makes folded text, leading stars and indent prefixes invisible. Flat-dimming any of them reveals what I hid. bold, italic and underline stay unmapped on purpose. They carry no foreground even through inheritance, so they take their colour from default and dim for free.
* fix(auto-dim): dim org-superstar's heading stars and list bulletsCraig Jennings2 days1-0/+11
| | | | | | | | Bullets were the last thing left lit in an unfocused org window. org-superstar puts its own face ahead of the org face beneath, so a heading star renders as (org-superstar-header-bullet org-level-1) and outranks the org-level-1 we already dim. Three of its four faces flat-dim. The fourth, org-superstar-leading, takes the -hide face instead: its foreground is the background colour, which is exactly what keeps hidden leading stars invisible. Flat-dimming it would reveal stars I chose to hide. A test says so, so nobody completes the set later. That closes the dimming work. The parenthesised text from the first report turned out to be org-code and org-verbatim, already covered.
* fix(auto-dim): dim the built-in link faces in unfocused windowsCraig Jennings2 days1-0/+5
| | | | | | link and link-visited were absent from auto-dim-other-buffers-affected-faces, so links in help, info, and customize buffers stayed lit while the rest of the window faded. They're distinct from org-link, which the earlier org pass covered. Both carry :underline t, and the dim face sets no underline, so the relative remap drops the colour and keeps the cue. A second test pins that: if a theme ever gives auto-dim-other-buffers an :underline, dimmed links stop looking like links and the suite says so.
* docs(auto-dim): note that ANSI-coloured terminal spans stay litCraig Jennings3 days1-0/+8
| | | | | | The commentary claimed EAT buffers dim like any other buffer. Background and uncoloured text do, but ANSI-coloured spans keep their colour: EAT attaches them as anonymous face plists with a literal foreground, and face-remap-add-relative only reaches named faces. I went looking for the missing face name in this alist before working out there isn't one. The note says so now, and points at an overlay as the way in.
* fix(auto-dim): flat-dim the remaining org structure facesCraig Jennings3 days1-0/+22
| | | | | | | | The earlier fix covered only the eleven faces the task named, so the document header (#+TITLE:, #+AUTHOR:, #+ARCHIVE: and their values), inline markup, drawers, planning lines, tables, and the fold indicator all stayed lit in unfocused windows. I enumerated the faces a fontified org buffer actually uses, rather than adding only the ones I could see were wrong. Fifteen were missing. org-todo and org-priority stay out of the flat-dim set. They're keyword class, and dimming them would erase the status colour the org-faces-*-dim variants preserve. Two tests pin that exclusion, and a third pins org-hide to the -hide face so folded text stays hidden.
* fix(auto-dim): dim org headings, links, and tags in unfocused windowsCraig Jennings3 days1-0/+18
| | | | | | | | org-level-1..8, org-link, and org-tag were missing from auto-dim-other-buffers-affected-faces, so they stayed lit while the rest of an unfocused window faded. I flat-dimmed them rather than giving them -dim variants. The active theme gives all eight heading levels one foreground and no height or weight, so no level-by-colour signal is lost. The fork remaps relatively, so org-link keeps its underline and the stars and org-indent keep conveying depth. That premise is theme-dependent, and the comment says so. A second test pins the keyword and priority faces to their -dim variants, so a later change can't quietly flat-dim those too.
* refactor(term): retire ghostel, migrate copy-mode and tmux-history to eat-configCraig Jennings2026-06-261-5/+4
| | | | Complete the EAT consolidation by removing ghostel. ai-term and F12 already run on EAT, so ghostel's only remaining users were the dashboard launcher and term-config itself. Migrate the terminal-generic pieces into eat-config: the tmux copy-mode (C-<up> enters it, the same UX and keybinding as before, since agents run EAT over tmux) and the tmux-history capture, swapping ghostel-send-string for a pty write and the mode checks to eat-mode. Repoint the dashboard "Launch Terminal" to the eshell/EAT toggle, swap the face-diagnostic terminal-mode check to eat-mode, and refresh auto-dim's comment. Delete term-config.el and its init require. EAT's default semi-char non-bound-keys already lets windmove, buffer-move, and the Emacs essentials reach the terminal. Tests retargeted; the obsolete ghostel-keymap-exceptions tests are dropped.
* refactor(themes): retire dupre, fall back to modus-vivendiCraig Jennings2026-06-151-2/+2
| | | | WIP, the theme-studio export, is the active theme. dupre was only the fallback and a structural reference. Move the fallback to the built-in modus-vivendi, guaranteed present everywhere this config loads. Delete the three dupre files plus its test and palette assets, and fix the stale comments that pointed at dupre-faces.el for the auto-dim and org-keyword faces (those moved to org-faces-config.el). Repoint the dupre-clear-theme spec's palette reference to git history.
* feat(auto-dim): dim the org-faces header-row faces in unfocused windowsCraig Jennings2026-06-151-13/+15
| | | | auto-dim remapped the now-orphaned dupre-org-* keyword and priority faces to their -dim variants; this repoints it at the live org-faces-* layer (org-faces-config) so an unfocused window dims keywords and priorities to a darker shade of their own hue instead of leaving them at full color. Picks up DELEGATED and CANCELLED, which the dupre set never had. The dupre-org-* faces stay defined in dupre-faces.el but are no longer referenced here.
* feat(term): replace vterm with ghostel as the terminal engineCraig Jennings2026-06-051-179/+7
| | | | | | | | I swapped the terminal engine from vterm to ghostel (libghostty-vt) everywhere. term-config replaces vterm-config (the F12 terminal, the C-; x menu, tmux history capture), and ai-term replaces ai-vterm (the F9 Claude-agent launcher). ghostel renders the agent TUI without vterm's flicker under heavy streaming, and one engine now covers every terminal workflow. Two behavior changes fall out of the swap. F9 launches in a terminal frame now: ghostel renders in TTY frames, so the old GUI-only guard is gone. Terminal windows no longer dim when unfocused: ghostel resolves its palette into the native module per-terminal, so there's no per-window color hook to dim through the way vterm had. auto-dim drops its vterm color-advice path, the dashboard Terminal button launches ghostel, and the vterm and vterm-toggle packages are removed. The tmux pane-history and copy-mode machinery carried over unchanged. It keys on the pty tty, which ghostel exposes.
* fix(dashboard): exempt the banner buffer from auto-dimCraig Jennings2026-05-261-0/+15
| | | | | | | | The butterfly banner is a transparent PNG. On this X11 build Emacs composites image alpha against one background color and caches the flat pixmap. So when auto-dim remaps a non-selected dashboard's background to near-black, the cached image keeps its old composite and the transparent edges show as a lighter rectangle. I exempted the *dashboard* buffer from dimming through the fork's never-dim-buffer hook, so its background never shifts. Live alpha compositing would need a pgtk build, which is out because of its fractional-scaling input lag, and every theme-level workaround changes dimming for all buffers. Scoping the exemption to one short-lived buffer is the narrow fix. The trade is no focus cue when the dashboard is shown in a split. I also dropped the :mask heuristic prop from the prior banner commit. The PNG already carries a real alpha channel, so heuristic masking was the wrong tool. Once the background is stable, the native alpha over the theme background reads clean on its own. I added Normal/Boundary/Error tests for the predicate.
* feat(auto-dim): dim vterm windows by blending terminal colorsCraig Jennings2026-05-251-0/+180
| | | | | | | | Window dimming via face-remap never reached vterm. The terminal resolves its own colors per cell while redrawing, so it bypasses the remapped faces, and agent and shell windows stayed bright when they lost focus. I advise vterm--get-color to blend each looked-up color toward the auto-dim faces whenever every window showing the buffer is dimmed. The foreground and background blend amounts are separate defcustoms (foreground stays more legible, background fades harder). After a dim-state change I force a full vterm repaint by briefly nudging the terminal size, because vterm only repaints the rows libvterm marked dirty. A post-command hook and a select-window advice cover the windmove and Shift-arrow focus paths that window-selection-change-functions misses. Tests cover the dimmed-buffer predicate, the color blend, the selection-change scheduling, and the auto-dim-before-repaint ordering.
* fix(theme): register dupre faces so org status colors are themedCraig Jennings2026-05-251-1/+17
| | | | | | | | 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.
* feat(auto-dim): dim non-selected windows via auto-dim-other-buffersCraig Jennings2026-05-251-0/+61
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.