-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdistraction-free-theme.el
292 lines (260 loc) · 15.1 KB
/
distraction-free-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
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
;;; distraction-free-theme.el --- A minimal theme intended to be used with writeroom-mode
;;
;; Author: Daniel Schoenig
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;;; Commentary:
;;
;; Based on the monochrome theme. Colours are inspired by iA Writer.
(deftheme distraction-free
"A minimal theme for distraction-free writing.")
(let ((class '((class color) (min-colors 10)))
(black "#141414")
(white "#f5f5f5")
(lgray "#d4d4d4")
(dgray "#303030")
(sgray "#606060")
(blue "#1dafe6")
(lblue "#b3e2f2"))
(custom-theme-set-faces
'distraction-free
`(default ((,class (:foreground ,black :background ,white))))
`(cursor ((,class (:background ,blue))))
;; Highlighting faces
`(fringe ((,class (:foreground ,black :background ,white))))
`(highlight ((,class (:foreground ,black :background ,white))))
`(region ((,class (:foreground ,black :background ,lblue))))
`(secondary-selection ((,class (:foreground: ,black :background ,lgray))))
`(isearch ((,class (:foreground ,white :background ,sgray))))
`(lazy-highlight ((,class (:foreground ,black :background ,lgray))))
`(linum ((,class (:foreground ,dgray))))
`(trailing-whitespace ((,class (:background ,lblue))))
;; auto-complete and popups
`(ac-completion-face ((,class (:background ,white :foreground ,dgray))))
;; `(tooltip ((,class (:background ,white :foreground ,dgray :bold nil :italic nil :underline nil))))
;; `(popup-enu-selection-face ((,class (:background ,white :foreground ,dgray))))
;; `(popup-face ((,class (:background ,white :foreground ,dgray))))
;; `(popup-isearch-match ((,class (:inherit match))))
;; `(popup-menu-face ((,class (:background ,white :foreground ,dgray))))
;; `(popup-menu-mouse-face ((,class (:inherit highlight))))
;; `(popup-scroll-bar-background-face ((,class (:background ,lgray))))
;; `(popup-scroll-bar-foreground-face ((,class (:background ,dgray))))
;; `(popup-tip-face ((,class (:background ,white :foreground ,dgray :bold nil :italic nil :underline nil))))
`(company-echo-common ((,class (:background ,dgray :foreground ,white))))
`(company-preview ((,class (:background ,white :foreground ,dgray))))
`(company-preview-common ((,class (:background ,white :foreground ,dgray))))
`(company-preview-search ((,class (:inherit match))))
`(company-scrollbar-bg ((,class (:background ,lgray))))
`(company-scrollbar-fg ((,class (:background ,dgray))))
`(company-template-field ((,class (:inherit region))))
`(company-tooltip ((,class (:background ,lgray :foreground ,dgray))))
`(company-tooltip-annotation ((,class (:foreground ,dgray))))
`(company-tooltip-common ((,class (:background ,lgray :foreground ,dgray :underline t))))
`(company-tooltip-common-selection ((,class (:foreground ,dgray))))
`(company-tooltip-mouse ((,class (:inherit highlight))))
`(company-tooltip-search ((,class (:inherit match))))
`(company-tooltip-selection ((,class (:background ,lblue, :foreground ,dgray))))
;; writegood-mode faces
`(writegood-weasels-face ((,class (:foreground ,black :background "#fb9a99" :underline nil))))
`(writegood-passive-voice-face ((,class (:foreground ,black :background "#b2df8a" :underline nil))))
`(writegood-duplicates-face ((,class (:foreground ,black :background "#cab2d6" :underline nil))))
;; Mode line faces
`(mode-line ((,class (:box (:line-width -1 :style released-button)
:background "#e5e5e5" :foreground ,dgray))))
`(mode-line-inactive ((,class (:box (:line-width -1 :style released-button)
:background "#b0b0b0"
:foreground ,black))))
;; Window dividers
`(window-divider ((,class (:foreground ,white :background ,white))))
`(window-divider-first-pixel ((,class (:foreground ,white :background ,white))))
`(window-divider-last-pixel ((,class (:foreground ,white :background ,white))))
;; Whitespace-mode
`(whitespace-empty ((,class (:background unspecified :foreground ,lblue))))
`(whitespace-line ((,class (:background ,lgray :foreground ,black))))
;; Escape and prompt faces
`(minibuffer-prompt ((,class (:weight bold :foreground ,dgray))))
`(escape-glyph ((,class (:foreground ,dgray))))
`(error ((,class (:background ,dgray :weight bold :slant italic :foreground "red"))))
`(warning ((,class (:background ,dgray :foreground ,blue))))
`(success ((,class (:background ,dgray :foreground "green"))))
;; Font lock faces
`(font-lock-builtin-face ((,class (:foreground ,dgray))))
`(font-lock-comment-face ((,class (:slant italic :foreground ,sgray))))
`(font-lock-constant-face ((,class (:weight bold :foreground ,dgray))))
`(font-lock-function-name-face ((,class (:foreground ,black))))
`(font-lock-keyword-face ((,class (:weight bold :foreground ,black))))
`(font-lock-string-face ((,class (:slant italic :foreground ,black))))
`(font-lock-type-face ((,class (:weight bold :foreground ,dgray))))
`(font-lock-variable-name-face ((,class (:weight bold :foreground ,dgray))))
`(font-lock-warning-face ((,class (:foreground ,blue))))
;; Button and link faces
`(link ((,class (:underline nil :foreground ,dgray))))
`(link-visited ((,class (:underline nil :foreground ,dgray))))
;; Markdown mode
`(markdown-italic-face ((,class (:underline nil :slant italic))))
;; Show-paren
`(show-paren-match ((t (:foreground ,black :underline nil :weight bold))))
`(show-paren-mismatch ((t (:background "red"))))
;; Speedbar
`(speedbar-button-face ((,class (:foreground ,lgray))))
`(speedbar-file-face ((,class (:foreground ,dgray))))
`(speedbar-directory-face ((,class (:weight bold :foreground ,black))))
`(speedbar-tag-face ((,class (:foreground ,lgray))))
`(speedbar-selected-face ((,class (:underline ,lgray :foreground ,dgray))))
`(speedbar-highlight-face ((,class (:weight bold :background ,white :foreground ,black))))
;; ido
`(ido-first-match ((,class (:foreground ,dgray))))
`(ido-only-match ((,class (:underline ,dgray :eoreground ,dgray))))
`(ido-subdir ((,class (:weight bold :foreground ,black))))
;; MuMaMo
`(mumamo-background-chunk-major ((,class (:background ,white))))
`(mumamo-background-chunk-submode1 ((,class (:background ,white))))
`(mumamo-background-chunk-submode2 ((,class (:background ,white))))
`(mumamo-background-chunk-submode3 ((,class (:background ,white))))
`(mumamo-background-chunk-submode4 ((,class (:background ,white))))
`(mumamo-border-face-in ((,class (:slant unspecified :underline unspecified
:weight bold :foreground ,black))))
`(mumamo-border-face-out ((,class (:slant unspecified :underline unspecified
:weight bold :foreground ,black))))
;; Gnus faces
`(gnus-group-news-1 ((,class (:weight bold :foreground ,dgray))))
`(gnus-group-news-1-low ((,class (:foreground ,dgray))))
`(gnus-group-news-2 ((,class (:weight bold :foreground ,dgray))))
`(gnus-group-news-2-low ((,class (:foreground ,dgray))))
`(gnus-group-news-3 ((,class (:weight bold :foreground ,dgray))))
`(gnus-group-news-3-low ((,class (:foreground ,dgray))))
`(gnus-group-news-4 ((,class (:weight bold :foreground ,dgray))))
`(gnus-group-news-4-low ((,class (:foreground ,dgray))))
`(gnus-group-news-5 ((,class (:weight bold :foreground ,lgray))))
`(gnus-group-news-5-low ((,class (:foreground ,lgray))))
`(gnus-group-news-low ((,class (:foreground ,dgray))))
`(gnus-group-mail-1 ((,class (:weight bold :foreground ,dgray))))
`(gnus-group-mail-1-low ((,class (:foreground ,dgray))))
`(gnus-group-mail-2 ((,class (:weight bold :foreground ,dgray))))
`(gnus-group-mail-2-low ((,class (:foreground ,dgray))))
`(gnus-group-mail-3 ((,class (:weight bold :foreground ,dgray))))
`(gnus-group-mail-3-low ((,class (:foreground ,dgray))))
`(gnus-group-mail-low ((,class (:foreground ,dgray))))
`(gnus-header-content ((,class (:foreground ,dgray))))
`(gnus-header-from ((,class (:weight bold :foreground ,dgray))))
`(gnus-header-subject ((,class (:foreground ,dgray))))
`(gnus-header-name ((,class (:foreground ,dgray))))
`(gnus-header-newsgroups ((,class (:foreground ,dgray))))
;; Message faces
`(message-header-name ((,class (:foreground ,dgray))))
`(message-header-cc ((,class (:foreground ,dgray))))
`(message-header-other ((,class (:foreground ,dgray))))
`(message-header-subject ((,class (:foreground ,dgray))))
`(message-header-to ((,class (:weight bold :foreground ,dgray))))
`(message-cited-text ((,class (:slant italic :foreground ,dgray))))
`(message-separator ((,class (:weight bold :foreground ,dgray))))
;; EShell
`(eshell-prompt ((,class (:foreground ,black :bold t))))
`(eshell-ls-archive ((,class (:inherit eshell-ls-unreadable))))
`(eshell-ls-backup ((,class (:inherit eshell-ls-unreadable))))
`(eshell-ls-clutter ((,class (:inherit eshell-ls-unreadable))))
`(eshell-ls-directory ((,class (:foreground ,dgray :bold t))))
`(eshell-ls-executable ((,class (:inherit eshell-ls-unreadable))))
`(eshell-ls-missing ((,class (:inherit eshell-ls-unreadable))))
`(eshell-ls-product ((,class (:inherit eshell-ls-unreadable))))
`(eshell-ls-readonly ((,class (:inherit eshell-ls-unreadable))))
`(eshell-ls-special ((,class (:inherit eshell-ls-unreadable))))
`(eshell-ls-symlink ((,class (:inherit eshell-ls-unreadable))))
;; Org-mode
`(org-level-1 ((t (:bold t :foreground ,dgray :height 1.5))))
`(org-level-2 ((t (:bold nil :foreground ,dgray :height 1.2))))
`(org-level-3 ((t (:bold t :foreground ,dgray :height 1.0))))
`(org-level-4 ((t (:bold nil :foreground ,dgray :height 1.0))))
`(org-link ((t (:foreground ,sgray :underline nil))))
`(org-todo ((t (:bold t :foreground "red"))))
`(org-done ((t (:bold t :foreground "green"))))
;; helm
`(helm-header ((t (:foreground ,dgray :background ,white :underline nil :box nil))))
`(helm-source-header
((t (:foreground ,dgray
:underline nil
:weight bold
:box (:line-width 1 :style released-button)))))
`(helm-selection ((t (:underline t :foreground ,dgray))))
`(helm-visible-mark ((t (:foreground ,dgray :background ,white))))
`(helm-candidate-number ((t (:foreground ,dgray :background ,white))))
`(helm-separator ((t (:foreground ,dgray :background ,white))))
`(helm-time-zone-current ((t (:foreground ,dgray :background ,white))))
`(helm-time-zone-home ((t (:foreground ,dgray :background ,white))))
`(helm-bookmark-addressbook ((t (:foreground ,dgray :background ,white))))
`(helm-bookmark-directory ((t (:foreground nil :background nil :inherit helm-ff-directory))))
`(helm-bookmark-file ((t (:foreground nil :background nil :inherit helm-ff-file))))
`(helm-bookmark-gnus ((t (:foreground ,dgray :background ,white))))
`(helm-bookmark-info ((t (:foreground ,dgray :background ,white))))
`(helm-bookmark-man ((t (:foreground ,dgray :background ,white))))
`(helm-bookmark-w3m ((t (:foreground ,dgray :background ,white))))
`(helm-buffer-not-saved ((t (:foreground ,dgray :background ,white))))
`(helm-buffer-process ((t (:foreground ,dgray :background ,white))))
`(helm-buffer-saved-out ((t (:foreground ,dgray :background ,white))))
`(helm-buffer-size ((t (:foreground ,dgray :background ,white))))
`(helm-ff-directory ((t (:foreground ,dgray :background ,white :weight bold))))
`(helm-ff-file ((t (:foreground ,dgray :background ,white :weight normal))))
`(helm-ff-executable ((t (:foreground ,dgray :background ,white :weight normal))))
`(helm-ff-invalid-symlink ((t (:foreground ,white :background ,white :weight bold))))
`(helm-ff-symlink ((t (:foreground ,dgray :background ,white :weight bold))))
`(helm-ff-prefix ((t (:foreground ,dgray :background ,white :weight normal))))
`(helm-grep-cmd-line ((t (:foreground ,dgray :background ,white))))
`(helm-grep-file ((t (:foreground ,dgray :background ,white))))
`(helm-grep-finish ((t (:foreground ,dgray :background ,white))))
`(helm-grep-lineno ((t (:foreground ,dgray :background ,white))))
`(helm-grep-match ((t (:foreground nil :background nil :inherit helm-match))))
`(helm-grep-running ((t (:foreground ,dgray :background ,white))))
`(helm-moccur-buffer ((t (:foreground ,dgray :background ,white))))
`(helm-mu-contacts-address-face ((t (:foreground ,dgray :background ,white))))
`(helm-mu-contacts-name-face ((t (:foreground ,dgray :background ,white))))
;; Flyspell
`(flyspell-duplicate ((,class (:weight unspecified :foreground unspecified :slant unspecified :underline ,dgray))))
`(flyspell-incorrect ((,class (:weight unspecified :foreground unspecified :slant unspecified :underline ,dgray)))))
(custom-theme-set-variables
'distraction-free
`(ansi-color-names-vector [,white ,dgray ,lgray ,sgray, blue, lblue])))
;; Focus for distraction-free spacemacs layer
(defun distraction-free-focus-on ()
(interactive)
(set-face-attribute 'default nil :foreground "#d4d4d4" :background "#f5f5f5")
(set-face-attribute 'font-lock-builtin-face nil :foreground "#d4d4d4")
(set-face-attribute 'font-lock-comment-face nil :foreground "#d4d4d4")
(set-face-attribute 'font-lock-constant-face nil :foreground "#d4d4d4")
(set-face-attribute 'font-lock-function-name-face nil :foreground "#d4d4d4")
(set-face-attribute 'font-lock-keyword-face nil :foreground "#d4d4d4")
(set-face-attribute 'font-lock-string-face nil :foreground "#d4d4d4")
(set-face-attribute 'font-lock-type-face nil :foreground "#d4d4d4")
(set-face-attribute 'font-lock-variable-name-face nil :foreground "#d4d4d4")
(set-face-attribute 'font-lock-warning-face nil :foreground "#d4d4d4")
(set-face-attribute 'sp-show-pair-match-face nil :foreground "#d4d4d4")
(set-face-attribute 'show-paren-match nil :foreground "#d4d4d4")
(set-face-attribute 'show-paren-mismatch nil :background "#f5f5f5")
)
(defun distraction-free-focus-off ()
(interactive)
(set-face-attribute 'default nil :foreground "#141414" :background "#f5f5f5")
(set-face-attribute 'font-lock-builtin-face nil :foreground "#303030")
(set-face-attribute 'font-lock-comment-face nil :foreground "#606060")
(set-face-attribute 'font-lock-constant-face nil :foreground "#303030")
(set-face-attribute 'font-lock-function-name-face nil :foreground "#141414")
(set-face-attribute 'font-lock-keyword-face nil :foreground "#141414")
(set-face-attribute 'font-lock-string-face nil :foreground "#606060")
(set-face-attribute 'font-lock-type-face nil :foreground "#303030")
(set-face-attribute 'font-lock-variable-name-face nil :foreground "#d4d4d4")
(set-face-attribute 'font-lock-warning-face nil :foreground "1dafe6")
(set-face-attribute 'sp-show-pair-match-face nil :foreground "#141414")
(set-face-attribute 'show-paren-match nil :foreground "#141414")
(set-face-attribute 'show-paren-mismatch nil :background "red")
)
;; Autoload for MELPA
;;;###autoload
(when (and (boundp 'custom-theme-load-path) load-file-name)
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide-theme 'distraction-free)
;; Local Variables:
;; no-byte-compile: t
;; End:
;;; distraction-free-theme.el ends here