~aerique/emacs-theme-aerique

emacs-theme-aerique/aerique-dark-theme.el -rw-r--r-- 16.4 KiB
4d8dbb3b — Erik Winkels Revert "Update image URL for GitLab." 1 year, 4 months ago
                                                                                
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
;;;; aerique-dark-theme.el --- A partitioning color theme for Emacs.
;;;;
;;;; Copyright 2014, Erik Winkels <aerique@xs4all.nl>
;;;;
;;;; Author   : Erik Winkels
;;;; Keywords : color theme aerique dark aerique-dark
;;;; URL      : <https://github.com/aerique/emacs-aerique-dark-theme.git>
;;;; Version  : 0.2 (2014-10-21)
;;;;
;;;; Package-Requires: ((emacs "24"))
;;;;
;;;; 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/>.
;;;;
;;;; This file is not part of Emacs.
;;;;
;;;; Commentary:
;;;;
;;;; This theme won't work right by just doing a LOAD-THEME and I can't get
;;;; figured out why.  "error" stays bold and "whitespace-tab" keeps a gray
;;;; background.  To get it working:
;;;;
;;;;     (when (>= emacs-major-version 24)
;;;;       (add-to-list 'custom-theme-load-path "«theme-directory»")
;;;;       (load "«theme-directory»/aerique-dark-theme")
;;;;       (load-theme 'aerique-dark t))
;;;;
;;;; With regards to minimizing syntax highlighting there's ofcourse
;;;; font-lock-maximum-decoration but who uses that?  Switching themes is
;;;; easier.
;;;;
;;;; Legend:
;;;;
;;;; green:              red:                    harsh red:
;;;; - executable files  - compressed files      - errors
;;;; - diff adds         - diff removals         - warnings
;;;; - Lisp keywords     - source code comments
;;;; - Python builtins   - org todo
;;;; - online indicator  - extended away indicator
;;;; - irc own text
;;;; - org done
;;;;
;;;; cyan:               yellow:                 brown:
;;;; - directories       - changed buffers       - strings
;;;; - hyperlinks        - highlights            - away indicator
;;;; - irc mentions      - symbolic links
;;;;
;;;; Note to self: orchid2, PaleVioletRed2, SkyBlue are nice colors.

;;;; Code:

(deftheme aerique-dark
  "Theme centered on minimal syntax highlighting and distinct but not too
  harsh or distracting colors.  The only active font-lock faces are:
  builtin, comment and string.

  The point of this theme is not highlighting all kinds of different syntax
  but partitioning the source code in easily scannable pieces.")

(let* ((ad-comment       "#cd5c5c")  ; indian red
       (ad-highlight     "#ffff00")  ; yellow
       (ad-keyword       "#8fbc8f")  ; dark sea green
       (ad-link          "#00cccc")  ; cyan
       (ad-string        "#e9967a")  ; dark salmon
       (ad-darkest       "#000000")  ; black
       (ad-lightest      "#ffffff")  ; white
       (ad-gray-darkest  "#292929")  ; gray16
       (ad-gray-dark     "#525252")  ; gray32
       (ad-gray-light    "#a3a3a3")  ; gray64
       (ad-gray-lightest "#e0e0e0")  ; gray88
       (ad-red           "#ff0000")  ; red
       (default                `((t :foreground ,ad-gray-lightest
                                    :background ,ad-darkest)))
       (bold                   `((t :bold t)))
       (directory              `((t :foreground ,ad-link)))
       (symlink                `((t :foreground ,ad-highlight)))
       (error                  `((t :foreground ,ad-red)))
       (font-lock-builtin-face `((t :foreground ,ad-keyword)))
       (font-lock-comment-face `((t :foreground ,ad-comment)))
       (font-lock-string-face  `((t :foreground ,ad-string)))
       (highlight              `((t :foreground ,ad-darkest
                                    :background ,ad-highlight)))
       (keyword                `((t :foreground ,ad-keyword)))
       (link                   `((t :foreground ,ad-link :underline t)))
       (subdued                `((t :foreground ,ad-gray-light))))
  (defface powerline-active-erc2
           `((t (:inherit powerline-active2 :foreground ,ad-highlight)))
           "Powerline face 2 for ERC notifications."
           :group 'powerline)
  (defface powerline-inactive-erc2
           `((t (:inherit powerline-inactive2 :foreground ,ad-highlight)))
           "Powerline face 2 for ERC notifications."
           :group 'powerline)
  (defface powerline-active-modified-read-only
           `((t (:foreground ,ad-comment)))
           "Powerline face for modified read-only buffers."
           :group 'powerline)
  (defface powerline-inactive-modified-read-only
           `((t (:foreground ,ad-comment)))
           "Powerline face for modified read-only buffers."
           :group 'powerline)
  (custom-theme-set-faces 'aerique-dark
    `(bold ,bold)
    `(button ,link)
    `(cfw:face-header ,default)
    `(cfw:face-holiday ,font-lock-builtin-face)
    `(cfw:face-select ((t :foreground ,ad-darkest :background ,ad-highlight)))
    `(cfw:face-saturday, default)
    `(cfw:face-sunday ,default)
    `(cfw:face-toolbar ,default)
    `(cfw:face-toolbar-button-on ((t :foreground ,ad-gray-lightest :bold t)))
    `(cfw:face-toolbar-button-off ((t :foreground ,ad-gray-light :bold t)))
    `(cfw:face-title ((t :inherit variable-pitch :bold t :height 1.8)))
    `(column-marker-1 ((t :foreground ,ad-darkest :background ,ad-gray-dark)))
    ;; I haven't figured out the company-* faces marked with magenta yet.
    `(company-echo ((t :foreground "green" :background "magenta")))
    `(company-echo-common ((t :foreground "green" :background "magenta")))
    `(company-preview ((t :foreground "green" :background "magenta")))
    `(company-preview-common ((t :foreground ,ad-gray-dark
                                 :background ,ad-darkest)))
    `(company-preview-search ((t :foreground "green" :background "magenta")))
    `(company-scrollbar-bg ((t :background ,ad-gray-dark)))
    `(company-scrollbar-fg ((t :background ,ad-darkest)))
    `(company-template-field ((t :foreground "green" :background "magenta")))
    `(company-tooltip ((t :foreground ,ad-darkest
                          :background ,ad-gray-lightest)))
    `(company-tooltip-common ((t :foreground ,ad-darkest
                                 :background ,ad-lightest)))
    `(company-tooltip-common-selection ((t :foreground ,ad-darkest
                                           :background ,ad-highlight)))
    `(company-tooltip-mouse ((t :foreground ,ad-darkest
                                :background ,ad-highlight)))
    `(company-tooltip-selection ((t :foreground ,ad-darkest
                                    :background ,ad-keyword)))
    `(compilation-info ,font-lock-builtin-face)
    `(compilation-line-number ,font-lock-builtin-face)
    `(cua-rectangle ((t :background ,ad-gray-dark)))
    `(cursor ((t :background ,ad-highlight :foreground ,ad-darkest)))
    `(default ,default)
    ;; Using extra colors here, haven't thought of a better solution (problem
    ;; is on my current Emacs with split windows the left-most line of the
    ;; fringe dissapears, otherwise I could just have used a lighter gray).
    `(diff-hl-change ((t :foreground ,ad-link :background "#003333")))
    `(diff-hl-delete ((t :foreground ,ad-comment :background "#330000")))
    `(diff-hl-insert ((t :foreground ,ad-keyword :background "#005500")))
    `(dired-directory ,directory)
    `(dired-symlink ,symlink)
    `(diredp-date-time ,default)
    `(diredp-dir-heading ,default)
    `(diredp-dir-priv ,directory)
    `(diredp-exec-priv ,default)
    `(diredp-ignored-file-name ((t :foreground ,ad-gray-light)))
    `(diredp-file-name ,default)
    `(diredp-file-suffix ,default)
    `(diredp-link-priv ,default)
    `(diredp-no-priv ,default)
    `(diredp-number ,default)
    `(diredp-read-priv ,default)
    `(diredp-symlink ,symlink)
    `(diredp-write-priv ,default)
    `(elfeed-search-date-face ,subdued)
    `(elfeed-search-feed-face ,subdued)
    `(elfeed-search-tag-face ,default)
    `(elfeed-search-title-face ,subdued)
    `(elfeed-search-unread-title-face ,default)
    `(erc-input-face ,font-lock-builtin-face)
    `(erc-my-nick-face ,font-lock-builtin-face)
    `(erc-notice-face ((t :foreground ,ad-gray-light)))
    `(erc-prompt-face ((t :inverse-video t)))
    `(erc-timestamp-face ((t :foreground ,ad-gray-light)))
    `(error ,error)
    `(escape-glyph ,error)
    `(eshell-ls-archive ,font-lock-string-face)
    `(eshell-ls-backup ,font-lock-string-face)
    `(eshell-ls-directory ,directory)
    `(eshell-ls-executable ,font-lock-builtin-face)
    `(eshell-ls-readonly ,font-lock-comment-face)
    `(eshell-ls-symlink ,symlink)
    `(eshell-prompt ,directory)
    `(fg:erc-color-face2 ,directory)  ; too dark otherwise
    `(fg:erc-color-face12 ,directory)  ; too dark otherwise
    `(flyspell-duplicate ((t :foreground ,ad-red :underline t)))
    `(flyspell-incorrect ((t :foreground ,ad-comment :underline t)))
    `(font-lock-builtin-face ,keyword)
    ;`(font-lock-builtin-face ,default)
    `(font-lock-comment-delimiter-face ,font-lock-comment-face)
    `(font-lock-comment-face ,font-lock-comment-face)
    `(font-lock-constant-face ,default)
    ;`(font-lock-doc-face ,font-lock-comment-face)  ; see below …-string-face
    `(font-lock-function-name-face ,default)
    `(font-lock-keyword-face ,default)
    ;`(font-lock-keyword-face ,keyword)  ; too much noise in some PLs
    `(font-lock-negation-char-face ,default)
    `(font-lock-preprocessor-face ,default)
    `(font-lock-regexp-grouping-backslash ,default)
    `(font-lock-regexp-grouping-construct ,default)
    `(font-lock-string-face ,font-lock-string-face)
    `(font-lock-doc-face ,font-lock-string-face)
    `(font-lock-type-face ,default)
    ;; Sigh.. this adds some needed partitioning for C++ but it's too much for
    ;; other languages.
    ;`(font-lock-type-face ((t :foreground "#8f8fbc")))
    `(font-lock-variable-name-face ,default)
    `(font-lock-warning-face ,error)
    `(fringe ((t :background ,ad-gray-darkest)))
    `(gnus-button ,default)
    `(gnus-group-mail-2 ,default)
    `(gnus-group-mail-2-empty ,subdued)
    `(gnus-group-mail-3 ,default)
    `(gnus-group-mail-3-empty ,subdued)
    `(gnus-group-mail-low ,subdued)
    `(gnus-group-mail-low-empty ,subdued)
    `(gnus-header-content ,keyword)
    `(gnus-header-name ,keyword)
    `(gnus-header-subject ,default)
    `(gnus-summary-normal-ancient ,subdued)
    `(gnus-summary-cancelled ,font-lock-comment-face)
    `(gnus-summary-normal-read ,font-lock-string-face)
    `(gnus-summary-normal-ticked ,keyword)
    `(gnus-summary-selected ,directory)
    `(header-line ((t :foreground ,ad-gray-lightest
                      :background ,ad-gray-darkest :box nil)))
    `(helm-ff-directory ,directory)
    `(helm-ff-executable ,font-lock-builtin-face)
    `(helm-ff-file ,default)
    `(helm-ff-symlink ,symlink)
    `(highlight ((t :background ,ad-highlight :foreground ,ad-darkest)))
    ;`(hl-line ((t :background ,ad-gray-darkest)))  ;; not dark enough
    `(hl-line ((t :background "#141414")))
    ;`(hi-yellow ,highlight)
    `(isearch ((t :background ,ad-lightest :foreground ,ad-darkest)))
    `(jabber-activity-face ((t :foreground ,ad-string)))
    `(jabber-activity-personal-face ((t :foreground ,ad-highlight)))
    `(jabber-chat-prompt-local ((t :foreground ,ad-keyword)))
    `(jabber-chat-prompt-foreign ((t :foreground ,ad-gray-light)))
    `(jabber-chat-prompt-system ((t :foreground ,ad-gray-light)))
    `(jabber-rare-time-face ((t :bold t :underline t)))
    `(jabber-roster-user-away ,font-lock-string-face)
    `(jabber-roster-user-offline ((t :foreground ,ad-gray-light)))
    `(jabber-roster-user-online ,font-lock-builtin-face)
    `(jabber-roster-user-xa ,font-lock-comment-face)
    `(jabber-title-large ((t :inherit variable-pitch :bold t :height 1.8)))
    `(jabber-title-medium ((t :inherit variable-pitch :bold t :height 1.4)))
    `(js2-function-param ,default)
    `(js2-jsdoc-tag ,font-lock-comment-face)
    `(js2-jsdoc-type ,font-lock-comment-face)
    `(js2-jsdoc-value ,font-lock-comment-face)
    `(js2-external-variable ,font-lock-builtin-face)
    `(lazy-highlight ((t :background ,ad-gray-light :foreground ,ad-darkest)))
    `(link ,link)
    `(link-visited ((t :foreground ,ad-string :underline t)))
    `(minibuffer-prompt ,bold)
    `(magit-item-highlight ((t)))
    `(magit-diff-add ,font-lock-builtin-face)
    `(magit-diff-del ,font-lock-comment-face)
    `(magit-diff-file-header ,bold)
    `(magit-diff-hunk-header ((t :bold t :foreground ,ad-link)))
    `(magit-log-sha1 ((t :foreground ,ad-highlight)))
    `(match ,symlink)
    `(message-header-cc ,subdued)
    `(message-header-name ,font-lock-builtin-face)
    `(message-header-other ,subdued)
    `(message-header-subject ,default)
    `(message-header-to ,default)
    `(message-separator ,font-lock-comment-face)
    `(mode-line ((t :foreground ,ad-darkest :background ,ad-gray-light
                    :box nil)))
    `(mode-line-buffer-id ,bold)
    `(mode-line-emphasis ,bold)
    `(mode-line-highlight ((t :foreground ,ad-darkest
                              :background ,ad-lightest)))
    `(mode-line-inactive ((t :foreground ,ad-darkest :background ,ad-gray-dark
                             :box nil)))
    `(mu4e-header-highlight-face ((t :inverse-video t)))
    `(mu4e-unread-face ,directory)
    `(mu4e-view-header-key-face ,font-lock-builtin-face)
    `(mu4e-view-header-value-face ,font-lock-builtin-face)
    `(org-block ,font-lock-string-face)
    `(org-code ,font-lock-string-face)
    `(org-date ,link)
    `(org-done ((t :foreground ,ad-keyword :bold t)))
    `(org-document-info ((t :inherit org-document-info-keyword)))
    `(org-document-title ((t :inherit org-document-info-keyword)))
    `(org-level-1 ,bold)
    `(org-level-2 ,bold)
    `(org-level-3 ,bold)
    `(org-level-4 ,bold)
    `(org-level-5 ,bold)
    `(org-level-6 ,bold)
    `(org-level-7 ,bold)
    `(org-level-8 ,bold)
    `(org-link ,link)
    `(org-table ,font-lock-builtin-face)
    `(org-todo ((t :foreground ,ad-comment :bold t)))
    `(org-verbatim ,font-lock-string-face)
    `(powerline-active1 ((t :inherit mode-line :foreground ,ad-gray-lightest :background "grey22")))
    `(powerline-evil-emacs-face ((t :background ,ad-red)))
    `(powerline-evil-insert-face ((t :background ,ad-keyword)))
    `(powerline-evil-motion-face ((t :background ,ad-link)))
    `(powerline-evil-normal-face ((t :background ,ad-comment)))
    `(powerline-evil-operator-face ((t :background ,ad-link)))
    `(powerline-evil-visual-face ((t :background ,ad-string)))
    `(powerline-inactive1 ((t :inherit mode-line-inactive :foreground ,ad-gray-lightest :background "grey11")))
    `(pulse-highlight-start-face ((t :foreground ,ad-darkest :background ,ad-highlight)))
    `(region ((t :background ,ad-gray-dark)))
    `(sh-quoted-exec ,default)
    `(shadow ((t :foreground ,ad-gray-light)))
    `(show-paren-match ((t :inverse-video t)))
    `(slime-repl-input-face ,default)
    `(slime-repl-inputed-output-face ((t :foreground ,ad-gray-light)))
    `(slime-repl-output-face ,font-lock-comment-face)
    `(slime-repl-prompt-face ,bold)
    `(sp-pair-overlay-face ((t)))
    `(vertical-border ((t :foreground ,ad-darkest)))
    `(trailing-whitespace ((t :background ,ad-comment)))
    `(twittering-uri-face ,link)
    `(twittering-username-face ,font-lock-builtin-face)
    `(warning ((t :foreground ,ad-highlight)))
    `(which-func ((t :foreground ,ad-gray-lightest)))
    `(whitespace-tab ((t :foreground ,ad-gray-dark)))
    `(wl-highlight-message-cited-text-2 ((t :foreground ,ad-gray-light)))
    `(wl-highlight-message-citation-header ((t :bold t :foreground ,ad-gray-light)))
    `(wl-highlight-message-header-contents ((t :inherit wl-highlight-message-headers)))
    `(wl-highlight-message-important-header-contents ((t :bold t :foreground ,ad-link)))
    `(wl-highlight-message-important-header-contents2 ((t :bold t :foreground ,ad-keyword)))
    `(wl-highlight-message-signature ((t :foreground ,ad-gray-dark)))
    `(wl-highlight-message-unimportant-header-contents ((t :inherit wl-highlight-message-headers)))
    `(wl-highlight-summary-answered-face ((t :foreground ,ad-keyword)))
    `(wl-highlight-summary-forwarded-face ((t :foreground ,ad-link)))
    `(wl-highlight-summary-new-face ((t :foreground ,ad-lightest)))
    `(wl-highlight-summary-normal-face ((t :foreground ,ad-gray-light)))
    `(wl-highlight-summary-thread-top-face ((t :foreground ,ad-gray-light)))
    ))

(provide-theme 'aerique-dark)