-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy patheink-theme.el
252 lines (212 loc) · 10.4 KB
/
eink-theme.el
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
;;; eink-theme.el --- E Ink color theme
;; Copyright (C) 2013-2016 Marian Schubert
;; Author: Marian Schubert <[email protected]>
;; URL: http://github.com/maio/eink-emacs
;; Version: 1.0
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Low distraction, minimalistic color theme emulating reading
;; on E Ink devices.
;;; Credits:
;; Inspired by:
;;
;; https://bitbucket.org/kisom/eink.vim
;; https://github.com/dmand/eink.el
;; http://www.daveliepmann.stfi.re/tufte-css/?sf=wklwy
;;; Code:
(deftheme eink
"Theme emulating reading on an E Ink device.")
(let ((fg "#111111")
(fg-table "#222291")
(bg "#fffff8")
(bg-light "#ddddd8")
(fg-light "#ddddd8")
(bg-highlight "#FFF1AA")
(bg-highlight-2 "LightCyan")
(bg-highlight-3 "LightGreen"))
(custom-theme-set-faces
'eink
;; generic stuff
`(default ((t (:background ,bg :foreground ,fg))))
`(button ((t (:foreground ,fg :underline t))))
`(cursor ((t (:background ,fg :foreground "white smoke"))))
`(custom-variable-tag ((t (:foreground ,fg :weight bold))))
`(default-italic ((t (:italic t))))
`(font-latex-bold-face ((t (:foreground ,fg))))
`(font-latex-italic-face ((t (:foreground ,fg :slant italic))))
`(font-latex-match-reference-keywords ((t (:foreground ,fg))))
`(font-latex-match-variable-keywords ((t (:foreground ,fg))))
`(font-latex-string-face ((t (:foreground "#a9a9a9"))))
`(font-lock-builtin-face ((t (:background ,bg :foreground ,fg))))
`(font-lock-comment-delimiter-face ((t (:foreground "#808080"))))
`(font-lock-comment-face ((t (:foreground ,fg :weight bold))))
`(font-lock-constant-face ((t (:foreground ,fg))))
`(font-lock-doc-face ((t (:foreground ,fg :weight semi-bold))))
`(font-lock-function-name-face ((t (:foreground ,fg))))
`(font-lock-keyword-face ((t (:foreground ,fg))))
`(font-lock-preprocessor-face ((t (:foreground ,fg))))
`(font-lock-reference-face ((t (:foreground ,fg))))
`(font-lock-string-face ((t (:foreground ,fg))))
`(font-lock-type-face ((t (:foreground ,fg))))
`(font-lock-variable-name-face ((t (:foreground ,fg :underline nil))))
`(font-lock-warning-face ((t (:foreground ,fg :weight bold))))
`(fringe ((t (:background ,bg :foreground ,bg))))
`(gnus-header-content ((t (:foreground ,fg))))
`(gnus-header-from ((t (:foreground ,fg))))
`(gnus-header-name ((t (:foreground ,fg))))
`(gnus-header-subject ((t (:foreground ,fg))))
`(highlight ((t nil)))
`(ido-first-match ((t (:foreground ,fg))))
`(ido-only-match ((t (:foreground ,fg))))
`(ido-subdir ((t (:foreground ,fg))))
`(isearch ((t (:background "#eeeee8" :foreground ,fg))))
`(link ((t (:foreground ,fg))))
`(minibuffer-prompt ((t (:foreground ,fg :weight bold))))
`(mode-line ((t (:background ,bg-light :foreground ,fg :height 0.8))))
`(mode-line-buffer ((t (:foreground ,fg :weight bold))))
`(mode-line-inactive ((t (:background ,bg-light :foreground ,fg :height 0.8))))
`(mode-line-minor-mode ((t (:weight ultra-light))))
`(modeline ((t (:background ,bg :foreground ,fg :height 0.8))))
`(region ((t (:background "#eeeee8" :foreground ,fg))))
`(slime-repl-inputed-output-face ((t (:foreground ,fg))))
`(whitespace-line ((t (:background ,bg-highlight-2 :foreground ,fg))))
;; org
`(org-agenda-date ((t (:foreground ,fg :height 1.2))))
`(org-agenda-date-today ((t (:foreground ,fg :weight bold :height 1.4))))
`(org-agenda-date-weekend ((t (:foreground ,fg :weight normal))))
`(org-agenda-structure ((t (:foreground ,fg :weight bold))))
`(org-block ((t (:foreground ,fg))))
`(org-block-begin-line ((t (:foreground ,fg-light :height 0.8))))
`(org-block-end-line ((t (:foreground ,fg-light :height 0.8))))
`(org-verbatim ((t (:foreground ,fg :weight semi-bold))))
`(org-date ((t (:foreground ,fg) :underline)))
`(org-done ((t (:foreground ,fg-light))))
`(org-hide ((t (:foreground ,bg))))
;; use :overline to give headings more top margin
`(org-level-1 ((t (:foreground ,fg :weight semi-bold :height 1.3))))
`(org-level-2 ((t (:foreground ,fg :weight semi-bold :height 1.1 :overline ,bg))))
`(org-level-3 ((t (:foreground ,fg :weight semi-bold :height 1.1 :overline ,bg))))
`(org-level-4 ((t (:foreground ,fg :weight semi-bold :height 1.1 :overline ,bg))))
`(org-level-5 ((t (:foreground ,fg :weight semi-bold :height 1.1 :overline ,bg))))
`(org-level-6 ((t (:foreground ,fg :weight semi-bold :height 1.1 :overline ,bg))))
`(org-link ((t (:foreground ,fg :underline t))))
`(org-quote ((t (:foreground ,fg :slant italic :inherit org-block))))
`(org-scheduled ((t (:foreground ,fg))))
`(org-sexp-date ((t (:foreground ,fg))))
`(org-special-keyword ((t (:foreground ,fg))))
`(org-todo ((t (:foreground ,fg))))
`(org-verse ((t (:inherit org-block :slant italic))))
`(org-table ((t (:foreground ,fg-table))))
;; powerline
`(powerline-active1 ((t (:background "grey22" :foreground ,bg :inherit mode-line))))
`(powerline-active2 ((t (:background "grey40" :foreground ,bg :inherit mode-line))))
;; magit
`(magit-header ((t (:weight semi-bold))))
`(magit-item-mark ((t (:background ,bg-highlight))))
`(magit-item-highlight ((t (:weight bold))))
`(magit-section-heading ((t (:weight semi-bold :height 1.2))))
`(magit-section-highlight ((t (:weight semi-bold))))
`(magit-diff-context-highlight ((t (:foreground ,fg))))
`(magit-branch-local ((t (:weight bold))))
`(magit-branch-remote ((t (:weight bold))))
;; diff
`(diff-added ((t (:background "#e9ffe9"))))
`(diff-removed ((t (:background "#ffecec"))))
`(diff-refine-added ((t (:background "#a4f4a3"))))
`(diff-refine-removed ((t (:background "#f9cbca"))))
`(magit-diff-added-highlight ((t (:weight demibold :background "#e9ffe9"))))
`(magit-diff-added ((t (:background "#e9ffe9"))))
`(magit-diff-removed-highlight ((t (:weight demibold :background "#ffecec"))))
`(magit-diff-removed ((t (:background "#ffecec"))))
;; git-timemachine
`(git-timemachine-minibuffer-author-face ((t (:inherit default))))
`(git-timemachine-minibuffer-detail-face ((t (:weight bold))))
;; compile
`(compilation-error ((t (:inherit error))))
;; flycheck
`(flycheck-error ((t (:inherit error))))
`(flycheck-warning ((t (:inherit warning))))
;; dired
`(dired-directory ((t (:weight bold))))
`(dired-subtree-depth-1-face ((t (:inherit default))))
`(dired-subtree-depth-2-face ((t (:inherit default))))
`(dired-subtree-depth-3-face ((t (:inherit default))))
`(dired-subtree-depth-4-face ((t (:inherit default))))
;; helm
`(helm-source-header ((t (:foreground ,fg :background "grey90" :weight bold))))
`(helm-header ((t (:foreground ,fg))))
`(helm-selection-line ((t (:inherit region :weight bold))))
`(helm-selection ((t (:background ,bg-highlight))))
`(helm-ff-directory ((t (:foreground ,fg :weight bold))))
`(helm-ff-dotted-directory ((t (:foreground ,fg :weight bold))))
`(helm-ff-symlink ((t (:foreground ,fg :slant italic))))
`(helm-ff-executable ((t (:foreground ,fg))))
;; iedit
`(iedit-occurrence ((t (:background ,bg-highlight-3 :foreground ,fg))))
;; company
`(company-echo-common ((t (:foreground ,fg))))
`(company-tooltip-selection ((t (:background ,bg-highlight))))
;; parens - parenface
'(parenface-paren-face ((t (:foreground "gray70"))))
'(parenface-curly-face ((t (:foreground "gray70"))))
'(parenface-bracket-face ((t (:foreground "gray70"))))
;; parens - paren-face
'(parenthesis ((t (:foreground "gray70"))))
;; parens - other
`(sp-show-pair-match-face ((t (:foreground "black" :weight bold))))
`(sp-show-pair-mismatch-face ((t (:background "red" :foreground "black" :weight bold))))
`(show-paren-match ((t (:foreground "black" :weight bold))))
`(show-paren-mismatch ((t (:background "red" :foreground "black" :weight bold))))
;; js2
`(js2-function-param ((t (:foreground ,fg))))
`(js2-external-variable ((t (:foreground ,fg))))
;; perl
`(cperl-hash-face ((t (:foreground ,fg))))
`(cperl-array-face ((t (:foreground ,fg))))
`(cperl-nonoverridable-face ((t (:foreground ,fg))))
;; rpm-spec-mode
`(rpm-spec-tag-face ((t (:inherit default))))
`(rpm-spec-package-face ((t (:inherit default))))
`(rpm-spec-macro-face ((t (:inherit default))))
`(rpm-spec-doc-face ((t (:inherit default))))
`(rpm-spec-var-face ((t (:inherit default))))
`(rpm-spec-ghost-face ((t (:inherit default))))
`(rpm-spec-section-face ((t (:inherit default :weight bold))))
;; linum / nlinum-relative
`(nlinum-relative-current-face ((t (:inherit normal :weight bold))))
`(linum ((t (:inherit normal :weight bold))))
;; web-mode
`(web-mode-current-element-highlight-face ((t (:inherit normal :weight bold :foreground ,fg))))
;; mmm-mode
`(mmm-default-submode-face ((t (:inherit normal :background "#ffffef"))))
;; misc
`(idle-highlight ((t (:background ,bg-highlight))))
`(yas-field-highlight-face ((t (:background "#eeeee8" :foreground ,fg))))
`(eshell-prompt ((t (:foreground ,fg :weight bold))))
`(cider-result-overlay-face ((t (:weight bold))))
;; evil-quickscope
`(evil-quickscope-first-face ((t (:foreground ,fg :background "#eeeee8"))))
`(evil-quickscope-second-face ((t (:foreground ,fg :background ,bg-highlight-3))))
;; evil-snipe
`(evil-snipe-first-match-face ((t (:foreground ,fg :background "#eeeee8"))))
`(evil-snipe-matches-face ((t (:foreground ,fg :background ,bg-highlight-3))))
;; evil
`(evil-ex-lazy-highlight ((t (:background ,bg-highlight-2))))
`(evil-ex-substitute-matches ((t (:background ,bg-highlight-2))))
`(evil-ex-substitute-replacement ((t (:background ,bg-highlight :underline nil :foreground ,fg))))))
;;;###autoload
(when load-file-name
(add-to-list
'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide-theme 'eink)
;;; eink-theme.el ends here