1 ;;; refinery-theme.el --- refined, minimalist, layered theme -*- lexical-binding: t; -*-
3 ;; Copyright (C) 2020 Amin Bandali
5 ;; Author: Amin Bandali <bandali@gnu.org>
9 ;; This program is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation, either version 3 of the License, or
12 ;; (at your option) any later version.
14 ;; This program is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
24 ;; Refinery is a refined, minimalist theme inspired by the beautiful
25 ;; Commentary theme by Simon Zelazny. Like Commentary, Refinery uses
26 ;; a concept of ``layers'' of style to visually accentuate the more
27 ;; important parts text in a useful yet subtle way, while keeping the
28 ;; distractions at a minimum.
30 ;; 1. Comments are in red, so they easily stand out!
32 ;; 2. Strings have a subtle light yellow background, so as to help
33 ;; make it easier to spot their beginning and end points.
35 ;; 3. Function/macro definitions are in bold to help them stand out
36 ;; from ordinary text.
41 "A minimalist high-contrast theme for GNU Emacs.
42 Includes themed faces for modes/packages like Isearch, Gnus,
43 Message, EBDB, and Ivy.")
45 (let* (;; supported classes of terminals
46 (class '((class color
) (min-colors 16)))
58 (red "#a40000") ; #d70000
63 (layer-2 `((,class
(:foreground
,grey-2
))))
64 (layer-1 `((,class
(:foreground
,grey-1
))))
65 (layer0 `((,class
(:foreground
,black
))))
66 (layer0-inv `((,class
(:background
,black
))))
67 (layer+1 `((,class
(:foreground
,black
:background
,yellow
))))
68 (layer+2 `((,class
(:foreground
,black
:weight bold
))))
69 (layer+3 `((,class
(:foreground
,red
))))
70 (layer+3b
`((,class
(:foreground
,red
:weight bold
))))
71 (layer+4 `((,class
(:foreground
,red
:background
,grey
))))
72 (layer+4-inv
`((,class
(:foreground
,grey
:background
,red
))))
73 (layer+4b
`((,class
(:foreground
,red
:background
,grey
:weight bold
))))
74 (layer+4b-inv
`((,class
(:foreground
,grey
:background
,red
:weight bold
))))
77 (box `(:line-width -
1 :style released-button
)))
79 (custom-theme-set-faces
86 `(linum ((,class
(:background
,grey
))))
87 `(fringe ((,class
(:background
,white
))))
88 `(highlight ((,class
(:background
,yellow
+2))))
89 `(hl-line ((,class
(:background
,yellow
+1))))
90 `(region ((,class
(:background
,yellow
+1))))
91 `(secondary-selection ((,class
(:background
,yellow
+2))))
92 `(isearch ((,class
(:foreground
,white
:background
,grey-1
))))
93 `(lazy-highlight ((,class
(:background
,grey
))))
94 `(trailing-whitespace ,layer
+4b-inv
)
95 `(whitespace-trailing ,layer
+4b-inv
)
98 `(show-paren-match ,layer
+4b
)
99 `(show-paren-mismatch ,layer
+4b-inv
)
101 ;; Comments and documentation
102 `(font-lock-comment-face ,layer
+3)
103 `(font-lock-doc-face ,layer
+3)
105 ;; Function definitions
106 `(font-lock-function-name-face ,layer
+2)
109 `(font-lock-string-face ,layer
+1)
111 ;; Constants, variables, and their types
112 `(font-lock-constant-face ,layer0
)
113 `(font-lock-variable-name-face ,layer0
)
114 `(font-lock-type-face ,layer0
)
116 ;; Built-ins and keywords
117 `(font-lock-builtin-face ,layer-1
)
118 `(font-lock-keyword-face ,layer-2
)
120 ;; Mode line and minibuffer prompt
121 `(mode-line ((,class
(:background
,grey
:box
,box
))))
122 `(mode-line-inactive ((,class
(:background
"#e1e1e1" :box
,box
))))
123 `(minibuffer-prompt ,layer
+2)
125 ;; Characters displayed as sequences using `^' or `\'
126 `(escape-glyph ,layer
+3)
128 ;; Gnus, Message, and EBDB
129 `(gnus-group-mail-3 ,layer
+2)
130 `(gnus-group-mail-3-empty ,layer-2
)
131 `(gnus-summary-normal-ticked ,layer
+3)
132 `(gnus-header-from ,layer
+3b
)
133 `(gnus-header-subject ,layer
+3)
134 `(gnus-header-name ,layer-2
)
135 `(gnus-header-content ,layer0
)
136 `(message-header-to ,layer
+3b
)
137 `(message-header-cc ,layer0
)
138 `(message-header-subject ,layer0
)
139 `(message-header-other ,layer-2
)
140 `(message-header-name ,layer-2
)
141 `(message-header-xheader ((,class
(:foreground
,blue
))))
142 `(ebdb-person-name ,layer
+3b
)
145 `(ivy-minibuffer-match-face-1 ((,class
(:background
"#eeeeee"))))
146 `(ivy-minibuffer-match-face-2 ((,class
(:background
,grey
:weight bold
))))
147 `(ivy-minibuffer-match-face-3 ((,class
(:background
"light goldenrod" :weight semi-bold
))))
148 `(ivy-minibuffer-match-face-4 ((,class
(:background
"misty rose" :weight semi-bold
))))
149 `(ivy-current-match ((((class color
) (background light
))
150 :background
"#d7d7d7" :foreground
,black
)
151 (((class color
) (background dark
))
152 :background
"#65a7e2" :foreground
,black
)))
154 ;; Error/failure, warning, and success
156 `(warning ((,class
(:foreground
,orange
))))
157 `(success ((,class
(:foreground
,green
)))))
159 (custom-theme-set-variables 'refinery
))
162 (when (and (boundp 'custom-theme-load-path
) load-file-name
)
163 (add-to-list 'custom-theme-load-path
164 (file-name-as-directory
165 (file-name-directory load-file-name
))))
167 (provide-theme 'refinery
)
168 ;;; refinery-theme.el ends here