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.

zerodark-theme.el 45KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  1. ;;; zerodark-theme.el --- A dark, medium contrast theme for Emacs -*- lexical-binding: t -*-
  2. ;; Copyright (C) 2015-2018 Nicolas Petton
  3. ;; Author: Nicolas Petton <nicolas@petton.fr>
  4. ;; Keywords: themes
  5. ;; URL: https://github.com/NicolasPetton/zerodark-theme
  6. ;; Version: 4.3
  7. ;; Package: zerodark-theme
  8. ;; Package-Requires: ((all-the-icons "2.0.0") (magit "2.8.0"))
  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.
  13. ;; This program is distributed in the hope that it will be useful,
  14. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;; GNU General Public License for more details.
  17. ;; You should have received a copy of the GNU General Public License
  18. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. ;; This file is NOT part of GNU Emacs
  20. ;;; Commentary:
  21. ;;
  22. ;; A dark theme inspired from One Dark and Niflheim.
  23. ;;
  24. ;; An optional mode-line format can be enabled with
  25. ;; `zerodark-setup-modeline-format'.
  26. ;;
  27. ;;; Code:
  28. (defmacro cached-for (secs &rest body)
  29. "Cache for SECS the result of the evaluation of BODY."
  30. (declare (debug t))
  31. (let ((cache (make-symbol "cache"))
  32. (last-run (make-symbol "last-run")))
  33. `(let (,cache ,last-run)
  34. (lambda ()
  35. (when (or (null ,last-run)
  36. (> (- (time-to-seconds (current-time)) ,last-run)
  37. ,secs))
  38. (setf ,cache (progn ,@body))
  39. (setf ,last-run (time-to-seconds (current-time))))
  40. ,cache))))
  41. (deftheme zerodark
  42. "A dark medium contrast theme")
  43. (defgroup zerodark
  44. nil
  45. "A dark theme inspired from One Dark and Niflheim."
  46. :group 'faces)
  47. (defcustom zerodark-use-paddings-in-mode-line t
  48. "When non-nil, use top and bottom paddings in the mode-line."
  49. :type 'boolean)
  50. (defcustom zerodark-theme-display-vc-status 'full
  51. "Control how version control information is displayed."
  52. :type '(choice (const :tag "Display fork symbol and branch name" 'full)
  53. (const :tag "Display fork symbol only" t)
  54. (const :tag "Do not display any version control information" nil)))
  55. (defface zerodark-ro-face
  56. '((t :foreground "#0088CC" :weight bold))
  57. "Face for read-only buffer in the mode-line.")
  58. (defface zerodark-modified-face
  59. '((t :foreground "#ff6c6b" :height 0.9))
  60. "Face for modified buffers in the mode-line.")
  61. (defface zerodark-not-modified-face
  62. '((t :foreground "#98be65" :height 0.9))
  63. "Face for not modified buffers in the mode-line.")
  64. (defface zerodark-buffer-position-face
  65. '((t :height 0.9))
  66. "Face for line/column numbers in the mode-line.")
  67. (defface zerodark-vc-face
  68. '((t :foreground "#61afef"))
  69. "Face for vc status in the mode-line.")
  70. (defface zerodark-ok-face
  71. '((t :foreground "#61afef"))
  72. "Face for ok status in the mode-line.")
  73. (defface zerodark-warning-face
  74. '((t :foreground "#da8548"))
  75. "Face for warning status in the mode-line.")
  76. (defface zerodark-error-face
  77. '((t :foreground "#ff6c6b"))
  78. "Face for error status in the mode-line.")
  79. (defvar zerodark-modeline-position '(:eval (propertize ":%l:%c %p " 'face (if (zerodark--active-window-p)
  80. 'zerodark-buffer-position-face
  81. 'mode-line-inactive)))
  82. "Mode line construct for displaying the position in the buffer.")
  83. (defvar zerodark-modeline-buffer-identification '(:eval (propertize "%b" 'face 'bold))
  84. "Mode line construct for displaying the position in the buffer.")
  85. (defvar zerodark-modeline-modified '(:eval (if (buffer-modified-p (current-buffer))
  86. (all-the-icons-faicon "floppy-o"
  87. :height 0.9
  88. :v-adjust 0
  89. :face (if (zerodark--active-window-p)
  90. 'zerodark-modified-face
  91. 'mode-line-inactive))
  92. (all-the-icons-faicon "check"
  93. :height 0.9
  94. :v-adjust 0
  95. :face (if (zerodark--active-window-p)
  96. 'zerodark-not-modified-face
  97. 'mode-line-inactive)))))
  98. (defvar zerodark-modeline-ro '(:eval (if buffer-read-only
  99. (if (zerodark--active-window-p)
  100. (progn
  101. (propertize "RO " 'face 'zerodark-ro-face))
  102. (propertize "RO " 'face 'bold))
  103. "")))
  104. (defvar zerodark-buffer-coding '(:eval (unless (eq buffer-file-coding-system (default-value 'buffer-file-coding-system))
  105. mode-line-mule-info)))
  106. (defvar zerodark-modeline-vc '(vc-mode (" "
  107. (:eval (all-the-icons-faicon "code-fork"
  108. :height 0.9
  109. :v-adjust 0
  110. :face (when (zerodark--active-window-p)
  111. (zerodark-git-face))))
  112. (:eval (when (eq zerodark-theme-display-vc-status 'full)
  113. (propertize (truncate-string-to-width vc-mode 25 nil nil "...")
  114. 'face (when (zerodark--active-window-p)
  115. (zerodark-git-face))))))))
  116. (defun zerodark-modeline-flycheck-status ()
  117. "Return the status of flycheck to be displayed in the mode-line."
  118. (when (and (boundp 'flycheck-mode) flycheck-mode)
  119. (let* ((text (pcase flycheck-last-status-change
  120. (`finished (if flycheck-current-errors
  121. (let ((count (let-alist (flycheck-count-errors flycheck-current-errors)
  122. (+ (or .warning 0) (or .error 0)))))
  123. (propertize (format "✖ %s Issue%s" count (if (eq 1 count) "" "s"))
  124. 'face (zerodark-face-when-active 'zerodark-error-face)))
  125. (propertize "✔ No Issues"
  126. 'face (zerodark-face-when-active 'zerodark-ok-face))))
  127. (`running (propertize "⟲ Running"
  128. 'face (zerodark-face-when-active 'zerodark-warning-face)))
  129. (`no-checker (propertize "⚠ No Checker"
  130. 'face (zerodark-face-when-active 'zerodark-warning-face)))
  131. (`not-checked "✖ Disabled")
  132. (`errored (propertize "⚠ Error"
  133. 'face (zerodark-face-when-active 'zerodark-error-face)))
  134. (`interrupted (propertize "⛔ Interrupted"
  135. 'face (zerodark-face-when-active 'zerodark-error-face)))
  136. (`suspicious ""))))
  137. (propertize text
  138. 'help-echo "Show Flycheck Errors"
  139. 'local-map (make-mode-line-mouse-map
  140. 'mouse-1 #'flycheck-list-errors)))))
  141. (defun true-color-p ()
  142. "Return non-nil on displays that support 256 colors."
  143. (or
  144. (display-graphic-p)
  145. (= (tty-display-color-cells) 16777216)))
  146. (defvar zerodark--git-face-cached (cached-for 1 (zerodark--git-face-intern)))
  147. (defun zerodark--git-face-intern ()
  148. "Return the face to use based on the current repository status."
  149. (if (magit-git-success "diff" "--quiet")
  150. ;; nothing to commit because nothing changed
  151. (if (zerop (length (magit-git-string
  152. "rev-list" (concat "origin/"
  153. (magit-get-current-branch)
  154. ".."
  155. (magit-get-current-branch)))))
  156. ;; nothing to push as well
  157. 'zerodark-ok-face
  158. ;; nothing to commit, but some commits must be pushed
  159. 'zerodark-warning-face)
  160. 'zerodark-error-face))
  161. (defun zerodark-git-face ()
  162. "Return the face to use based on the current repository status.
  163. The result is cached for one second to avoid hiccups."
  164. (funcall zerodark--git-face-cached))
  165. (let ((class '((class color) (min-colors 89)))
  166. (default (if (true-color-p) "#abb2bf" "#afafaf"))
  167. (light (if (true-color-p) "#ccd4e3" "#d7d7d7"))
  168. (background (if (true-color-p) "#282c34" "#333333"))
  169. (background-dark (if (true-color-p) "#24282f" "#222222"))
  170. (background-darker (if (true-color-p) "#22252c" "#222222"))
  171. (mode-line-inactive (if "#1c2129" "#222222"))
  172. (mode-line-active (if (true-color-p) "#6f337e" "#875f87"))
  173. (background-lighter (if (true-color-p) "#3a3f4b" "#5f5f5f"))
  174. (background-red (if (true-color-p) "#4c3840" "#5f5f5f"))
  175. (bright-background-red (if (true-color-p) "#744a5b" "#744a5b"))
  176. (background-purple (if (true-color-p) "#48384c" "#5f5f5f"))
  177. (background-blue (if (true-color-p) "#38394c" "#444444"))
  178. (bright-background-blue (if (true-color-p) "#4e5079" "#4e5079"))
  179. (background-green (if (true-color-p) "#3d4a41" "#5f5f5f"))
  180. (bright-background-green (if (true-color-p) "#3f6d54" "#3f6d54"))
  181. (background-orange (if (true-color-p) "#4a473d" "#5f5f5f"))
  182. (hl-line (if (true-color-p) "#2c323b" "#333333"))
  183. (grey (if (true-color-p) "#cccccc" "#cccccc"))
  184. (grey-dark (if (true-color-p) "#666666" "#666666"))
  185. (highlight (if (true-color-p) "#3e4451" "#5f5f5f"))
  186. (comment (if (true-color-p) "#687080" "#707070"))
  187. (orange (if (true-color-p) "#da8548" "#d7875f"))
  188. (orange-light (if (true-color-p) "#ddbd78" "#d7af87"))
  189. (red (if (true-color-p) "#ff6c6b" "#ff5f5f"))
  190. (purple (if (true-color-p) "#c678dd" "#d787d7"))
  191. (purple-dark (if (true-color-p) "#64446d" "#5f5f5f"))
  192. (blue (if (true-color-p) "#61afef" "#5fafff"))
  193. (blue-dark (if (true-color-p) "#1f5582" "#005f87"))
  194. (green (if (true-color-p) "#98be65" "#87af5f"))
  195. (green-light (if (true-color-p) "#9eac8c" "#afaf87"))
  196. (peach "PeachPuff3")
  197. (diff-added-background (if (true-color-p) "#284437" "#284437"))
  198. (diff-added-refined-background (if (true-color-p) "#1e8967" "#1e8967"))
  199. (diff-removed-background (if (true-color-p) "#583333" "#580000"))
  200. (diff-removed-refined-background (if (true-color-p) "#b33c49" "#b33c49"))
  201. (diff-current-background (if (true-color-p) "#29457b" "#29457b"))
  202. (diff-current-refined-background (if (true-color-p) "#4174ae" "#4174ae")))
  203. (custom-theme-set-faces
  204. 'zerodark
  205. `(default ((,class (:background ,background :foreground ,default))))
  206. `(cursor ((,class (:background ,default))))
  207. ;; Highlighting faces
  208. `(fringe ((,class (:background ,background-dark :foreground ,comment))))
  209. `(border ((,class (:foreground ,background-lighter))))
  210. `(vertical-border ((,class (:foreground ,background-lighter))))
  211. `(highlight ((,class (:background ,highlight :foreground ,default :underline nil))))
  212. `(region ((,class (:background ,highlight))))
  213. `(secondary-selection ((,class (:background ,highlight :foreground ,default))))
  214. `(isearch ((,class (:background ,orange-light :foreground ,highlight))))
  215. `(lazy-highlight ((,class (:background ,grey-dark :foreground ,orange-light))))
  216. `(hl-line ((,class (:background ,hl-line :underline unspecified :inherit nil))))
  217. `(shadow ((,class (:foreground ,comment))))
  218. `(match ((,class (:background ,background-green))))
  219. ;; Font lock faces
  220. `(font-lock-builtin-face ((,class (:foreground ,blue :weight bold))))
  221. `(font-lock-comment-face ((,class (:foreground ,comment :slant italic))))
  222. `(font-lock-constant-face ((,class (:foreground ,orange :weight bold))))
  223. `(font-lock-function-name-face ((,class (:foreground ,blue))))
  224. `(font-lock-keyword-face ((,class (:foreground ,purple :weight bold))))
  225. `(font-lock-string-face ((,class (:foreground ,green))))
  226. `(font-lock-doc-face ((,class (:foreground ,green-light))))
  227. `(font-lock-type-face ((,class (:foreground ,blue))))
  228. `(font-lock-variable-name-face ((,class (:foreground ,blue))))
  229. `(font-lock-warning-face ((,class (:foreground ,red :weight bold :background ,background-red))))
  230. ;; Mode line faces
  231. `(mode-line ((,class (:background ,background-blue :height 0.9 :foreground ,blue
  232. :box ,(when zerodark-use-paddings-in-mode-line
  233. (list :line-width 6 :color background-blue))))))
  234. `(mode-line-inactive ((,class (:background ,background-darker :height 0.9 :foreground ,default
  235. :box ,(when zerodark-use-paddings-in-mode-line
  236. (list :line-width 6 :color background-darker))))))
  237. `(header-line ((,class (:inherit mode-line-inactive))))
  238. ;; error & success
  239. `(error ((,class (:foreground ,red :weight bold))))
  240. `(warning ((,class (:foreground ,orange :weight bold))))
  241. `(success ((,class (:foreground ,green :weight bold))))
  242. ;; powerline
  243. `(powerline-active1 ((,class (:height 0.9 :foreground ,blue :background ,background-darker))))
  244. `(powerline-active2 ((,class (:height 0.9 :foreground ,blue :background ,background-lighter))))
  245. ;; mml
  246. `(message-mml-face ((,class (:foreground ,comment))))
  247. ;; Org-clock mode line
  248. `(org-mode-line-clock ((,class (:background unspecified (:inherit mode-line)))))
  249. ;; Escape and prompt faces
  250. `(minibuffer-prompt ((,class (:foreground ,blue :weight bold))))
  251. `(escape-glyph ((,class (:foreground ,blue :weight bold))))
  252. ;; linum
  253. `(linum ((,class (:foreground ,comment :background ,background))))
  254. ;; from hlinum
  255. `(linum-highlight-face ((,class (:foreground ,blue ,background ,background-blue))))
  256. ;; native line numbers (emacs 26)
  257. `(line-number ((,class (:foreground ,comment :background ,background-darker))))
  258. `(line-number-current-line ((,class (:foreground ,blue :background ,background-darker))))
  259. ;; eshell
  260. `(eshell-prompt ((,class (:foreground ,blue :background ,background :weight bold))))
  261. `(eshell-ls-directory ((,class (:foreground ,purple :background ,background :weight bold))))
  262. `(eshell-ls-symlink ((,class (:foreground ,orange :background ,background :weight normal))))
  263. `(eshell-ls-executable ((,class (:foreground ,green :background ,background :weight bold))))
  264. ;; whitespace
  265. `(whitespace-space ((,class (:background unspecified :foreground ,highlight
  266. :inverse-video unspecified))))
  267. `(whitespace-hspace ((,class (:background unspecified :foreground ,highlight
  268. :inverse-video unspecified))))
  269. `(whitespace-tab ((,class (:background unspecified :foreground ,highlight
  270. :inverse-video unspecified))))
  271. `(whitespace-newline ((,class (:background unspecified :foreground ,highlight
  272. :inverse-video unspecified))))
  273. `(whitespace-trailing ((,class (:background ,red :foreground ,background :weight bold
  274. :inverse-video nil))))
  275. `(whitespace-line ((,class (:background unspecified :foreground ,red
  276. :inverse-video unspecified))))
  277. `(whitespace-space-before-tab ((,class (:inherit whitespace-space))))
  278. `(whitespace-space-after-tab ((,class (:inherit whitespace-space))))
  279. `(whitespace-indentation ((,class (:background unspecified :foreground ,highlight
  280. :inverse-video unspecified))))
  281. `(whitespace-empty ((,class (:background ,orange :foreground ,highlight
  282. :inverse-video unspecified))))
  283. ;; link faces
  284. `(link ((,class (:foreground ,blue :underline t))))
  285. `(link-visited ((,class (:foreground ,blue :underline t))))
  286. ;; widget faces
  287. `(widget-field ((,class (:background ,highlight :box (:line-width 1 :color ,comment)))))
  288. `(widget-button ((,class (:inherit link))))
  289. ;; custom
  290. `(custom-button ((,class (:background ,background-lighter :box (:line-width 2 :style released-button)))))
  291. `(custom-button-mouse ((,class (:background ,highlight :box (:line-width 2 :style released-button)))))
  292. `(custom-button-pressed ((,class (:background ,highlight :box (:line-width 2 :style pressed-button)))))
  293. `(custom-group-tag ((,class (:foreground ,purple :weight bold :height 1.4))))
  294. `(custom-variable-tag ((,class (:foreground ,purple :weight bold))))
  295. `(custom-state ((,class (:foreground ,green))))
  296. ;; compilation
  297. `(compilation-info ((,class (:foreground ,purple :weight bold))))
  298. `(compilation-warning ((,class (:foreground ,orange :weight bold))))
  299. `(compilation-error ((,class (:foreground ,red :weight bold))))
  300. `(compilation-line-number ((,class (:foreground ,green :weight bold))))
  301. `(compilation-mode-line-exit ((,class (:foreground ,green :weight bold :inverse-video nil))))
  302. `(compilation-mode-line-run ((,class (:foreground ,orange :weight bold))))
  303. `(compilation-mode-line-fail ((,class (:foreground ,red :weight bold))))
  304. ;; dired
  305. `(dired-header ((,class (:foreground ,blue :background ,background-blue :weight bold))))
  306. `(dired-directory ((,class (:foreground ,purple :weight bold))))
  307. ;; diff
  308. `(diff-removed ((,class (:background ,background-red :foreground ,red))))
  309. `(diff-added ((,class (:background ,background-green :foreground ,green))))
  310. `(diff-hunk-header ((,class (:background ,background-blue :weight bold :foreground ,blue))))
  311. `(diff-file-header ((,class (:weight bold))))
  312. `(diff-header ((,class (:background ,background :foreground ,blue))))
  313. `(diff-context ((,class (:foreground ,default))))
  314. `(diff-refine-added ((,class (:foreground ,green :background ,bright-background-green))))
  315. `(diff-refine-removed ((,class (:background ,bright-background-red :foreground ,red))))
  316. ;; ediff
  317. `(ediff-fine-diff-B ((,class (:inherit diff-refine-added))))
  318. `(ediff-current-diff-B ((,class (:inherit diff-added))))
  319. `(ediff-fine-diff-A ((,class (:inherit diff-refine-removed))))
  320. `(ediff-current-diff-A ((,class (:inherit diff-removed))))
  321. `(ediff-fine-diff-C ((,class (:foreground ,blue :background ,bright-background-blue))))
  322. `(ediff-current-diff-C ((,class (:background ,background-blue :foreground ,blue))))
  323. ;; magit
  324. `(magit-diff-context-highlight ((,class (:background ,background-darker))))
  325. `(magit-diff-file-heading ((,class (:weight bold :foreground ,blue))))
  326. `(magit-diff-file-heading-highlight ((,class (:weight bold :foreground ,blue :background ,background-blue))))
  327. `(magit-diff-removed-highlight ((,class (:inherit diff-removed))))
  328. `(magit-diff-removed ((,class (:inherit diff-removed))))
  329. `(magit-diff-added-highlight ((,class (:inherit diff-added))))
  330. `(magit-diff-added ((,class (:inherit diff-added))))
  331. `(magit-diff-lines-heading ((,class (:background ,blue-dark :foreground "white"))))
  332. `(magit-diff-hunk-heading ((,class (:background ,background-lighter))))
  333. `(magit-diff-hunk-heading-highlight ((,class (:background ,blue-dark))))
  334. `(magit-diff-hunk-heading ((,class (:background ,background-lighter))))
  335. `(magit-process-ok ((,class (:foreground ,green :weight bold))))
  336. `(magit-section-highlight ((,class (:background ,background-darker))))
  337. `(magit-section-heading ((,class (:foreground ,grey :weight bold))))
  338. `(magit-branch-current ((,class (:foreground ,blue :background ,background-darker :box 1))))
  339. `(magit-branch-local ((,class (:foreground ,purple :background ,background-darker :box 1))))
  340. `(magit-branch-remote ((,class (:foreground ,green :background ,background-darker :box 1))))
  341. `(magit-reflog-reset ((,class (:background ,background-red :foreground ,red :weight bold))))
  342. `(magit-reflog-amend ((,class (:background ,background-blue :foreground ,blue :weight bold))))
  343. `(magit-reflog-rebase ((,class (:background ,background-blue :foreground ,blue :weight bold))))
  344. `(magit-reflog-commit ((,class (:background ,background-green :foreground ,green :weight bold))))
  345. `(magit-reflog-checkout ((,class (:background ,background-orange :foreground ,orange :weight bold))))
  346. `(magit-reflog-cherry-pick ((,class (:background ,background-purple :foreground ,purple :weight bold))))
  347. `(magit-bisect-bad ((,class (:background ,background-red :foreground ,red :box 1))))
  348. `(magit-bisect-good ((,class (:background ,background-blue :foreground ,blue :box 1))))
  349. `(magit-signature-bad ((,class (:foreground ,red))))
  350. `(magit-signature-good ((,class (:foreground ,blue))))
  351. `(magit-blame-heading ((,class (:foreground ,green :background ,background-green :box 1))))
  352. `(git-commit-summary ((,class (:weight bold))))
  353. `(magit-tag ((,class (:foreground ,purple :weight bold :box 1 :background "#202020"))))
  354. `(magit-sequence-part ((,class (:foreground ,orange :weight bold))))
  355. `(magit-sequence-head ((,class (:foreground ,green :weight bold))))
  356. ;; Message faces
  357. `(message-header-name ((,class (:foreground ,blue :weight bold))))
  358. `(message-header-cc ((,class (:foreground ,purple))))
  359. `(message-header-other ((,class (:foreground ,purple))))
  360. `(message-header-subject ((,class (:foreground ,green))))
  361. `(message-header-to ((,class (:foreground ,purple))))
  362. `(message-cited-text ((,class (:foreground ,comment))))
  363. `(message-separator ((,class (:foreground ,red :weight bold))))
  364. ;; ido faces
  365. `(ido-first-match ((,class (:foreground ,purple :weight bold))))
  366. `(ido-only-match ((,class (:foreground ,purple :weight bold))))
  367. `(ido-subdir ((,class (:foreground ,blue))))
  368. ;; notmuch
  369. `(notmuch-message-summary-face ((,class (:background ,highlight :box (:line-width 2 :color ,background)))))
  370. `(notmuch-search-count ((,class (:foreground ,red :weight bold))))
  371. `(notmuch-search-matching-authors ((,class (:foreground ,comment))))
  372. `(notmuch-search-subject ((,class (:foreground ,default))))
  373. `(notmuch-search-unread-face ((,class (:weight bold))))
  374. `(notmuch-search-date ((,class (:foreground ,purple))))
  375. `(notmuch-crypto-part-header ((,class (:foreground ,blue))))
  376. `(notmuch-crypto-decryption ((,class (:foreground ,purple))))
  377. `(notmuch-crypto-signature-unknown ((,class (:foreground ,red))))
  378. `(notmuch-crypto-signature-good ((,class (:background ,blue :foreground ,background :weight bold))))
  379. `(notmuch-crypto-signature-good-key ((,class (:background ,blue :foreground ,background :weight bold))))
  380. `(notmuch-crypto-signature-bad ((,class (:background ,red :foreground ,background :weight bold))))
  381. `(notmuch-tag-face ((,class (:foreground ,green :weight bold))))
  382. `(notmuch-tree-match-author-face ((,class (:foreground ,purple))))
  383. `(notmuch-tree-match-tag-face ((,class (:foreground ,green :weight bold))))
  384. ;; company
  385. `(company-preview ((,class (:background ,background-darker :foreground ,default))))
  386. `(company-preview-common ((,class (:background ,background-darker :foreground ,purple))))
  387. `(company-preview-search ((,class (:background ,blue :foreground ,default))))
  388. `(company-tooltip ((,class (:background ,background-darker :foreground ,default))))
  389. `(company-scrollbar-bg ((,class (:background ,background-darker))))
  390. `(company-scrollbar-fg ((,class (:background ,background-blue))))
  391. `(company-tooltip-common ((,class (:foreground ,purple :weight bold :background ,background-darker))))
  392. `(company-tooltip-annotation ((,class (:foreground ,blue :weight bold :background ,background-blue))))
  393. `(company-tooltip-common-selection ((,class (:foreground ,purple :background ,background-lighter :weight bold))))
  394. `(company-tooltip-selection ((,class (:foreground ,default :background ,background-lighter))))
  395. `(company-tooltip-mouse ((,class (:foreground ,default :background ,background-lighter))))
  396. ;; web-mode
  397. `(web-mode-html-tag-face ((,class (:foreground ,purple :weight bold))))
  398. `(web-mode-symbol-face ((,class (:foreground ,red :weight bold))))
  399. ;; js2-mode
  400. `(js2-function-param ((,class (:foreground ,blue))))
  401. `(js2-error ((,class (:foreground ,red))))
  402. `(js2-jsdoc-html-tag-name ((,class (:foreground ,peach))))
  403. `(js2-jsdoc-html-tag-delimiter ((,class (:foreground ,peach))))
  404. ;; flycheck
  405. `(flycheck-fringe-error ((,class (:foreground ,red :background ,background-red :weight bold :inverse-video t))))
  406. `(flycheck-fringe-warning ((,class (:background ,background-orange :foreground ,orange :weight bold :inverse-video t))))
  407. `(flycheck-fringe-info ((,class (:background ,background-blue :foreground ,blue :weight bold :inverse-video t))))
  408. `(flycheck-warning ((,class (:underline (:color ,red :style wave)))))
  409. `(flycheck-error ((,class (:underline (:color ,red :style wave)))))
  410. ;; FIC
  411. `(font-lock-fic-face ((,class (:foreground ,background :background ,red :weight bold))))
  412. ;; org-mode todo
  413. `(org-hide ((,class (:foreground ,background))))
  414. `(org-todo ((,class (:foreground ,red :background ,background-red :weight bold))))
  415. `(org-done ((,class (:foreground ,blue :background ,background-blue :weight bold))))
  416. `(org-date ((,class (:background ,background-lighter))))
  417. `(org-scheduled-previously ((,class (:foreground ,red))))
  418. `(org-scheduled ((,class (:foreground ,default))))
  419. `(org-upcoming-deadline ((,class (:foreground ,orange))))
  420. `(org-headline-done ((,class (:foreground ,comment))))
  421. `(outline-1 ((,class (:foreground ,blue :weight bold))))
  422. `(outline-2 ((,class (:foreground ,purple :weight bold))))
  423. `(outline-3 ((,class (:foreground ,peach :weight bold))))
  424. `(outline-4 ((,class (:foreground ,green-light :weight bold))))
  425. `(outline-5 ((,class (:foreground ,blue :weight bold))))
  426. `(outline-6 ((,class (:foreground ,purple :weight bold))))
  427. `(outline-7 ((,class (:foreground ,peach :weight bold))))
  428. `(outline-8 ((,class (:foreground ,green-light :weight bold))))
  429. `(org-column-title ((,class (:foreground unspecified :background unspecified))))
  430. `(org-agenda-date ((,class (:foreground ,purple :weight bold))))
  431. `(org-agenda-date-today ((,class (:foreground ,blue :weight bold :background ,background-blue :box 1))))
  432. `(org-agenda-structure ((,class (:foreground ,blue :weight bold))))
  433. `(org-scheduled-today ((,class (:foreground ,default :weight bold))))
  434. `(org-agenda-done ((,class (:foreground ,comment))))
  435. `(org-time-grid ((,class (:foreground ,comment))))
  436. ;; org columns
  437. `(org-column ((,class (:background ,background-darker))))
  438. `(org-column-title ((,class (:background ,background-blue :foreground ,blue :weight bold))))
  439. ;; org blocks
  440. `(org-block-begin-line ((,class (:background ,background-green :foreground ,green-light :height 0.9))))
  441. `(org-block-end-line ((,class (:background ,background-green :foreground ,green-light :height 0.9))))
  442. ;; org-drill
  443. `(org-drill-hidden-cloze-face ((,class (:background ,red :foreground ,background))))
  444. `(org-drill-visible-cloze-face ((,class (:background ,blue :foreground ,background-blue))))
  445. `(org-drill-visible-cloze-hint-face ((,class (:background ,green :foreground ,background-green))))
  446. ;; Gnus faces -- from wombat, feel free to improve :)
  447. `(gnus-group-news-1 ((,class (:weight bold :foreground "#95e454"))))
  448. `(gnus-group-news-1-low ((,class (:foreground "#95e454"))))
  449. `(gnus-group-news-2 ((,class (:weight bold :foreground "#cae682"))))
  450. `(gnus-group-news-2-low ((,class (:foreground "#cae682"))))
  451. `(gnus-group-news-3 ((,class (:weight bold :foreground "#ccaa8f"))))
  452. `(gnus-group-news-3-low ((,class (:foreground "#ccaa8f"))))
  453. `(gnus-group-news-4 ((,class (:weight bold :foreground "#99968b"))))
  454. `(gnus-group-news-4-low ((,class (:foreground "#99968b"))))
  455. `(gnus-group-news-5 ((,class (:weight bold :foreground "#cae682"))))
  456. `(gnus-group-news-5-low ((,class (:foreground "#cae682"))))
  457. `(gnus-group-news-low ((,class (:foreground "#99968b"))))
  458. `(gnus-group-mail-1 ((,class (:weight bold :foreground "#95e454"))))
  459. `(gnus-group-mail-1-low ((,class (:foreground "#95e454"))))
  460. `(gnus-group-mail-2 ((,class (:weight bold :foreground "#cae682"))))
  461. `(gnus-group-mail-2-low ((,class (:foreground "#cae682"))))
  462. `(gnus-group-mail-3 ((,class (:weight bold :foreground "#ccaa8f"))))
  463. `(gnus-group-mail-3-low ((,class (:foreground "#ccaa8f"))))
  464. `(gnus-group-mail-low ((,class (:foreground "#99968b"))))
  465. `(gnus-header-content ((,class (:foreground "#8ac6f2"))))
  466. `(gnus-header-from ((,class (:weight bold :foreground "#95e454"))))
  467. `(gnus-header-subject ((,class (:foreground "#cae682"))))
  468. `(gnus-header-name ((,class (:foreground "#8ac6f2"))))
  469. `(gnus-header-newsgroups ((,class (:foreground "#cae682"))))
  470. ;; which-function
  471. `(which-func ((,class (:foreground ,purple))))
  472. `(ediff-even-diff-A ((,class (:background ,highlight :foreground unspecified))))
  473. `(ediff-even-diff-B ((,class (:background ,highlight :foreground unspecified))))
  474. `(ediff-even-diff-C ((,class (:background ,highlight :foreground unspecified))))
  475. `(ediff-odd-diff-A ((,class (:background ,highlight :foreground unspecified))))
  476. `(ediff-odd-diff-B ((,class (:background ,highlight :foreground unspecified))))
  477. `(ediff-odd-diff-C ((,class (:background ,highlight :foreground unspecified))))
  478. ;; ivy
  479. `(ivy-current-match ((,class (:background ,background-purple :weight bold :foreground ,purple))))
  480. `(ivy-minibuffer-match-face-1 ((,class (:foreground ,orange))))
  481. `(ivy-minibuffer-match-face-2 ((,class (:foreground ,green))))
  482. `(ivy-minibuffer-match-face-3 ((,class (:foreground ,green))))
  483. `(ivy-minibuffer-match-face-4 ((,class (:foreground ,green))))
  484. `(ivy-match-required-face ((,class (:foreground ,red :background ,background-red :weight bold))))
  485. `(ivy-modified-buffer ((,class (:foreground ,red))))
  486. `(ivy-remote ((,class (:foreground ,blue))))
  487. `(ivy-highlight-face ((,class (:foreground ,blue :weight bold))))
  488. ;; helm
  489. `(helm-candidate-number ((,class (:weight bold))))
  490. `(helm-header-line-left-margin ((,class (:weight bold :foreground ,red))))
  491. `(helm-source-header ((,class (:height 1.2 :weight bold :foreground ,blue :background ,background-blue))))
  492. `(helm-selection ((,class (:background ,background-lighter))))
  493. `(helm-match ((,class (:foreground ,purple :background ,background-purple :weight bold))))
  494. `(helm-match-item ((,class (:inherit isearch))))
  495. `(helm-M-x-key ((,class (:foreground ,blue :weight bold :background ,background-blue))))
  496. `(helm-visible-mark ((,class (:weight bold :foreground ,orange :background ,background-darker))))
  497. `(helm-prefarg ((,class (:weight bold :foreground ,red :background ,background-red))))
  498. `(helm-separator ((,class (:weight bold :foreground , blue))))
  499. `(helm-grep-file ((,class ())))
  500. `(helm-grep-finish ((,class (:foreground ,green))))
  501. `(helm-grep-running ((,class (:foreground ,red))))
  502. `(helm-grep-lineno ((,class (:foreground ,blue))))
  503. `(helm-grep-match ((,class (:foreground ,purple :background ,background-purple :weight bold))))
  504. `(helm-moccur-buffer ((,class ())))
  505. `(helm-buffer-directory ((,class (:foreground ,purple))))
  506. `(helm-buffer-file ((,class ())))
  507. `(helm-buffer-process ((,class (:foreground ,purple))))
  508. `(helm-buffer-size ((,class (:foreground ,blue))))
  509. `(helm-buffer-saved-out ((,class (:foreground ,red :weight bold))))
  510. `(helm-ff-directory ((,class (:foreground ,purple))))
  511. `(helm-ff-dotted-directory ((,class (:foreground ,purple))))
  512. `(helm-ff-prefix ((,class (:weight bold :foreground ,red))))
  513. `(helm-ff-file ((,class ())))
  514. `(helm-ff-executable ((,class (:foreground ,green :weight bold :background ,background-green))))
  515. `(helm-ff-symlink ((,class (:foreground ,orange))))
  516. `(helm-ff-invalid-symlink ((,class (:foreground ,red :weight bold :background ,background-red))))
  517. `(helm-history-deleted ((,class (:foreground ,red :weight bold :background ,background-red))))
  518. `(helm-swoop-target-line-face ((,class (:foreground ,comment :background ,background-lighter))))
  519. `(helm-swoop-target-line-block-face ((,class (:foreground ,comment :background ,background-lighter :weight bold))))
  520. `(helm-swoop-target-word-face ((,class (:foreground ,purple :background ,background-purple :weight bold))))
  521. `(helm-swoop-line-number-face ((,class (:foreground ,comment))))
  522. ;; visible mark
  523. `(visible-mark-face1 ((,class (:foreground ,orange-light :inverse-video t))))
  524. `(visible-mark-face2 ((,class (:foreground ,peach :inverse-video t))))
  525. ;; show-paren
  526. `(show-paren-match ((,class (:foreground ,blue :weight bold))))
  527. ;; clojure
  528. `(clojure-keyword-face ((,class (:inherit font-lock-builtin-face))))
  529. ;; ledger
  530. `(ledger-font-report-clickable-face ((,class (:foreground ,blue))))
  531. `(ledger-font-posting-amount-face ((,class (:foreground ,purple))))
  532. `(ledger-font-posting-date-face ((,class (:foreground ,blue :background ,background-blue :box 1))))
  533. `(ledger-font-payee-uncleared-face ((,class (:foreground ,default :weight bold))))
  534. `(ledger-font-payee-cleared-face ((,class (:foreground ,green :weight bold))))
  535. `(ledger-font-posting-account-face ((,class (:foreground ,default))))
  536. `(ledger-font-posting-account-pending-face ((,class (:foreground ,red))))
  537. `(ledger-font-xact-highlight-face ((,class (:background ,background-darker))))
  538. `(ledger-font-other-face ((,class (:inherit ,font-lock-comment-face))))
  539. `(ledger-font-periodic-xact-face ((,class (:foreground ,orange))))
  540. `(diff-hl-change ((,class (:foreground ,bright-background-blue :background ,bright-background-blue))))
  541. `(diff-hl-delete ((,class (:foreground ,bright-background-red :background ,bright-background-red))))
  542. `(diff-hl-insert ((,class (:foreground ,bright-background-green :background ,bright-background-green))))
  543. `(git-gutter:added ((,class (:foreground ,green :background ,background-green))))
  544. `(git-gutter:deleted ((,class (:foreground ,red :background ,background-red))))
  545. `(git-gutter:modified ((,class (:foreground ,purple :background ,background-purple))))
  546. `(git-gutter:separator ((,class (:background ,background-orange))))
  547. `(git-gutter:unchanged ((,class (:background ,background-orange))))
  548. `(term-color-black ((,class (:foreground ,default :background ,background-darker))))
  549. `(term-color-red ((,class (:foreground ,red :background ,background-red))))
  550. `(term-color-green ((,class (:foreground ,green :background ,background-green))))
  551. `(term-color-yellow ((,class (:foreground ,orange :background ,background-orange))))
  552. `(term-color-blue ((,class (:foreground ,blue :background ,background-blue))))
  553. `(term-color-magenta ((,class (:foreground ,purple :background ,background-purple))))
  554. `(term-color-cyan ((,class (:foreground ,blue-dark))))
  555. `(term-color-white ((,class (:foreground ,grey))))
  556. `(term ((,class (:foreground ,default :background ,background))))
  557. `(term-default-fg-color ((,class (:inherit term-color-white))))
  558. `(term-default-bg-color ((,class (:inherit term-color-black))))
  559. `(sh-heredoc ((,class (:foreground ,orange :weight bold))))
  560. `(avy-lead-face ((,class :foreground ,red :background ,background-red)))
  561. `(avy-lead-face-0 ((,class :foreground ,purple :background ,background-purple)))
  562. `(avy-lead-face-1 ((,class :foreground ,blue :background ,background-blue)))
  563. `(avy-lead-face-2 ((,class :foreground ,green :background ,background-green)))
  564. `(erc-nick-default-face ((,class :foreground ,blue :background ,background-blue :weight bold)))
  565. `(erc-current-nick-face ((,class :foreground ,red :weight bold :background ,background-red)))
  566. `(erc-my-nick-face ((,class :foreground ,red :weight bold :background ,background-red)))
  567. `(erc-notice-face ((,class :foreground ,comment)))
  568. `(erc-input-face ((,class :foreground ,default :weight bold)))
  569. `(erc-prompt-face ((,class :foreground ,purple :background ,background-purple :weight bold :box 1)))
  570. `(erc-timestamp-face ((,class :foreground ,purple :weight bold)))
  571. ;; slack
  572. `(slack-message-output-header ((,class :foreground ,blue :background ,background-blue :weight bold)))
  573. `(hydra-face-red ((,class :foreground ,red :weight bold)))
  574. `(hydra-face-blue ((,class :foreground ,blue :weight bold)))
  575. ;; elfeed
  576. `(elfeed-search-date-face ((,class (:foreground ,blue))))
  577. `(elfeed-search-feed-face ((,class (:foreground ,blue))))
  578. `(elfeed-search-tag-face ((,class (:foreground ,green))))
  579. `(elfeed-search-title-face ((,class (:foreground ,purple))))
  580. ;; wgrep
  581. `(wgrep-face ((,class (:foreground ,orange))))
  582. `(wgrep-reject-face ((,class (:foreground ,red :weight bold :background ,background-red))))
  583. `(wgrep-done-face ((,class (:foreground ,blue :weight bold))))
  584. ;; AucTeX
  585. `(font-latex-math-face ((,class :foreground ,green-light)))
  586. `(font-latex-sectioning-5-face ((,class :foreground ,blue)))
  587. `(font-latex-string-face ((,class :inherit font-lock-string-face)))
  588. `(font-latex-bold-face ((,class :foreground ,green :weight bold)))
  589. `(font-latex-italic-face ((,class :foreground ,green :slant italic)))
  590. `(font-latex-warning-face ((,class :inherit warning)))
  591. ;; Anzu
  592. `(anzu-replace-highlight ((,class :foreground ,red :background ,background-red :strike-through t)))
  593. `(anzu-replace-to ((,class :foreground ,green :background ,background-green)))
  594. `(anzu-match-1 ((,class :foreground ,red :background ,background-red :box t)))
  595. `(anzu-match-2 ((,class :foreground ,red :background ,background-red :box t)))
  596. `(anzu-match-3 ((,class :foreground ,red :background ,background-red :box t)))
  597. `(anzu-mode-line ((,class :inherit mode-line :weight bold)))
  598. ;; jabber.el
  599. `(jabber-roster-user-online ((,class :foreground ,blue :weight bold)))
  600. `(jabber-roster-user-error ((,class :foreground ,red :background ,background-red :weight bold)))
  601. `(jabber-rare-time-face ((,class :foreground ,comment)))
  602. `(jabber-chat-prompt-local ((,class :foreground ,purple :background ,background-purple :weight bold)))
  603. `(jabber-chat-prompt-foreign ((,class :foreground ,green :background ,background-green :weight bold)))
  604. `(jabber-activity-personal-face ((,class :foreground ,red :background ,background-red :weight bold)))
  605. `(jabber-roster-user-away ((,class :foreground ,orange)))
  606. `(jabber-roster-user-xa ((,class :foreground ,orange)))
  607. ;; ace-window
  608. `(aw-leading-char-face ((,class :foreground ,red :weight bold)))
  609. `(aw-background-face ((,class :foreground ,comment)))
  610. ;; paren-face.el
  611. `(parenthesis ((,class (:foreground ,comment))))
  612. ;; rainbow-delimiters
  613. `(rainbow-delimiters-mismatched-face ((,class :foreground ,red :weight bold :background ,background-red)))
  614. `(rainbow-delimiters-unmatched-face ((,class :foreground ,red :weight bold :background ,background-red)))
  615. ;; makefile
  616. `(makefile-space ((,class (:background ,background-blue))))
  617. ;; epa
  618. `(epa-validity-high ((,class (:foreground ,green))))
  619. `(epa-validity-low ((,class (:foreground ,default))))
  620. `(epa-validity-disabled ((,class (:foreground ,red :weight bold :background ,background-red))))
  621. `(epa-field-name ((,class (:foreground ,purple :weight bold))))
  622. `(epa-field-body ((,class (:foreground ,orange))))
  623. ;; tabbar
  624. `(tabbar-default ((,class (:inherit variable-pitch :background ,background-darker :foreground ,green-light :height 0.9))))
  625. `(tabbar-button ((,class (:inherit tabbar-default ))))
  626. `(tabbar-button-highlight ((,class (:inherit tabbar-default))))
  627. `(tabbar-highlight ((,class (:underline t))))
  628. `(tabbar-selected ((,class (:inherit tabbar-default :foreground ,orange :background ,background :weight bold))))
  629. `(tabbar-separator ((,class (:inherit tabbar-default :background ,background-darker))))
  630. `(tabbar-unselected ((,class (:inherit tabbar-default :slant italic :weight semi-bold))))
  631. ;; markup-face
  632. `(markup-title-0-face ((,class (:foreground ,blue :weight bold :underline t))))
  633. `(markup-title-1-face ((,class (:foreground ,purple :weight bold :underline t))))
  634. `(markup-title-2-face ((,class (:foreground ,peach :weight bold :underline t))))
  635. `(markup-title-3-face ((,class (:foreground ,green-light :weight bold :underline t))))
  636. `(markup-title-4-face ((,class (:foreground ,blue :weight bold :underline t))))
  637. `(markup-title-5-face ((,class (:foreground ,purple :weight bold :underline t))))
  638. `(markup-error-face ((,class (:foreground ,red :background ,background-red :weight bold))))
  639. `(markup-gen-face ((,class (:foreground ,blue))))
  640. `(markup-typewriter-face ((,class (:inherit shadow))))
  641. `(markup-meta-face ((,class (:foreground ,comment))))
  642. `(markup-meta-hide-face ((,class (:foreground ,comment))))
  643. `(markup-verbatim-face ((,class (:inherit shadow :background ,background-lighter))))
  644. `(markup-reference-face ((,class (:inherit link))))
  645. `(markup-complex-replacement-face ((,class (:background ,background-green))))
  646. `(markup-secondary-text-face ((,class (:foreground ,comment))))
  647. ;; Elbank
  648. `(elbank-progressbar-fill-face ((,class (:background ,diff-added-refined-background :weight bold))))
  649. `(elbank-progressbar-overflow-face ((,class (:background ,diff-removed-refined-background :weight bold))))
  650. )
  651. (custom-theme-set-variables
  652. 'zerodark
  653. `(ansi-color-names-vector [,background
  654. ,red
  655. ,green
  656. ,orange
  657. ,blue
  658. ,purple
  659. ,blue-dark
  660. ,default])))
  661. (defun zerodark-face-when-active (face)
  662. "Return FACE if the window is active."
  663. (when (zerodark--active-window-p)
  664. face))
  665. ;; So the mode-line can keep track of "the current window"
  666. (defvar zerodark-selected-window nil
  667. "Selected window.")
  668. (defun zerodark--set-selected-window (&rest _)
  669. "Set the selected window."
  670. (let ((window (frame-selected-window)))
  671. (when (and (windowp window)
  672. (not (minibuffer-window-active-p window)))
  673. (setq zerodark-selected-window window))))
  674. (defun zerodark--active-window-p ()
  675. "Return non-nil if the current window is active."
  676. (eq (selected-window) zerodark-selected-window))
  677. (add-hook 'window-configuration-change-hook #'zerodark--set-selected-window)
  678. (add-hook 'focus-in-hook #'zerodark--set-selected-window)
  679. (advice-add 'select-window :after #'zerodark--set-selected-window)
  680. (advice-add 'select-frame :after #'zerodark--set-selected-window)
  681. ;;;###autoload
  682. (defun zerodark-setup-modeline-format ()
  683. "Setup the mode-line format for zerodark."
  684. (interactive)
  685. (require 'flycheck)
  686. (require 'magit)
  687. (require 'all-the-icons)
  688. (let ((class '((class color) (min-colors 89)))
  689. (light (if (true-color-p) "#ccd4e3" "#d7d7d7"))
  690. (comment (if (true-color-p) "#687080" "#707070"))
  691. (purple "#c678dd")
  692. (mode-line (if "#1c2129" "#222222")))
  693. (custom-theme-set-faces
  694. 'zerodark
  695. ;; Mode line faces
  696. `(mode-line ((,class (:background ,mode-line
  697. :height 0.9
  698. :foreground ,light
  699. :box ,(when zerodark-use-paddings-in-mode-line
  700. (list :line-width 6 :color mode-line))))))
  701. `(mode-line-inactive ((,class (:background ,mode-line
  702. :height 0.9
  703. :foreground ,comment
  704. :box ,(when zerodark-use-paddings-in-mode-line
  705. (list :line-width 6 :color mode-line))))))
  706. `(anzu-mode-line ((,class :inherit mode-line :foreground ,purple :weight bold)))
  707. ))
  708. (setq-default mode-line-format
  709. `("%e"
  710. " "
  711. ,zerodark-modeline-ro " "
  712. ,zerodark-buffer-coding
  713. mode-line-frame-identification " "
  714. " "
  715. ,zerodark-modeline-modified
  716. " "
  717. ,zerodark-modeline-buffer-identification
  718. ,zerodark-modeline-position
  719. ,(if zerodark-theme-display-vc-status
  720. zerodark-modeline-vc
  721. "")
  722. " "
  723. (:eval (zerodark-modeline-flycheck-status))
  724. " " mode-line-modes mode-line-misc-info mode-line-end-spaces
  725. )))
  726. ;;;###autoload
  727. (when (and (boundp 'custom-theme-load-path) load-file-name)
  728. (add-to-list 'custom-theme-load-path
  729. (file-name-as-directory (file-name-directory load-file-name))))
  730. (provide-theme 'zerodark)
  731. ;; Local Variables:
  732. ;; no-byte-compile: t
  733. ;; End:
  734. ;;; zerodark-theme.el ends here