diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-06 08:43:03 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-06 08:43:03 -0500 |
| commit | 648c150f6e4e89c9c04158795da1ab13370d7f73 (patch) | |
| tree | 442f9349e0904a4c00cb57c076e13f1152614fe5 /modules/nov-reading.el | |
| parent | f613bd63811d84816f88d26b33323e1b0f395793 (diff) | |
| download | dotemacs-648c150f6e4e89c9c04158795da1ab13370d7f73.tar.gz dotemacs-648c150f6e4e89c9c04158795da1ab13370d7f73.zip | |
feat(readers): default EPUB and PDF to a dark/sepia/light reading cycle
nov-mode's reading cycle opened on sepia and ran sepia, dark, light. I reordered it to dark, sepia, light and made a fresh EPUB open dark.
pdf-view only had a binary midnight toggle. I added a matching palette layer: a fresh PDF opens dark, and c cycles dark, sepia, light, none (C selects by name, M also cycles). Each palette is a foreground/background pair fed to pdf-view-midnight-minor-mode, so sepia and light are that same duotone with warmer and lighter colors. The pdf colors mirror the nov palettes so EPUBs and PDFs read alike.
Pure name-to-colors and cycle logic are unit-tested. The live render needs a manual check.
Diffstat (limited to 'modules/nov-reading.el')
| -rw-r--r-- | modules/nov-reading.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/nov-reading.el b/modules/nov-reading.el index 4134f497..636a2f53 100644 --- a/modules/nov-reading.el +++ b/modules/nov-reading.el @@ -93,12 +93,12 @@ :group 'cj/nov-reading) (defcustom cj/nov-reading-palettes - '(("sepia" :face cj/nov-reading-sepia - :heading cj/nov-reading-sepia-heading - :link cj/nov-reading-sepia-link) - ("dark" :face cj/nov-reading-dark + '(("dark" :face cj/nov-reading-dark :heading cj/nov-reading-dark-heading :link cj/nov-reading-dark-link) + ("sepia" :face cj/nov-reading-sepia + :heading cj/nov-reading-sepia-heading + :link cj/nov-reading-sepia-link) ("light" :face cj/nov-reading-light :heading cj/nov-reading-light-heading :link cj/nov-reading-light-link)) @@ -114,7 +114,7 @@ palette; omit :heading or :link to leave that element at the theme's default." (plist :options ((:face face) (:heading face) (:link face)))) :group 'cj/nov-reading) -(defcustom cj/nov-reading-default-palette "sepia" +(defcustom cj/nov-reading-default-palette "dark" "Reading palette applied to a fresh nov-mode buffer. A key in `cj/nov-reading-palettes', or nil for the theme's normal rendering." :type '(choice (const :tag "None (theme default)" nil) string) |
