1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
;; declare all themes as safe (i trust developers)
(setq custom-safe-themes t)
;; Ef-themes
(use-package ef-themes
:ensure t
:demand t
:hook
((ef-themes-post-load . bard/ef-themes-hl-todo-faces)
(ef-themes-post-load . logos-update-fringe-in-buffers))
:config
(defun bard/ef-themes-hl-todo-faces ()
"Configure `hl-todo-keyword-faces' with Ef themes colors.
The exact color values are taken from the active Ef theme."
(ef-themes-with-colors
(setq hl-todo-keyword-faces
`(("WAIT" . ,yellow)
("TODO" . ,red)
("NEXT" . ,blue)
("THEM" . ,magenta)
("PROG" . ,cyan-warmer)
("OKAY" . ,green-warmer)
("DONT" . ,yellow-warmer)
("FAIL" . ,red-warmer)
("BUG" . ,red-warmer)
("DONE" . ,green)
("NOTE" . ,blue-warmer)
("KLUDGE" . ,cyan)
("HACK" . ,cyan)
("TEMP" . ,red)
("FIXME" . ,red-warmer)
("XXX+" . ,red-warmer)
("KILLED" . ,cyan)
("REVIEW" . ,red)
("DEPRECATED" . ,yellow)))))
(setq org-priority-faces
'((?A . (:inherit (bold next-error)))
(?B . org-priority)
(?C . (:inherit (shadow org-priority)))))
(setq ef-themes-headings
'((0 variable-pitch light 2.00)
(1 variable-pitch light 1.5)
(2 regular 1.3)
(3 1.1)
(agenda-date . (variable-pitch regular 1.3))
(agenda-structure . (variable-pitch light 1.9))
(t . 1.1)))
;; verbatim need higher contrast for org mode
(setq ef-elea-dark-palette-overrides
'((prose-verbatim yellow-cooler)))
(setq ef-elea-light-palette-overrides
'((prose-verbatim yellow-cooler)))
(define-key global-map (kbd "M-<f5>") #'ef-themes-select)
(setq ef-themes-variable-pitch-ui t
ef-themes-mixed-fonts t)
)
(use-package modus-themes
:ensure t
:demand t
:bind
(("<f5>" . modus-themes-select))
:hook ((modus-themes-post-load . bard/modus-themes-hl-todo-faces)
(modus-themes-post-load . logos-update-fringe-in-buffers))
:config
(defun bard/modus-themes-hl-todo-faces ()
"Configure `hl-todo-keyword-faces' with Modus themes colors.
The exact color values are taken from the active Modus theme."
(modus-themes-with-colors
(setq hl-todo-keyword-faces
`(("WAIT" . ,yellow)
("TODO" . ,red)
("NEXT" . ,blue)
("THEM" . ,magenta)
("PROG" . ,cyan-warmer)
("OKAY" . ,green-warmer)
("DONT" . ,yellow-warmer)
("FAIL" . ,red-warmer)
("BUG" . ,red-warmer)
("DONE" . ,green)
("NOTE" . ,blue-warmer)
("KLUDGE" . ,cyan)
("HACK" . ,cyan)
("TEMP" . ,red)
("FIXME" . ,red-warmer)
("XXX+" . ,red-warmer)
("REVIEW" . ,red)
("KILLED" . ,cyan)
("DEPRECATED" . ,yellow)))))
(setq modus-themes-headings
'((0 variable-pitch light 2.00)
(1 variable-pitch light 1.5)
(2 regular 1.3)
(3 1.1)
(agenda-date . (variable-pitch regular 1.3))
(agenda-structure . (variable-pitch light 1.9))
(t . 1.1)))
(setq modus-themes-custom-auto-reload nil
modus-themes-mixed-fonts t
modus-themes-variable-pitch-ui t
modus-themes-italic-constructs t
modus-themes-bold-constructs nil
modus-themes-completions '((t . (extrabold)))
modus-themes-prompts '(extrabold))
(setq modus-themes-common-palette-overrides
`((fringe unspecified)
(bg-line-number-active bg-hl-line)
(bg-line-number-inactive unspecified)
(fg-line-number-active fg-main)
))
;; org customization
(setq org-priority-faces
'((?A . (:inherit (bold next-error)))
(?B . org-priority)
(?C . (:inherit (shadow org-priority)))))
(load-theme 'modus-vivendi t))
;;;; Fonts
(use-package fontaine
:ensure t
:config
(setq fontaine-presets
'((default
:default-height 160
:default-family "Iosevka Comfy"
:variable-pitch-family "Iosevka Comfy Motion"
:variable-pitch-height 1.0
:fixed-pitch-family "Iosevka Comfy"
:fixed-pitch-height 1.0
:bold-weight bold
:mode-line-active-family "Iosevka Comfy Motion"
:mode-line-inactive-family "Iosevka Comfy Motion"
:mode-line-active-height 160
:mode-line-inactive-height 160
)
(wide
:inherit default
:default-height 150
:default-family "Iosevka Comfy Wide"
:fixed-pitch-family "Iosevka Comfy Wide"
:mode-line-active-family "Iosevka Comfy Wide Motion Duo"
:mode-line-inactive-family "Iosevka Comfy Wide Motion Duo"
:variable-pitch-family "Iosevka Comfy Wide Motion Duo"
:mode-line-active-height 150
:mode-line-inactive-height 150)
(large
:inherit default
:variable-pitch-family "Iosevka Comfy Wide Motion"
:default-height 170
:mode-line-active-height 150
:mode-line-inactive-height 150
)
(huge
:inherit laptop
:variable-pitch-family "Iosevka Comfy Wide Motion"
:default-height 200
:mode-line-active-height 170
:mode-line-inactive-height 170
)
(comic
:inherit default
:default-family "Comic Code"
:variable-pitch-family "Comic Code"
:fixed-pitch-family "Comic Code"
:mode-line-active-family "Comic Code"
)
(berkeley
:inherit desktop
:default-height 150
:mode-line-active-height 150
:mode-line-inactive-height 150
:default-family "Berkeley Mono"
:variable-pitch-family "Berkeley Mono"
:fixed-pitch-family "Berkeley Mono"
:mode-line-active-family "Berkeley Mono"
)
(t
:default-family "Monospace"
)))
;; save file
(setq fontaine-latest-state-file
(locate-user-emacs-file "fontaine-latest-state.eld"))
;; Set last preset or fall back to desired style from `fontaine-presets'.
(fontaine-set-preset (or (fontaine-restore-latest-preset) 'laptop))
;; The other side of `fontaine-restore-latest-preset'.
(add-hook 'kill-emacs-hook #'fontaine-store-latest-preset)
;; preserve fonts when switching themes
(dolist (hook '(modus-themes-after-load-theme-hook ef-themes-post-load-hook))
(add-hook hook #'fontaine-apply-current-preset))
(define-key global-map (kbd "C-c f") #'fontaine-set-preset))
(use-package rainbow-mode
:ensure t)
;; Switching themes
(defun bard/disable-all-themes ()
"disable all active themes."
(interactive)
(dolist (i custom-enabled-themes)
(disable-theme i)))
(provide 'bard-emacs-theme)
;;; bard-emacs-theme.el ends here
|