Skip to main content

max / alloy

3.7 KB · 80 lines History Blame Raw
1 @{! variants = default, night }
2 # Alloy zathura configuration
3 #
4 # Alloy palette applied to chrome, selection, and recolored
5 # PDF viewing. Vi-like keybinds inherited from zathura's defaults; only
6 # small additions.
7
8 # -------------------------------------------------------------------
9 # Base surfaces — the theme's own ramp (docs/TOKENS.md)
10 # -------------------------------------------------------------------
11 set default-bg "@{surface.page}" # surface
12 set default-fg "@{content.primary}" # text-primary
13
14 set statusbar-bg "@{border.subtle}" # border-subtle
15 set statusbar-fg "@{content.secondary}" # text-secondary
16 set statusbar-h-padding 3
17 set statusbar-v-padding 3
18
19 set inputbar-bg "@{surface.raised}" # surface-raised
20 set inputbar-fg "@{content.primary}"
21
22 set notification-bg "@{surface.raised}"
23 set notification-fg "@{content.primary}"
24 set notification-error-bg "@{surface.raised}"
25 set notification-error-fg "@{status.danger}" # accent-error
26 set notification-warning-bg "@{surface.raised}"
27 set notification-warning-fg "@{status.warning}" # accent-warn
28
29 set completion-bg "@{surface.raised}"
30 set completion-fg "@{content.primary}"
31 set completion-highlight-bg "@{border.subtle}"
32 set completion-highlight-fg "@{content.primary}"
33
34 # -------------------------------------------------------------------
35 # Selection and search
36 # -------------------------------------------------------------------
37 # A search hit has to let the glyph under it through, so these two need an
38 # alpha, and zathura wants that as `rgba(r, g, b, a)` with the channels in
39 # decimal. These were the last two colors in the tree written by hand, pinned to
40 # Akari Dawn's amber and oxblood in both renders, because every skelgen
41 # expression resolved to `#rrggbb` and there was nothing to write that would
42 # follow the theme. `rgba` is that expression.
43 set highlight-color "@{rgba(status.warning, 0.35)}" # accent-warn at low alpha
44 set highlight-active-color "@{rgba(status.danger, 0.5)}" # accent-error at mid alpha
45 set selection-clipboard clipboard
46
47 # -------------------------------------------------------------------
48 # Recolor: map the page's own black-on-white into the theme's pair
49 # -------------------------------------------------------------------
50 # The one setting here that is about the mode rather than about the palette.
51 # Nearly every PDF is black ink on a white page, so under the night render an
52 # unrecolored document is a floodlight in the middle of a dark session, which
53 # is the single worst-looking thing a dark desktop can do to you. Day leaves it
54 # off, because there the page already agrees with the chrome. `i` toggles it
55 # either way, so neither default is a trap.
56 set recolor "@{meta.is_dark}"
57 set recolor-keephue true
58 set recolor-lightcolor "@{surface.page}" # surface
59 set recolor-darkcolor "@{content.primary}" # text-primary
60
61 # -------------------------------------------------------------------
62 # Layout and scroll
63 # -------------------------------------------------------------------
64 set adjust-open "best-fit"
65 set pages-per-row 1
66 set scroll-page-aware true
67 set scroll-full-overlap 0.01
68 set scroll-step 100
69
70 set window-title-basename true
71 set guioptions "s" # show statusbar only, no h-scrollbar, no v-scrollbar
72
73 # -------------------------------------------------------------------
74 # Additional keybinds (defaults kept; only additions here)
75 # -------------------------------------------------------------------
76 map [normal] i recolor
77 map [normal] u scroll half-up
78 map [normal] d scroll half-down
79 map [normal] R reload
80