You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

590 lines
31 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. ;;; zerodark-theme.el --- A dark, medium contrast theme for Emacs
  2. ;; Copyright (C) 2015-2016 Nicolas Petton
  3. ;; Author: Nicolas Petton <nicolas@petton.fr>
  4. ;; Keywords: themes
  5. ;; URL: https://github.com/NicolasPetton/zerodark-theme
  6. ;; Version: 2.1
  7. ;; Package: zerodark-theme
  8. ;; Package-Requires: ((s "1.9.0") (all-the-icons "2.0.0"))
  9. ;; This file is NOT part of GNU Emacs
  10. ;;; License:
  11. ;;
  12. ;; Zerodark (https://github.com/zerodark-theme) is licensed under a
  13. ;; Creative Commons Attribution-ShareAlike 4.0 International License.
  14. ;;; Commentary:
  15. ;;
  16. ;; A dark theme inspired from One Dark and Niflheim.
  17. ;;
  18. ;; An optional mode-line format can be enabled with
  19. ;; `zerodark-setup-modeline-format'.
  20. ;;
  21. ;;; Code:
  22. (require 's)
  23. (require 'all-the-icons)
  24. (deftheme zerodark
  25. "A dark medium contrast theme")
  26. (defgroup zerodark
  27. nil
  28. "A dark theme inspired from One Dark and Niflheim.")
  29. (defcustom zerodark-use-paddings-in-mode-line t
  30. "When non-nil, use top and bottom paddings in the mode-line."
  31. :type 'boolean
  32. :group 'zerodark)
  33. (defcustom zerodark-use-high-contrast-in-mode-line t
  34. "When non-nil, use more contrast for the active mode-line."
  35. :type 'boolean
  36. :group 'zerodark)
  37. (defvar zerodark-modeline-position ":%l:%c %p "
  38. "Mode line construct for displaying the position in the buffer.")
  39. (defvar zerodark-modeline-buffer-identification '(:eval (propertize "%b" 'face 'bold))
  40. "Mode line construct for displaying the position in the buffer.")
  41. (defvar zerodark-modeline-modified '(:eval (if (buffer-modified-p (current-buffer))
  42. (all-the-icons-faicon "floppy-o" :height 1 :v-adjust 0)
  43. (all-the-icons-faicon "check" :height 1 :v-adjust 0))))
  44. (defvar zerodark-modeline-ro '(:eval (if buffer-read-only (propertize "RO " 'face 'bold) "")))
  45. (defvar zerodark-buffer-coding '(:eval (unless (eq buffer-file-coding-system (default-value 'buffer-file-coding-system))
  46. mode-line-mule-info)))
  47. (defvar zerodark-modeline-vc '(vc-mode (" "
  48. (:eval (all-the-icons-faicon "code-fork" :height 1 :v-adjust 0))
  49. (:eval (s-truncate 25 vc-mode)))))
  50. (defun true-color-p ()
  51. (or
  52. (display-graphic-p)
  53. (= (tty-display-color-cells) 16777216)))
  54. (let ((class '((class color) (min-colors 89)))
  55. (default (if (true-color-p) "#abb2bf" "#afafaf"))
  56. (light (if (true-color-p) "#ccd4e3" "#d7d7d7"))
  57. (background (if (true-color-p) "#282c34" "#333333"))
  58. (background-darker (if (true-color-p) "#21252b" "#222222"))
  59. (mode-line-inactive (if "#1c2129" "#222222"))
  60. (mode-line-active (if (true-color-p) "#6f337e" "#875f87"))
  61. (background-lighter (if (true-color-p) "#3a3f4b" "#5f5f5f"))
  62. (background-red (if (true-color-p) "#4c3840" "#5f5f5f"))
  63. (background-purple (if (true-color-p) "#48384c" "#5f5f5f"))
  64. (background-blue (if (true-color-p) "#38394c" "#444444"))
  65. (background-green (if (true-color-p) "#3d4a41" "#5f5f5f"))
  66. (background-orange (if (true-color-p) "#4a473d" "#5f5f5f"))
  67. (hl-line (if (true-color-p) "#2c323b" "#333333"))
  68. (grey (if (true-color-p) "#cccccc" "#cccccc"))
  69. (grey-dark (if (true-color-p) "#666666" "#666666"))
  70. (highlight (if (true-color-p) "#3e4451" "#5f5f5f"))
  71. (comment (if (true-color-p) "#687080" "#707070"))
  72. (orange (if (true-color-p) "#da8548" "#d7875f"))
  73. (orange-light (if (true-color-p) "#ddbd78" "#d7af87"))
  74. (red (if (true-color-p) "#ff6c6b" "#ff5f5f"))
  75. (purple (if (true-color-p) "#c678dd" "#d787d7"))
  76. (purple-dark (if (true-color-p) "#64446d" "#5f5f5f"))
  77. (blue (if (true-color-p) "#61afef" "#5fafff"))
  78. (blue-dark (if (true-color-p) "#1f5582" "#005f87"))
  79. (green (if (true-color-p) "#98be65" "#87af5f"))
  80. (green-light (if (true-color-p) "#9eac8c" "#afaf87"))
  81. (peach "PeachPuff3")
  82. (diff-added-background (if (true-color-p) "#284437" "#284437"))
  83. (diff-added-refined-background (if (true-color-p) "#198754" "#00875f"))
  84. (diff-removed-background (if (true-color-p) "#583333" "#580000"))
  85. (diff-removed-refined-background (if (true-color-p) "#981b1b" "#870000"))
  86. (diff-current-background (if (true-color-p) "#3e4d58" "#5f;5f5f"))
  87. (diff-current-refined-background (if (true-color-p) "#456981" "#5f5f87")))
  88. (custom-theme-set-faces
  89. 'zerodark
  90. `(default ((,class (:background ,background :foreground ,default))))
  91. `(cursor ((,class (:background ,default))))
  92. ;; Highlighting faces
  93. `(fringe ((,class (:background ,background))))
  94. `(highlight ((,class (:background ,highlight :foreground ,default :underline nil))))
  95. `(region ((,class (:background ,highlight :foreground ,default))))
  96. `(secondary-selection ((,class (:background ,highlight :foreground ,default))))
  97. `(isearch ((,class (:background ,orange-light :foreground ,highlight))))
  98. `(lazy-highlight ((,class (:background ,grey-dark :foreground ,orange-light))))
  99. `(hl-line ((,class (:background ,hl-line :underline unspecified :inherit nil))))
  100. `(match ((,class (:background ,background-green))))
  101. ;; Font lock faces
  102. `(font-lock-builtin-face ((,class (:foreground ,blue :weight bold))))
  103. `(font-lock-comment-face ((,class (:foreground ,comment :slant italic))))
  104. `(font-lock-constant-face ((,class (:foreground ,orange :weight bold))))
  105. `(font-lock-function-name-face ((,class (:foreground ,blue))))
  106. `(font-lock-keyword-face ((,class (:foreground ,purple :weight bold))))
  107. `(font-lock-string-face ((,class (:foreground ,green))))
  108. `(font-lock-doc-face ((,class (:foreground ,green-light))))
  109. `(font-lock-type-face ((,class (:foreground ,blue))))
  110. `(font-lock-variable-name-face ((,class (:foreground ,blue))))
  111. `(font-lock-warning-face ((,class (:foreground ,red :weight bold :background ,background-red))))
  112. ;; Mode line faces
  113. `(mode-line ((,class (:background ,(if zerodark-use-high-contrast-in-mode-line
  114. mode-line-active
  115. background-blue)
  116. :height 0.9
  117. :foreground ,(if zerodark-use-high-contrast-in-mode-line
  118. light
  119. blue)
  120. :box ,(when zerodark-use-paddings-in-mode-line
  121. (list :line-width 5
  122. :color
  123. (if zerodark-use-high-contrast-in-mode-line
  124. mode-line-active
  125. background-blue)))))))
  126. `(mode-line-inactive ((,class (:background ,(if zerodark-use-high-contrast-in-mode-line
  127. mode-line-inactive
  128. background-darker)
  129. :height 0.9
  130. :foreground ,(if zerodark-use-high-contrast-in-mode-line
  131. comment
  132. default)
  133. :box ,(when zerodark-use-paddings-in-mode-line
  134. (list :line-width 5
  135. :color (if zerodark-use-high-contrast-in-mode-line
  136. mode-line-inactive
  137. background-darker)))))))
  138. `(header-line ((,class (:inherit mode-line-inactive))))
  139. ;; powerline
  140. `(powerline-active1 ((,class (:height 0.9 :foreground ,blue :background ,background-darker))))
  141. `(powerline-active2 ((,class (:height 0.9 :foreground ,blue :background ,background-lighter))))
  142. ;; mml
  143. `(message-mml-face ((,class (:foreground ,comment))))
  144. ;; Org-clock mode line
  145. `(org-mode-line-clock ((,class (:background unspecified (:inherit mode-line)))))
  146. ;; Escape and prompt faces
  147. `(minibuffer-prompt ((,class (:foreground ,blue :weight bold))))
  148. `(escape-glyph ((,class (:foreground ,blue :weight bold))))
  149. ;; linum
  150. `(linum ((,class (:foreground ,comment :background ,background))))
  151. ;; from hlinum
  152. `(linum-highlight-face ((,class (:foreground ,blue ,background ,background-blue))))
  153. ;; eshell
  154. `(eshell-prompt ((,class (:foreground ,orange :background ,background :weight bold))))
  155. `(eshell-ls-directory ((,class (:foreground ,purple :background ,background :weight bold))))
  156. `(eshell-ls-symlink ((,class (:foreground ,orange :background ,background :weight normal))))
  157. `(eshell-ls-executable ((,class (:foreground ,green :background ,background :weight bold))))
  158. ;; whitespace
  159. `(whitespace-space ((,class (:background unspecified :foreground ,highlight
  160. :inverse-video unspecified))))
  161. `(whitespace-hspace ((,class (:background unspecified :foreground ,highlight
  162. :inverse-video unspecified))))
  163. `(whitespace-tab ((,class (:background unspecified :foreground ,highlight
  164. :inverse-video unspecified))))
  165. `(whitespace-newline ((,class (:background unspecified :foreground ,highlight
  166. :inverse-video unspecified))))
  167. `(whitespace-trailing ((,class (:background ,red :foreground ,background :weight bold
  168. :inverse-video nil))))
  169. `(whitespace-line ((,class (:background unspecified :foreground ,red
  170. :inverse-video unspecified))))
  171. `(whitespace-space-before-tab ((,class (:inherit whitespace-space))))
  172. `(whitespace-space-after-tab ((,class (:inherit whitespace-space))))
  173. `(whitespace-indentation ((,class (:background unspecified :foreground ,highlight
  174. :inverse-video unspecified))))
  175. `(whitespace-empty ((,class (:background ,orange :foreground ,highlight
  176. :inverse-video unspecified))))
  177. ;; link faces
  178. `(link ((,class (:foreground ,blue :underline t))))
  179. `(link-visited ((,class (:foreground ,blue :underline t))))
  180. ;; widget faces
  181. `(widget-field ((,class (:background ,highlight :box (:line-width 1 :color ,comment)))))
  182. `(widget-button ((,class (:inherit link))))
  183. ;; custom
  184. `(custom-button ((,class (:background ,background-lighter :box (:line-width 2 :style released-button)))))
  185. `(custom-button-mouse ((,class (:background ,highlight :box (:line-width 2 :style released-button)))))
  186. `(custom-button-pressed ((,class (:background ,highlight :box (:line-width 2 :style pressed-button)))))
  187. `(custom-group-tag ((,class (:foreground ,purple :weight bold :height 1.4))))
  188. `(custom-variable-tag ((,class (:foreground ,purple :weight bold))))
  189. `(custom-state ((,class (:foreground ,green))))
  190. ;; compilation
  191. `(compilation-info ((,class (:foreground ,purple :weight bold))))
  192. `(compilation-warning ((,class (:foreground ,orange :weight bold))))
  193. `(compilation-error ((,class (:foreground ,red :weight bold))))
  194. `(compilation-line-number ((,class (:foreground ,green :weight bold))))
  195. `(compilation-mode-line-exit ((,class (:foreground ,green :weight bold :inverse-video nil))))
  196. `(compilation-mode-line-run ((,class (:foreground ,orange :weight bold))))
  197. `(compilation-mode-line-error ((,class (:foreground ,red :weight bold))))
  198. ;; dired
  199. `(dired-header ((,class (:foreground ,blue :weight bold))))
  200. `(dired-directory ((,class (:foreground ,purple :weight normal))))
  201. ;; magit
  202. `(magit-diff-context-highlight ((,class (:background ,background-darker))))
  203. `(magit-diff-file-heading ((,class (:weight bold :foreground ,blue))))
  204. `(magit-diff-file-heading-highlight ((,class (:weight bold :foreground ,blue :background ,background-blue))))
  205. `(magit-diff-removed-highlight ((,class (:background ,diff-removed-background))))
  206. `(magit-diff-removed ((,class (:background ,diff-removed-background))))
  207. `(magit-diff-added-highlight ((,class (:background ,diff-added-background))))
  208. `(magit-diff-added ((,class (:background ,diff-added-background))))
  209. `(magit-diff-lines-heading ((,class (:background ,blue-dark :foreground "white"))))
  210. `(magit-diff-hunk-heading ((,class (:background ,background-lighter))))
  211. `(magit-diff-hunk-heading-highlight ((,class (:background ,blue-dark))))
  212. `(magit-diff-hunk-heading ((,class (:background ,background-lighter))))
  213. `(magit-process-ok ((,class (:foreground ,green :weight bold))))
  214. `(magit-section-highlight ((,class (:background ,background-darker))))
  215. `(magit-section-heading ((,class (:foreground ,grey :weight bold))))
  216. `(magit-branch-current ((,class (:foreground ,blue :box 1))))
  217. `(magit-branch-local ((,class (:foreground ,purple :box 1))))
  218. `(magit-branch-remote ((,class (:foreground ,green :box 1))))
  219. `(magit-reflog-reset ((,class (:background ,background-red :foreground ,red :weight bold))))
  220. `(magit-reflog-amend ((,class (:background ,background-blue :foreground ,blue :weight bold))))
  221. `(magit-reflog-rebase ((,class (:background ,background-blue :foreground ,blue :weight bold))))
  222. `(magit-reflog-commit ((,class (:background ,background-green :foreground ,green :weight bold))))
  223. `(magit-reflog-checkout ((,class (:background ,background-orange :foreground ,orange :weight bold))))
  224. `(magit-reflog-cherry-pick ((,class (:background ,background-purple :foreground ,purple :weight bold))))
  225. `(magit-bisect-bad ((,class (:background ,background-red :foreground ,red :box 1))))
  226. `(magit-bisect-good ((,class (:background ,background-blue :foreground ,blue :box 1))))
  227. `(magit-blame-heading ((,class (:foreground ,green :background ,background-green :box 1))))
  228. `(git-commit-summary ((,class (:weight bold))))
  229. `(magit-tag ((,class (:foreground ,purple :weight bold :box 1 :background "#202020"))))
  230. `(magit-sequence-part ((,class (:foreground ,orange :weight bold))))
  231. `(magit-sequence-head ((,class (:foreground ,green :weight bold))))
  232. ;; Message faces
  233. `(message-header-name ((,class (:foreground ,blue :weight bold))))
  234. `(message-header-cc ((,class (:foreground ,purple))))
  235. `(message-header-other ((,class (:foreground ,purple))))
  236. `(message-header-subject ((,class (:foreground ,green))))
  237. `(message-header-to ((,class (:foreground ,purple))))
  238. `(message-cited-text ((,class (:foreground ,comment))))
  239. `(message-separator ((,class (:foreground ,red :weight bold))))
  240. ;; ido faces
  241. `(ido-first-match ((,class (:foreground ,purple :weight bold))))
  242. `(ido-only-match ((,class (:foreground ,purple :weight bold))))
  243. `(ido-subdir ((,class (:foreground ,blue))))
  244. ;; notmuch
  245. `(notmuch-message-summary-face ((,class (:background ,highlight :box (:line-width 2 :color ,background)))))
  246. `(notmuch-search-count ((,class (:foreground ,red :weight bold))))
  247. `(notmuch-search-matching-authors ((,class (:foreground ,comment))))
  248. `(notmuch-search-subject ((,class (:foreground ,default))))
  249. `(notmuch-search-unread-face ((,class (:weight bold))))
  250. `(notmuch-search-date ((,class (:foreground ,purple))))
  251. `(notmuch-crypto-part-header ((,class (:foreground ,blue))))
  252. `(notmuch-crypto-decryption ((,class (:foreground ,purple))))
  253. `(notmuch-crypto-signature-unknown ((,class (:foreground ,red))))
  254. `(notmuch-crypto-signature-good ((,class (:background ,blue :foreground ,background :weight bold))))
  255. `(notmuch-crypto-signature-good-key ((,class (:background ,blue :foreground ,background :weight bold))))
  256. `(notmuch-crypto-signature-bad ((,class (:background ,red :foreground ,background :weight bold))))
  257. `(notmuch-tag-face ((,class (:foreground ,green :weight bold))))
  258. ;; company
  259. `(company-preview ((,class (:background ,background-darker :foreground ,default))))
  260. `(company-preview-common ((,class (:background ,background-darker :foreground ,purple))))
  261. `(company-preview-search ((,class (:background ,blue :foreground ,default))))
  262. `(company-tooltip ((,class (:background ,background-darker :foreground ,default))))
  263. `(company-scrollbar-bg ((,class (:background ,background-darker))))
  264. `(company-scrollbar-fg ((,class (:background ,background-blue))))
  265. `(company-tooltip-common ((,class (:foreground ,purple :weight bold :background ,background-darker))))
  266. `(company-tooltip-annotation ((,class (:foreground ,blue :weight bold :background ,background-blue))))
  267. `(company-tooltip-common-selection ((,class (:foreground ,purple :background ,background-lighter :weight bold))))
  268. `(company-tooltip-selection ((,class (:foreground ,default :background ,background-lighter))))
  269. `(company-tooltip-mouse ((,class (:foreground ,default :background ,background-lighter))))
  270. ;; web-mode
  271. `(web-mode-html-tag-face ((,class (:foreground ,purple :weight bold))))
  272. `(web-mode-symbol-face ((,class (:foreground ,red :weight bold))))
  273. ;; js2-mode
  274. `(js2-function-param ((,class (:foreground ,blue))))
  275. `(js2-error ((,class (:foreground ,red))))
  276. ;; flycheck
  277. `(flycheck-fringe-error ((,class (:foreground ,red :background ,background-red :weight bold :inverse-video t))))
  278. `(flycheck-fringe-warning ((,class (:background ,background-orange :foreground ,orange :weight bold :inverse-video t))))
  279. `(flycheck-fringe-info ((,class (:background ,background-blue :foreground ,blue :weight bold :inverse-video t))))
  280. `(flycheck-warning ((,class (:underline (:color ,red :style wave)))))
  281. `(flycheck-error ((,class (:underline (:color ,red :style wave)))))
  282. ;; FIC
  283. `(font-lock-fic-face ((,class (:foreground ,background :background ,red :weight bold))))
  284. ;; org-mode todo
  285. `(org-hide ((,class (:foreground ,background))))
  286. `(org-todo ((,class (:foreground ,red :background ,background-red :weight bold))))
  287. `(org-done ((,class (:foreground ,blue :background ,background-blue :weight bold))))
  288. `(org-date ((,class (:background ,background-lighter))))
  289. `(org-scheduled-previously ((,class (:foreground ,red))))
  290. `(org-scheduled ((,class (:foreground ,default))))
  291. `(org-headline-done ((,class (:foreground ,comment))))
  292. `(outline-1 ((,class (:foreground ,blue :weight bold))))
  293. `(outline-2 ((,class (:foreground ,purple :weight bold))))
  294. `(outline-3 ((,class (:weight bold))))
  295. `(outline-4 ((,class (:weight bold))))
  296. `(outline-5 ((,class (:weight bold))))
  297. `(outline-6 ((,class (:weight bold))))
  298. `(outline-7 ((,class (:weight bold))))
  299. `(outline-8 ((,class (:weight bold))))
  300. `(org-column-title ((,class (:foreground unspecified :background unspecified))))
  301. `(org-agenda-date ((,class (:foreground ,purple :weight bold))))
  302. `(org-agenda-date-today ((,class (:foreground ,blue :weight bold :background ,background-blue :box 1))))
  303. `(org-agenda-structure ((,class (:foreground ,blue :weight bold))))
  304. `(org-scheduled-today ((,class (:foreground ,default :weight bold))))
  305. `(org-agenda-done ((,class (:foreground ,comment))))
  306. `(org-time-grid ((,class (:foreground ,comment))))
  307. ;; org blocks
  308. `(org-block-begin-line ((,class (:background ,background-green :foreground ,green-light :height 0.9))))
  309. `(org-block-end-line ((,class (:background ,background-green :foreground ,green-light :height 0.9))))
  310. ;; Gnus faces -- from wombat, feel free to improve :)
  311. `(gnus-group-news-1 ((,class (:weight bold :foreground "#95e454"))))
  312. `(gnus-group-news-1-low ((,class (:foreground "#95e454"))))
  313. `(gnus-group-news-2 ((,class (:weight bold :foreground "#cae682"))))
  314. `(gnus-group-news-2-low ((,class (:foreground "#cae682"))))
  315. `(gnus-group-news-3 ((,class (:weight bold :foreground "#ccaa8f"))))
  316. `(gnus-group-news-3-low ((,class (:foreground "#ccaa8f"))))
  317. `(gnus-group-news-4 ((,class (:weight bold :foreground "#99968b"))))
  318. `(gnus-group-news-4-low ((,class (:foreground "#99968b"))))
  319. `(gnus-group-news-5 ((,class (:weight bold :foreground "#cae682"))))
  320. `(gnus-group-news-5-low ((,class (:foreground "#cae682"))))
  321. `(gnus-group-news-low ((,class (:foreground "#99968b"))))
  322. `(gnus-group-mail-1 ((,class (:weight bold :foreground "#95e454"))))
  323. `(gnus-group-mail-1-low ((,class (:foreground "#95e454"))))
  324. `(gnus-group-mail-2 ((,class (:weight bold :foreground "#cae682"))))
  325. `(gnus-group-mail-2-low ((,class (:foreground "#cae682"))))
  326. `(gnus-group-mail-3 ((,class (:weight bold :foreground "#ccaa8f"))))
  327. `(gnus-group-mail-3-low ((,class (:foreground "#ccaa8f"))))
  328. `(gnus-group-mail-low ((,class (:foreground "#99968b"))))
  329. `(gnus-header-content ((,class (:foreground "#8ac6f2"))))
  330. `(gnus-header-from ((,class (:weight bold :foreground "#95e454"))))
  331. `(gnus-header-subject ((,class (:foreground "#cae682"))))
  332. `(gnus-header-name ((,class (:foreground "#8ac6f2"))))
  333. `(gnus-header-newsgroups ((,class (:foreground "#cae682"))))
  334. ;; which-function
  335. `(which-func ((,class (:foreground ,purple))))
  336. ;; diff
  337. `(diff-removed ((,class (:foreground ,default :background ,diff-removed-background))))
  338. `(diff-added ((,class (:foreground ,default :background ,diff-added-background))))
  339. `(diff-hunk-header ((,class (:background ,background-blue :weight bold :foreground ,blue))))
  340. `(diff-file-header ((,class (:weight bold))))
  341. `(diff-header ((,class (:background ,background :foreground ,blue))))
  342. `(diff-context ((,class (:foreground ,default))))
  343. `(diff-refine-added ((,class (:foreground ,grey :background ,diff-added-refined-background))))
  344. `(diff-refine-removed ((,class (:background ,diff-removed-refined-background :foreground ,grey))))
  345. ;; ediff
  346. `(ediff-fine-diff-B ((,class (:foreground ,grey :background ,diff-added-refined-background))))
  347. `(ediff-current-diff-B ((,class (:background ,diff-added-background))))
  348. `(ediff-fine-diff-A ((,class (:background ,diff-removed-refined-background :foreground ,grey))))
  349. `(ediff-current-diff-C ((,class (:background ,diff-current-background))))
  350. `(ediff-fine-diff-C ((,class (:foreground ,grey :background ,diff-current-refined-background))))
  351. `(ediff-even-diff-A ((,class (:background ,highlight :foreground unspecified))))
  352. `(ediff-even-diff-B ((,class (:background ,highlight :foreground unspecified))))
  353. `(ediff-even-diff-C ((,class (:background ,highlight :foreground unspecified))))
  354. `(ediff-odd-diff-A ((,class (:background ,highlight :foreground unspecified))))
  355. `(ediff-odd-diff-B ((,class (:background ,highlight :foreground unspecified))))
  356. `(ediff-odd-diff-C ((,class (:background ,highlight :foreground unspecified))))
  357. ;; ivy
  358. `(ivy-current-match ((,class (:background ,background-purple :weight bold :foreground ,purple))))
  359. `(ivy-minibuffer-match-face-1 ((,class (:foreground ,orange))))
  360. `(ivy-minibuffer-match-face-2 ((,class (:foreground ,green))))
  361. `(ivy-minibuffer-match-face-3 ((,class (:foreground ,orange))))
  362. `(ivy-minibuffer-match-face-4 ((,class (:foreground ,green))))
  363. `(ivy-match-required-face ((,class (:foreground ,red :background ,background-red :weight bold))))
  364. `(ivy-remote ((,class (:foreground ,blue))))
  365. ;; helm
  366. `(helm-candidate-number ((,class (:weight bold))))
  367. `(helm-header-line-left-margin ((,class (:weight bold :foreground ,red))))
  368. `(helm-source-header ((,class (:height 1.2 :weight bold :foreground ,blue :background ,background-blue))))
  369. `(helm-selection ((,class (:background ,background-lighter))))
  370. `(helm-match ((,class (:foreground ,purple :background ,background-purple :weight bold))))
  371. `(helm-match-item ((,class (:inherit isearch))))
  372. `(helm-M-x-key ((,class (:foreground ,blue :weight bold :background ,background-blue))))
  373. `(helm-visible-mark ((,class (:weight bold :foreground ,orange :background ,background-darker))))
  374. `(helm-prefarg ((,class (:weight bold :foreground ,red :background ,background-red))))
  375. `(helm-separator ((,class (:weight bold :foreground , blue))))
  376. `(helm-grep-file ((,class ())))
  377. `(helm-grep-finish ((,class (:foreground ,green))))
  378. `(helm-grep-running ((,class (:foreground ,red))))
  379. `(helm-grep-lineno ((,class (:foreground ,blue))))
  380. `(helm-grep-match ((,class (:foreground ,purple :background ,background-purple :weight bold))))
  381. `(helm-moccur-buffer ((,class ())))
  382. `(helm-buffer-directory ((,class (:foreground ,purple))))
  383. `(helm-buffer-file ((,class ())))
  384. `(helm-buffer-process ((,class (:foreground ,purple))))
  385. `(helm-buffer-size ((,class (:foreground ,blue))))
  386. `(helm-buffer-saved-out ((,class (:foreground ,red :weight bold))))
  387. `(helm-ff-directory ((,class (:foreground ,purple))))
  388. `(helm-ff-dotted-directory ((,class (:foreground ,purple))))
  389. `(helm-ff-prefix ((,class (:weight bold :foreground ,red))))
  390. `(helm-ff-file ((,class ())))
  391. `(helm-ff-executable ((,class (:foreground ,green :weight bold :background ,background-green))))
  392. `(helm-ff-symlink ((,class (:foreground ,orange))))
  393. `(helm-ff-invalid-symlink ((,class (:foreground ,red :weight bold :background ,background-red))))
  394. `(helm-history-deleted ((,class (:foreground ,red :weight bold :background ,background-red))))
  395. ;; visible mark
  396. `(visible-mark-face1 ((,class (:foreground ,orange-light :inverse-video t))))
  397. `(visible-mark-face2 ((,class (:foreground ,peach :inverse-video t))))
  398. ;; show-paren
  399. `(show-paren-match ((,class (:background ,blue-dark))))
  400. ;; clojure
  401. `(clojure-keyword-face ((,class (:inherit font-lock-builtin-face))))
  402. ;; ledger
  403. `(ledger-font-report-clickable-face ((,class (:foreground ,blue))))
  404. `(ledger-font-posting-amount-face ((,class (:foreground ,purple))))
  405. `(ledger-font-posting-date-face ((,class (:foreground ,blue :background ,background-blue :box 1))))
  406. `(ledger-font-payee-uncleared-face ((,class (:foreground ,default :weight bold))))
  407. `(ledger-font-payee-cleared-face ((,class (:foreground ,green :weight bold))))
  408. `(ledger-font-posting-account-face ((,class (:foreground ,default))))
  409. `(ledger-font-posting-account-pending-face ((,class (:foreground ,red))))
  410. `(ledger-font-xact-highlight-face ((,class (:background ,background-darker))))
  411. `(ledger-font-other-face ((,class (:inherit ,font-lock-comment-face))))
  412. `(ledger-font-periodic-xact-face ((,class (:foreground ,orange))))
  413. `(diff-hl-change ((,class (:foreground ,purple :background ,background-purple))))
  414. `(diff-hl-delete ((,class (:foreground ,red :background ,background-red))))
  415. `(diff-hl-insert ((,class (:foreground ,green :background ,background-green))))
  416. `(term-color-black ((,class (:foreground ,default :background ,background-darker))))
  417. `(term-color-red ((,class (:foreground ,red :background ,background-red))))
  418. `(term-color-green ((,class (:foreground ,green :background ,background-green))))
  419. `(term-color-yellow ((,class (:foreground ,orange :background ,background-orange))))
  420. `(term-color-blue ((,class (:foreground ,blue :background ,background-blue))))
  421. `(term-color-magenta ((,class (:foreground ,purple :background ,background-purple))))
  422. `(term-color-cyan ((,class (:foreground ,blue-dark))))
  423. `(term-color-white ((,class (:foreground ,grey))))
  424. `(term ((,class (:foreground ,default :background ,background))))
  425. `(term-default-fg-color ((,class (:inherit term-color-white))))
  426. `(term-default-bg-color ((,class (:inherit term-color-black))))
  427. `(avy-lead-face ((,class :foreground ,red :background ,background-red)))
  428. `(avy-lead-face-0 ((,class :foreground ,purple :background ,background-purple)))
  429. `(avy-lead-face-1 ((,class :foreground ,blue :background ,background-blue)))
  430. `(avy-lead-face-2 ((,class :foreground ,green :background ,background-green)))
  431. `(erc-nick-default-face ((,class :foreground ,blue :background ,background-blue :weight bold)))
  432. `(erc-current-nick-face ((,class :foreground ,red :weight bold :background ,background-red)))
  433. `(erc-my-nick-face ((,class :foreground ,red :weight bold :background ,background-red)))
  434. `(erc-notice-face ((,class :foreground ,comment)))
  435. `(erc-input-face ((,class :foreground ,default :weight bold)))
  436. `(erc-prompt-face ((,class :foreground ,purple :background ,background-purple :weight bold :box 1)))
  437. `(erc-timestamp-face ((,class :foreground ,purple :weight bold)))
  438. `(hydra-face-red ((,class :foreground ,red :weight bold)))
  439. `(hydra-face-blue ((,class :foreground ,blue :weight bold)))
  440. ;; elfeed
  441. `(elfeed-search-date-face ((,class (:foreground ,blue))))
  442. `(elfeed-search-feed-face ((,class (:foreground ,blue))))
  443. `(elfeed-search-tag-face ((,class (:foreground ,green))))
  444. `(elfeed-search-title-face ((,class (:foreground ,purple))))
  445. ;; wgrep
  446. `(wgrep-face ((,class (:foreground ,orange))))
  447. `(wgrep-reject-face ((,class (:foreground ,red :weight bold :background ,background-red))))
  448. `(wgrep-done-face ((,class (:foreground ,blue :weight bold))))
  449. ;; AucTeX
  450. `(font-latex-math-face ((,class :foreground ,green-light)))
  451. `(font-latex-sectioning-5-face ((,class :foreground ,blue)))
  452. `(font-latex-string-face ((,class :inherit font-lock-string-face)))
  453. `(font-latex-warning-face ((,class :inherit warning)))
  454. ;; Anzu
  455. `(anzu-replace-highlight ((,class :background ,diff-removed-refined-background :strike-through t)))
  456. `(anzu-replace-to ((,class :background ,diff-added-refined-background)))
  457. `(anzu-mode-line ((,class :inherit mode-line :weight bold)))
  458. ;; jabber.el
  459. `(jabber-roster-user-online ((,class :foreground ,blue :weight bold)))
  460. `(jabber-roster-user-error ((,class :foreground ,red :background ,background-red :weight bold)))
  461. `(jabber-rare-time-face ((,class :foreground ,comment)))
  462. `(jabber-chat-prompt-local ((,class :foreground ,purple :background ,background-purple :weight bold)))
  463. `(jabber-chat-prompt-foreign ((,class :foreground ,green :background ,background-green :weight bold)))
  464. `(jabber-activity-personal-face ((,class :foreground ,red :background ,background-red :weight bold)))
  465. `(jabber-roster-user-away ((,class :foreground ,orange)))
  466. `(jabber-roster-user-xa ((,class :foreground ,orange)))
  467. )
  468. (custom-theme-set-variables
  469. 'zerodark
  470. `(ansi-color-names-vector [,background
  471. ,red
  472. ,green
  473. ,orange
  474. ,blue
  475. ,purple
  476. ,blue-dark
  477. ,default])))
  478. ;;;###autoload
  479. (defun zerodark-setup-modeline-format ()
  480. "Setup the mode-line format for zerodark."
  481. (interactive)
  482. (setq-default mode-line-format
  483. `("%e"
  484. mode-line-front-space
  485. ,zerodark-modeline-ro
  486. ,zerodark-buffer-coding
  487. mode-line-frame-identification " "
  488. " "
  489. ,zerodark-modeline-modified
  490. " "
  491. ,zerodark-modeline-buffer-identification
  492. ,zerodark-modeline-position
  493. ,zerodark-modeline-vc
  494. " " mode-line-modes mode-line-misc-info mode-line-end-spaces
  495. )))
  496. ;;;###autoload
  497. (when (and (boundp 'custom-theme-load-path) load-file-name)
  498. (add-to-list 'custom-theme-load-path
  499. (file-name-as-directory (file-name-directory load-file-name))))
  500. (provide-theme 'zerodark)
  501. ;; Local Variables:
  502. ;; no-byte-compile: t
  503. ;; End:
  504. ;;; zerodark-theme.el ends here