alect-themes.el 105 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048
  1. ;;; alect-themes.el --- Configurable light, dark and black themes for Emacs 24 or later -*- lexical-binding: t -*-
  2. ;; Copyright © 2013–2021 Alex Kost
  3. ;; Author: Alex Kost <alezost@gmail.com>
  4. ;; Created: 10 Jul 2013
  5. ;; Version: 0.10
  6. ;; Package-Requires: ((emacs "24.0"))
  7. ;; URL: https://github.com/alezost/alect-themes
  8. ;; Keywords: color theme
  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. ;;
  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.
  18. ;;
  19. ;; You should have received a copy of the GNU General Public License
  20. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. ;;; Commentary:
  22. ;; This package provides 6 highly customizable color themes (light, dark
  23. ;; and black) for GNU Emacs 24 or later. These themes are intended to
  24. ;; be used with GUI, so only graphical terminals are supported by
  25. ;; default. However you can "enable" the themes for other classes of
  26. ;; terminals with `alect-display-class' variable.
  27. ;; You can install the package from MELPA. If you prefer the manual
  28. ;; installation, put these lines into your init-file:
  29. ;;
  30. ;; (add-to-list 'load-path "/path/to/alect-themes")
  31. ;; (add-to-list 'custom-theme-load-path "/path/to/alect-themes")
  32. ;; If you also want to enable a theme on Emacs start, use this:
  33. ;;
  34. ;; (load-theme 'alect-light t)
  35. ;; Ways for configuring the themes:
  36. ;;
  37. ;; 1. Modifying color palette for the themes - by customizing
  38. ;; `alect-colors' variable. You may use `alect-generate-colors' to
  39. ;; redefine the whole variable (see the code) or `alect-set-color' to
  40. ;; modify specified colors.
  41. ;;
  42. ;; 2. Ignoring faces and variables. You can force alect-themes not to
  43. ;; modify some (or all) faces and variables with
  44. ;; `alect-ignored-faces' and `alect-ignored-variables' variables.
  45. ;;
  46. ;; 3. Overriding face specification. You can change the look of
  47. ;; particular faces by setting `alect-overriding-faces' variable.
  48. ;;
  49. ;; 4. Above that, the inverted color themes (`alect-light-alt' and
  50. ;; `alect-dark-alt') can be configured with
  51. ;; `alect-inverted-color-regexp' variable.
  52. ;; For full description and some screenshots, see
  53. ;; <https://github.com/alezost/alect-themes>.
  54. ;; All screenshots can be found at <http://imgur.com/a/eBx96>.
  55. ;;; Code:
  56. (require 'cl-lib)
  57. (defun alect-put-colors (color-name theme-names color-vals var)
  58. "Put theme colors into the variable VAR.
  59. THEME-NAMES is a list of symbols. Theme names should already
  60. exist in the variable.
  61. COLOR-VALS is a list of colors for the specified theme (theme
  62. names and color values should be in matching order)."
  63. (when theme-names
  64. (let ((theme (assoc (car theme-names) var))
  65. (color-val (car color-vals)))
  66. (setcdr theme (cons (cons color-name color-val) (cdr theme))))
  67. (alect-put-colors color-name (cdr theme-names) (cdr color-vals) var)))
  68. ;;;###autoload
  69. (defun alect-generate-colors (theme-names colors)
  70. "Return alist of themes suitable for the variable `alect-colors'.
  71. THEME-NAMES is a list of symbols.
  72. COLORS is a list of lists (COLOR-NAME COLOR-VAL...) where
  73. COLOR-VAL is a color for specified theme (theme names and color
  74. values should be in matching order)."
  75. (let ((cols (mapcar #'list theme-names)))
  76. (dolist (elem colors)
  77. (alect-put-colors (car elem) theme-names (cdr elem) cols))
  78. cols))
  79. (defgroup alect nil
  80. "Options for alect color themes."
  81. :group 'faces)
  82. (defgroup alect-faces nil
  83. "Auxiliary faces used by alect color themes."
  84. :group 'alect
  85. :group 'faces)
  86. (defface alect-prompt
  87. '((t nil))
  88. "Auxiliary face for inheriting by some other faces.
  89. Used for various prompts like `minibuffer-prompt' or `eshell-prompt'."
  90. :group 'alect-faces)
  91. (defface alect-time
  92. '((t nil))
  93. "Auxiliary face for inheriting by some other faces.
  94. Used for date/time faces like `org-date' or `erc-timestamp-face'."
  95. :group 'alect-faces)
  96. (defface alect-file
  97. '((t nil))
  98. "Auxiliary face for inheriting by some other faces.
  99. Used for 'file name' faces like `change-log-file' or
  100. `compilation-info'."
  101. :group 'alect-faces)
  102. (defface alect-author
  103. '((t nil))
  104. "Auxiliary face for inheriting by some other faces.
  105. Used for author faces like `magit-log-author' or `change-log-name'."
  106. :group 'alect-faces)
  107. (defface alect-key
  108. '((t nil))
  109. "Auxiliary face for inheriting by some other faces.
  110. Used for key faces like `apropos-keybinding' or `magit-popup-key'."
  111. :group 'alect-faces)
  112. (defface alect-selected-item
  113. '((t nil))
  114. "Auxiliary face for inheriting by some other faces.
  115. Used for selected items like `org-date-selected' or
  116. `gnus-summary-selected'."
  117. :group 'alect-faces)
  118. (defface alect-title
  119. '((t nil))
  120. "Auxiliary face for inheriting by some other faces.
  121. Used for titles without levels like `dired-header' or
  122. `magit-section-title'."
  123. :group 'alect-faces)
  124. (defface alect-field-title
  125. '((t nil))
  126. "Auxiliary face for inheriting by some other faces.
  127. Used for field titles like `package-help-section-name' or
  128. `message-header-name'."
  129. :group 'alect-faces)
  130. (defface alect-block
  131. '((t nil))
  132. "Auxiliary face for inheriting by some other faces.
  133. Used for blocks of text like `org-block' or
  134. `markdown-code-face'."
  135. :group 'alect-faces)
  136. (defface alect-block-title
  137. '((t nil))
  138. "Auxiliary face for inheriting by some other faces.
  139. Used for titles of blocks like `org-meta-line' or
  140. `markdown-language-keyword-face'."
  141. :group 'alect-faces)
  142. (defface alect-button
  143. '((t nil))
  144. "Auxiliary face for inheriting by some other faces.
  145. Used for buttons like `custom-button' or `w3m-form-button'."
  146. :group 'alect-faces)
  147. (defface alect-button-pressed
  148. '((t nil))
  149. "Auxiliary face for inheriting by some other faces.
  150. Used for buttons like `custom-button-pressed' or
  151. `w3m-form-button-pressed'."
  152. :group 'alect-faces)
  153. (defface alect-button-mouse
  154. '((t nil))
  155. "Auxiliary face for inheriting by some other faces.
  156. Used for buttons like `custom-button-mouse' or
  157. `w3m-form-button-mouse'."
  158. :group 'alect-faces)
  159. (defface alect-tab-default
  160. '((t nil))
  161. "Auxiliary face for inheriting by some other faces.
  162. Used for faces like `tabbar-default' or `w3m-tab-background'."
  163. :group 'alect-faces)
  164. (defface alect-tab-unselected
  165. '((t nil))
  166. "Auxiliary face for inheriting by some other faces.
  167. Used for tabs like `tabbar-unselected' or `w3m-tab-unselected'."
  168. :group 'alect-faces)
  169. (defface alect-tab-selected
  170. '((t nil))
  171. "Auxiliary face for inheriting by some other faces.
  172. Used for tabs like `tabbar-selected' or `w3m-tab-selected'."
  173. :group 'alect-faces)
  174. (defface alect-tab-mouse
  175. '((t nil))
  176. "Auxiliary face for inheriting by some other faces.
  177. Used for tabs like `tabbar-highlight' or `w3m-tab-mouse'."
  178. :group 'alect-faces)
  179. (defmacro alect-define-color-level-face (n)
  180. "Define face for color level N.
  181. Name of the defined face is `alect-color-level-N'."
  182. `(defface ,(intern (format "alect-color-level-%d" n))
  183. '((t nil))
  184. "Auxiliary face for inheriting by some other faces."
  185. :group 'alect-faces))
  186. (defmacro alect-define-title-face (n)
  187. "Define title face for level N.
  188. Name of the defined face is `alect-title-N'."
  189. `(defface ,(intern (format "alect-title-%d" n))
  190. '((t nil))
  191. ,(format "Auxiliary face for inheriting by some other faces.
  192. Used for titles with levels like `org-level-%s' or
  193. `markdown-header-face-%s'." n n)
  194. :group 'alect-faces))
  195. (defmacro alect-define-faces (definer n)
  196. `(progn
  197. ,@(mapcar (lambda (i) (list definer i))
  198. (number-sequence 1 n))))
  199. (alect-define-faces alect-define-color-level-face 12)
  200. (alect-define-faces alect-define-title-face 8)
  201. (defcustom alect-header-height 1.13
  202. "Height of `header-line' face."
  203. :type 'number
  204. :group 'alect)
  205. (defcustom alect-single-title-height 1.13
  206. "Height of `alect-title' face."
  207. :type 'number
  208. :group 'alect)
  209. (defcustom alect-multiple-titles-height 1.13
  210. "Height of `alect-title-N' faces."
  211. :type 'number
  212. :group 'alect)
  213. (defcustom alect-overriding-faces nil
  214. "List of faces that override original themed faces.
  215. The faces should be in a form accepted by `custom-theme-set-faces'.
  216. Instead of color values (like \"SkyBlue\" or \"#abcdef\") you may
  217. use the names of colors from `alect-colors' (like `magenta' or
  218. `blue+1'). During loading a theme these symbols will be
  219. substituted with values according to the current theme (light or
  220. dark).
  221. Use this variable if you want alect-themes to use non-default
  222. specifications of faces.
  223. Example:
  224. (setq alect-overriding-faces
  225. '((mode-line-buffer-id ((t :foreground bg-2 :weight bold)))
  226. (mode-line ((t :foreground bg-1 :background fg+1
  227. :box (:line-width 2 :color bg-2))))))
  228. Evaluate it and reload an alect-theme to see the difference."
  229. :type 'sexp
  230. :group 'alect)
  231. (defcustom alect-colors
  232. (alect-generate-colors
  233. '(light dark black)
  234. '((cursor "#1074cd" "#d0d060" "#b1c721")
  235. (gray-2 "#fafafa" "#e9e9e9" "#dedede")
  236. (gray-1 "#adadad" "#c0c0c0" "#bababa")
  237. (gray "#909090" "#9f9f9f" "#9b9b9b")
  238. (gray+1 "#444444" "#505050" "#555555")
  239. (gray+2 "#070707" "#000000" "#000000")
  240. (fg-2 "#6c6c6c" "#8c826d" "#8b806c")
  241. (fg-1 "#505050" "#d0bf8f" "#ab9861")
  242. (fg "#3f3f3f" "#f0dfaf" "#c4ad63")
  243. (fg+1 "#262626" "#d5d2be" "#b2af95")
  244. (fg+2 "#101010" "#f6f0e1" "#d6cbae")
  245. (bg-2 "#f6f0e1" "#222222" "#404040")
  246. (bg-1 "#ded6c5" "#3f3f3f" "#000000")
  247. (bg-0.5 "#dcd2bd" "#464646" "#101010")
  248. (bg "#d9ceb2" "#4f4f4f" "#202020")
  249. (bg+1 "#d4caa7" "#5f5f5f" "#303030")
  250. (bg+2 "#ccc19b" "#6f6f6f" "#454545")
  251. (red-2 "#fa5151" "#fa6a6e" "#e96060")
  252. (red-1 "#e43838" "#fa5151" "#ea4141")
  253. (red "#f71010" "#ea3838" "#db4334")
  254. (red+1 "#d81212" "#db4334" "#c83029")
  255. (red+2 "#b22222" "#c83029" "#ae2823")
  256. (red-bg-1 "#ff6868" "#c64242" "#a52621")
  257. (red-bg "#fb9494" "#a83838" "#86201c")
  258. (red-bg+1 "#eec5c5" "#6a3636" "#531311")
  259. (yellow-2 "#ab9c3a" "#f8ffa0" "#e9e953")
  260. (yellow-1 "#9ca30b" "#e8e815" "#c9d617")
  261. (yellow "#ef8300" "#fe8b04" "#dc7700")
  262. (yellow+1 "#958323" "#e5c900" "#bcaa00")
  263. (yellow+2 "#6a621b" "#abab3a" "#959508")
  264. (yellow-bg-1 "#cbcb20" "#909032" "#73712a")
  265. (yellow-bg "#dddd44" "#5e5c28" "#565624")
  266. (yellow-bg+1 "#e0e0a0" "#3c3c20" "#35351c")
  267. (green-2 "#3cb368" "#8ce096" "#47cd57")
  268. (green-1 "#1c9e28" "#32cd32" "#29b029")
  269. (green "#028902" "#7fb07f" "#60a060")
  270. (green+1 "#008b45" "#3cb370" "#319448")
  271. (green+2 "#077707" "#099709" "#078607")
  272. (green-bg-1 "#58c87c" "#31945c" "#297d4d")
  273. (green-bg "#9cdb6c" "#247744" "#1f673b")
  274. (green-bg+1 "#c9e6b3" "#2c5434" "#203f26")
  275. (cyan-2 "#0eaeae" "#8cf1f1" "#26d5d5")
  276. (cyan-1 "#259ea2" "#2fdbde" "#1ec1c4")
  277. (cyan "#358d8d" "#1fb3b3" "#1ba1a1")
  278. (cyan+1 "#0d7b72" "#528d8d" "#4c8383")
  279. (cyan+2 "#286060" "#0c8782" "#0a7874")
  280. (cyan-bg-1 "#4ecad7" "#1a758a" "#155f70")
  281. (cyan-bg "#80d7db" "#195f73" "#0f414d")
  282. (cyan-bg+1 "#c3d4d7" "#235050" "#132c2c")
  283. (blue-2 "#0092ff" "#b0c0ff" "#8cb7ff")
  284. (blue-1 "#2c53ca" "#94bff3" "#58b1f3")
  285. (blue "#1111ff" "#62b6ea" "#00a2f5")
  286. (blue+1 "#2020cc" "#30a5f5" "#1e7bda")
  287. (blue+2 "#00008b" "#3390dc" "#2062d0")
  288. (blue-bg-1 "#7cc0f7" "#1a63b3" "#144f8f")
  289. (blue-bg "#b0d0f3" "#134b87" "#0c325a")
  290. (blue-bg+1 "#bcd9f5" "#2b3f6b" "#0d1a38")
  291. (magenta-2 "#dc63dc" "#ebabde" "#dc8cc3")
  292. (magenta-1 "#ba55d3" "#dc8cc3" "#e353b9")
  293. (magenta "#a020f0" "#e353b9" "#da26ce")
  294. (magenta+1 "#9400d3" "#e81eda" "#c251df")
  295. (magenta+2 "#8b008b" "#be59d8" "#a92ec9")
  296. (magenta-bg-1 "#e98bb7" "#864d7d" "#72416a")
  297. (magenta-bg "#e5b3c4" "#6e4266" "#54324e")
  298. (magenta-bg+1 "#ecd0d0" "#55334f" "#351f31")))
  299. "List of lists containing color palettes for alect-themes.
  300. List ((theme (color . val) ...) ...).
  301. Each list is a cons cell of a theme name (symbol) and alist of
  302. color names (symbols) and values (strings)."
  303. :type '(alist :key-type symbol
  304. :value-type (alist :key-type symbol
  305. :value-type color))
  306. ;; another suitable variant
  307. ;; :type '(repeat (cons symbol
  308. ;; (alist :key-type symbol :value-type color)))
  309. :group 'alect)
  310. (defun alect-set-color (theme-name color-name color-val)
  311. "Set color COLOR-NAME of a theme THEME-NAME to the value of COLOR-VAL.
  312. COLOR-NAME and THEME-NAME are symbols, COLOR-VAL is a string.
  313. See `alect-colors' for details."
  314. (let ((color-alist (cdr (assoc theme-name alect-colors))))
  315. (or color-alist
  316. (error "Theme '%s' does not exist" theme-name))
  317. (let ((color-cons (assoc color-name color-alist)))
  318. (or color-cons
  319. (error "Color '%s' does not exist" color-name))
  320. (setcdr color-cons color-val))))
  321. (defcustom alect-inverted-color-regexp
  322. "^\\(red\\|yellow\\|green\\|cyan\\|blue\\|magenta\\)\\([-+]\\)\\([012]\\)$"
  323. "Regexp matching a name of the color for inverted theme.
  324. The first parenthesized group should match a base color
  325. name (e.g. \"fg\" or \"blue\").
  326. The second group should match a sign (\"-\" or \"+\").
  327. The third group should match a color number (0, 1 or 2).
  328. For available color names, see `alect-colors'.
  329. For description of inverting colors, see `alect-get-color'."
  330. :type 'regexp
  331. :group 'alect)
  332. (defun alect-get-color (theme-name color-name &optional invert)
  333. "Return the value of color COLOR-NAME for a theme THEME-NAME.
  334. If INVERT is non-nil, return the value of the \"opposite\" color.
  335. E.g. use the value of \"magenta+1\" if COLOR-NAME is
  336. \"magenta-1\" or use \"red-2\" instead of \"red+2\" and so on.
  337. Invert only the color matching `alect-inverted-color-regexp'.
  338. For the values of THEME-NAME and COLOR-NAME, see `alect-colors'."
  339. (and invert
  340. (let ((color (symbol-name color-name)))
  341. (and (string-match alect-inverted-color-regexp color)
  342. (let ((base (match-string 1 color))
  343. (sign (match-string 2 color))
  344. (num (match-string 3 color)))
  345. (and base sign num
  346. (setq color-name
  347. (intern (concat base
  348. (if (equal sign "-")
  349. "+"
  350. "-")
  351. num))))))))
  352. (cdr (assoc color-name
  353. (cdr (assoc theme-name alect-colors)))))
  354. (defcustom alect-display-class
  355. '((type graphic))
  356. "Class of terminals (DISPLAY) for which alect-themes are applied.
  357. For other terminals, faces stay unthemed.
  358. See Info node `(elisp) Defining Faces' for the possibilities for
  359. DISPLAY."
  360. :type '(choice
  361. (const :tag "Graphical terminals" ((type graphic)))
  362. (const :tag "Terminals with at least 256 colors"
  363. ((class color) (min-colors 256)))
  364. (const :tag "All terminals")
  365. (sexp :tag "Other"))
  366. :group 'alect)
  367. (defun alect-get-customization (theme &optional invert)
  368. "Return cons of settings for theme THEME.
  369. Car of the cons is a list for `custom-theme-set-faces' function.
  370. Cdr of the cons is a list for `custom-theme-set-variables' function.
  371. THEME is a name of the color theme (symbol from `alect-colors').
  372. For INVERT, see `alect-get-color'."
  373. (cl-flet ((gc (col) (alect-get-color theme col invert)))
  374. (let ((c alect-display-class))
  375. (cons
  376. ;; FACES
  377. `( ;; basic colors
  378. (default ((,c :foreground ,(gc 'fg+1)
  379. :background ,(gc 'bg-1))))
  380. (cursor ((,c :background ,(gc 'cursor))))
  381. (button ((,c :inherit link
  382. :underline (:color ,(gc 'fg+1)))))
  383. (link ((,c :foreground ,(gc 'blue-1)
  384. :underline t)))
  385. (link-visited ((,c :foreground ,(gc 'blue+2)
  386. :underline t)))
  387. (match ((,c :foreground ,(gc 'fg+1)
  388. :background ,(gc 'blue-bg))))
  389. (escape-glyph ((,c :foreground ,(gc 'yellow)
  390. :weight bold)))
  391. (fringe ((,c :foreground ,(gc 'gray)
  392. :background ,(gc 'bg-2))))
  393. (header-line ((,c :foreground ,(gc 'fg+2)
  394. :height ,alect-header-height
  395. :box (:line-width 1
  396. :color ,(gc 'fg+2)
  397. :style nil))))
  398. (highlight ((,c :foreground ,(gc 'gray+2)
  399. :background ,(gc 'gray-2))))
  400. (shadow ((,c :foreground ,(gc 'gray))))
  401. (success ((,c :foreground ,(gc 'green)
  402. :weight bold)))
  403. (error ((,c :foreground ,(gc 'red)
  404. :weight bold)))
  405. (warning ((,c :foreground ,(gc 'yellow-1))))
  406. (region ((,c :background ,(gc 'bg+2))))
  407. (menu ((,c :foreground ,(gc 'fg+2)
  408. :background ,(gc 'bg-2)
  409. :height ,alect-header-height)))
  410. (tool-bar ((,c :inherit mode-line)))
  411. (scroll-bar ((,c :background ,(gc 'bg+2))))
  412. (tooltip ((,c :inherit variable-pitch
  413. :foreground ,(gc 'cyan+2)
  414. :background ,(gc 'bg-2))))
  415. (minibuffer-prompt ((,c :inherit alect-prompt)))
  416. (secondary-selection ((,c :background ,(gc 'bg+1))))
  417. (trailing-whitespace ((,c :background ,(gc 'red-bg-1))))
  418. (vertical-border ((,c :foreground ,(gc 'fg+1))))
  419. (window-divider ((,c :foreground ,(gc 'green+2))))
  420. (window-divider-first-pixel ((,c :foreground ,(gc 'green+1))))
  421. (window-divider-last-pixel ((,c :inherit window-divider-first-pixel)))
  422. ;; auxiliary faces for inheriting
  423. (alect-field-title ((,c :foreground ,(gc 'yellow+1))))
  424. (alect-block ((,c :background ,(gc 'bg-0.5)
  425. :extend t)))
  426. (alect-block-title ((,c :inherit alect-block
  427. :foreground ,(gc 'green+1))))
  428. (alect-prompt ((,c :foreground ,(gc 'magenta-1)
  429. :weight bold)))
  430. (alect-time ((,c :foreground ,(gc 'cyan-2))))
  431. (alect-file ((,c :foreground ,(gc 'green+1))))
  432. (alect-author ((,c :foreground ,(gc 'magenta-1))))
  433. (alect-key ((,c :foreground ,(gc 'red-2)
  434. :weight bold)))
  435. (alect-selected-item ((,c :background ,(gc 'bg)
  436. :box (:line-width -1
  437. :color ,(gc 'fg+1)
  438. :style nil))))
  439. (alect-color-level-1 ((,c :foreground ,(gc 'blue+1))))
  440. (alect-color-level-2 ((,c :foreground ,(gc 'green))))
  441. (alect-color-level-3 ((,c :foreground ,(gc 'red+1))))
  442. (alect-color-level-4 ((,c :foreground ,(gc 'yellow+2))))
  443. (alect-color-level-5 ((,c :foreground ,(gc 'cyan+1))))
  444. (alect-color-level-6 ((,c :foreground ,(gc 'blue-1))))
  445. (alect-color-level-7 ((,c :foreground ,(gc 'magenta-1))))
  446. (alect-color-level-8 ((,c :foreground ,(gc 'yellow))))
  447. (alect-color-level-9 ((,c :foreground ,(gc 'green-1))))
  448. (alect-color-level-10 ((,c :foreground ,(gc 'red-2))))
  449. (alect-color-level-11 ((,c :foreground ,(gc 'cyan-2))))
  450. (alect-color-level-12 ((,c :foreground ,(gc 'magenta+2))))
  451. (alect-title ((,c :foreground ,(gc 'green+2) :weight bold
  452. :height ,alect-single-title-height)))
  453. (alect-title-1 ((,c :inherit alect-color-level-1 :weight bold
  454. :height ,alect-multiple-titles-height)))
  455. (alect-title-2 ((,c :inherit alect-color-level-2 :weight bold
  456. :height ,alect-multiple-titles-height)))
  457. (alect-title-3 ((,c :inherit alect-color-level-3 :weight bold
  458. :height ,alect-multiple-titles-height)))
  459. (alect-title-4 ((,c :inherit alect-color-level-4 :weight bold
  460. :height ,alect-multiple-titles-height)))
  461. (alect-title-5 ((,c :inherit alect-color-level-5 :weight bold
  462. :height ,alect-multiple-titles-height)))
  463. (alect-title-6 ((,c :inherit alect-color-level-6 :weight bold
  464. :height ,alect-multiple-titles-height)))
  465. (alect-title-7 ((,c :inherit alect-color-level-7 :weight bold
  466. :height ,alect-multiple-titles-height)))
  467. (alect-title-8 ((,c :inherit alect-color-level-8 :weight bold
  468. :height ,alect-multiple-titles-height)))
  469. (alect-button ((,c :foreground ,(gc 'fg+2)
  470. :background ,(gc 'bg+2)
  471. :box (:line-width 2
  472. :style released-button))))
  473. (alect-button-pressed ((,c :inherit alect-button
  474. :box (:line-width 2
  475. :style pressed-button))))
  476. (alect-button-mouse ((,c :inherit highlight
  477. :box (:line-width 2
  478. :style released-button))))
  479. (alect-tab-default ((,c :height 0.9 :box nil
  480. :background ,(gc 'bg-1))))
  481. (alect-tab-unselected ((,c :inherit alect-tab-default
  482. :foreground ,(gc 'fg-2)
  483. :background ,(gc 'bg)
  484. :box (:line-width 1
  485. :style released-button))))
  486. (alect-tab-selected ((,c :inherit alect-tab-unselected
  487. :foreground ,(gc 'fg+2)
  488. :background ,(gc 'bg+1))))
  489. (alect-tab-mouse ((,c :inherit alect-tab-default
  490. :inherit mode-line-highlight)))
  491. ;; apropos
  492. (apropos-keybinding ((,c :inherit alect-key)))
  493. (apropos-symbol ((,c :foreground ,(gc 'green+1)
  494. :weight bold)))
  495. ;; auctex
  496. (font-latex-bold ((,c :inherit bold)))
  497. (font-latex-warning ((,c :inherit font-lock-warning-face)))
  498. (font-latex-sedate ((,c :foreground ,(gc 'yellow)
  499. :weight bold )))
  500. (font-latex-title-4 ((,c :inherit variable-pitch
  501. :weight bold)))
  502. ;; aurel
  503. (aurel-info-id ((,c :foreground ,(gc 'fg+2))))
  504. (aurel-info-name ((,c :inherit alect-title)))
  505. (aurel-info-maintainer ((,c :foreground ,(gc 'magenta-1)
  506. :weight bold)))
  507. (aurel-info-date ((,c :inherit alect-time)))
  508. (aurel-info-license ((,c :foreground ,(gc 'yellow))))
  509. (aurel-info-version ((,c :foreground ,(gc 'yellow+2))))
  510. (aurel-info-category ((,c :foreground ,(gc 'green-1))))
  511. (aurel-info-size ((,c :foreground ,(gc 'red-1))))
  512. (aurel-info-provides ((,c :foreground ,(gc 'green+2))))
  513. (aurel-info-depends ((,c :foreground ,(gc 'fg))))
  514. (aurel-info-depends-opt ((,c :foreground ,(gc 'fg-2))))
  515. (aurel-info-required ((,c :foreground ,(gc 'fg))))
  516. (aurel-info-optional-for ((,c :foreground ,(gc 'fg-2))))
  517. (aurel-info-voted ((,c :foreground ,(gc 'green)
  518. :weight bold)))
  519. ;; auto-complete
  520. (ac-candidate-face ((,c :foreground ,(gc 'gray+2)
  521. :background ,(gc 'bg+2))))
  522. (ac-selection-face ((,c :foreground ,(gc 'bg-1)
  523. :background ,(gc 'fg+1))))
  524. (ac-completion-face ((,c :foreground ,(gc 'fg-2))))
  525. (ac-candidate-mouse-face ((,c :inherit highlight)))
  526. ;; bui
  527. (bui-action-button ((,c :inherit alect-button)))
  528. (bui-action-button-mouse ((,c :inherit alect-button-mouse)))
  529. (bui-file-name ((,c :inherit alect-file
  530. :underline t)))
  531. (bui-time ((,c :inherit alect-time)))
  532. (bui-url ((,c :inherit link)))
  533. (bui-info-heading ((,c :inherit alect-title)))
  534. (bui-info-param-title ((,c :inherit alect-field-title)))
  535. (bui-hint-key ((,c :inherit alect-key)))
  536. ;; calendar, diary
  537. (calendar-today ((,c :box (:line-width -1
  538. :color ,(gc 'red)
  539. :style nil))))
  540. (diary ((,c :foreground ,(gc 'green+2) :weight bold)))
  541. (diary-anniversary ((,c :foreground ,(gc 'red))))
  542. (diary-time ((,c :inherit alect-time)))
  543. (holiday ((,c :background ,(gc 'bg+2))))
  544. ;; change-log
  545. (change-log-date ((,c :inherit alect-time)))
  546. (change-log-name ((,c :inherit alect-author)))
  547. (change-log-email ((,c :foreground ,(gc 'red-2))))
  548. (change-log-file ((,c :inherit alect-file)))
  549. (change-log-list ((,c :inherit font-lock-function-name-face)))
  550. (change-log-conditionals ((,c :inherit font-lock-variable-name-face)))
  551. (change-log-function ((,c :foreground ,(gc 'yellow))))
  552. (change-log-acknowledgment ((,c :inherit font-lock-keyword-face)))
  553. ;; comint
  554. (comint-highlight-prompt ((,c :inherit alect-prompt)))
  555. (comint-highlight-input ((,c :weight bold)))
  556. ;; company
  557. (company-tooltip ((,c :foreground ,(gc 'fg-1)
  558. :background ,(gc 'bg+1))))
  559. (company-tooltip-selection ((,c :foreground ,(gc 'fg-1)
  560. :background ,(gc 'bg-2))))
  561. (company-tooltip-mouse ((,c :inherit highlight)))
  562. (company-tooltip-annotation ((,c :inherit company-tooltip
  563. :foreground ,(gc 'blue))))
  564. (company-tooltip-common ((,c :inherit company-tooltip
  565. :foreground ,(gc 'fg+1))))
  566. (company-tooltip-common-selection ((,c :inherit company-tooltip-selection
  567. :foreground ,(gc 'fg+1))))
  568. (company-preview ((,c :foreground ,(gc 'fg-1))))
  569. (company-preview-common ((,c :inherit company-preview
  570. :underline t)))
  571. (company-scrollbar-fg ((,c :background ,(gc 'gray+1))))
  572. (company-scrollbar-bg ((,c :background ,(gc 'gray))))
  573. ;; compilation
  574. (compilation-info ((,c :inherit alect-file)))
  575. (compilation-warning ((,c :inherit warning)))
  576. (compilation-error ((,c :inherit error)))
  577. (compilation-line-number ((,c :foreground ,(gc 'yellow))))
  578. (compilation-column-number ((,c :foreground ,(gc 'yellow+2))))
  579. (compilation-mode-line-run ((,c :foreground ,(gc 'blue))))
  580. (compilation-mode-line-exit ((,c :inherit success)))
  581. (compilation-mode-line-fail ((,c :inherit compilation-error)))
  582. ;; completions
  583. (completions-common-part ((,c :foreground ,(gc 'fg-2))))
  584. ;; cperl
  585. (cperl-hash-face ((,c :foreground ,(gc 'cyan+1))))
  586. (cperl-array-face ((,c :foreground ,(gc 'yellow-1))))
  587. (cperl-nonoverridable-face ((,c :foreground ,(gc 'green-1))))
  588. ;; ctable
  589. (ctbl:face-cell-select ((,c :background ,(gc 'blue)
  590. :foreground ,(gc 'bg-1))))
  591. (ctbl:face-continue-bar ((,c :background ,(gc 'bg-2)
  592. :foreground ,(gc 'bg-1))))
  593. (ctbl:face-row-select ((,c :background ,(gc 'cyan)
  594. :foreground ,(gc 'bg-1))))
  595. ;; customization
  596. (custom-button ((,c :inherit alect-button)))
  597. (custom-button-pressed ((,c :inherit alect-button-pressed)))
  598. (custom-button-mouse ((,c :inherit alect-button-mouse)))
  599. (custom-button-unraised ((,c :inherit alect-button :box nil)))
  600. (custom-button-pressed-unraised ((,c :inherit custom-button-unraised
  601. :underline t)))
  602. (custom-documentation ((,c :inherit font-lock-doc-face)))
  603. (custom-comment ((,c :foreground ,(gc 'gray))))
  604. (custom-tag ((,c :foreground ,(gc 'blue+2))))
  605. (custom-state ((,c :foreground ,(gc 'green+1))))
  606. (custom-link ((,c :inherit link)))
  607. (custom-group-tag ((,c :inherit alect-title-1)))
  608. (custom-group-tag-1 ((,c :inherit alect-title-2)))
  609. (custom-group-subtitle ((,c :inherit alect-title-3)))
  610. (custom-face-tag ((,c :foreground ,(gc 'magenta+1)
  611. :weight bold)))
  612. (custom-variable-tag ((,c :inherit font-lock-variable-name-face
  613. :weight bold)))
  614. (custom-variable-button ((,c :weight bold :underline t)))
  615. (custom-visibility ((,c :inherit link :height 0.8)))
  616. ;; debbugs
  617. (debbugs-gnu-done ((,c :foreground ,(gc 'fg-1))))
  618. (debbugs-gnu-handled ((,c :inherit gnus-summary-normal-read)))
  619. (debbugs-gnu-new ((,c :inherit gnus-summary-normal-unread)))
  620. (debbugs-gnu-archived ((,c :foreground ,(gc 'fg-2))))
  621. (debbugs-gnu-stale ((,c :foreground ,(gc 'yellow))))
  622. (debbugs-gnu-pending ((,c :foreground ,(gc 'blue))))
  623. (debbugs-gnu-tagged ((,c :foreground ,(gc 'red))))
  624. ;; dictem
  625. (dictem-reference-definition-face ((,c :inherit link :underline nil)))
  626. (dictem-database-description-face ((,c :inherit alect-title)))
  627. (dictem-reference-dbname-face ((,c :foreground ,(gc 'red+1))))
  628. (dictem-reference-m1-face ((,c :foreground ,(gc 'cyan))))
  629. (dictem-reference-m2-face ((,c :foreground ,(gc 'green))))
  630. ;; diff
  631. (diff-context ((,c :foreground ,(gc 'fg-1))))
  632. (diff-added ((,c :foreground ,(gc 'green-1))))
  633. (diff-changed ((,c :foreground ,(gc 'yellow-1))))
  634. (diff-removed ((,c :foreground ,(gc 'red-1))))
  635. (diff-indicator-added ((,c :inherit diff-added :weight bold)))
  636. (diff-indicator-changed ((,c :inherit diff-changed :weight bold)))
  637. (diff-indicator-removed ((,c :inherit diff-removed :weight bold)))
  638. (diff-refine-added ((,c :background ,(gc 'green-bg)
  639. :foreground ,(gc 'fg+1))))
  640. (diff-refine-changed ((,c :background ,(gc 'yellow-bg)
  641. :foreground ,(gc 'fg+1))))
  642. (diff-refine-removed ((,c :background ,(gc 'red-bg)
  643. :foreground ,(gc 'fg+1))))
  644. (diff-header ((,c :foreground ,(gc 'blue-2) :weight bold)))
  645. (diff-hunk-header ((,c :inherit diff-header
  646. :foreground ,(gc 'green+2))))
  647. (diff-file-header ((,c :inherit diff-header
  648. :foreground ,(gc 'fg+2))))
  649. (diff-function ((,c :inherit diff-header
  650. :foreground ,(gc 'blue))))
  651. (diff-index ((,c :inherit diff-header
  652. :foreground ,(gc 'red-1))))
  653. (diff-nonexistent ((,c :inherit diff-header
  654. :foreground ,(gc 'gray))))
  655. ;; diff-hl
  656. (diff-hl-insert ((,c :foreground ,(gc 'fg+1)
  657. :background ,(gc 'green-bg))))
  658. (diff-hl-delete ((,c :inherit diff-hl-insert
  659. :background ,(gc 'red-bg))))
  660. (diff-hl-change ((,c :inherit diff-hl-insert
  661. :background ,(gc 'blue-bg))))
  662. ;; dired
  663. (dired-directory ((,c :inherit font-lock-function-name-face)))
  664. (dired-flagged ((,c :foreground ,(gc 'red))))
  665. (dired-header ((,c :inherit alect-title)))
  666. (dired-ignored ((,c :foreground ,(gc 'gray))))
  667. (dired-mark ((,c :foreground ,(gc 'blue+1))))
  668. (dired-marked ((,c :inherit warning)))
  669. (dired-perm-write ((,c :foreground ,(gc 'green-1))))
  670. (dired-symlink ((,c :inherit font-lock-constant-face)))
  671. (dired-warning ((,c :inherit font-lock-warning-face
  672. :background ,(gc 'bg-2))))
  673. ;; ediff
  674. (ediff-current-diff-A ((,c :background ,(gc 'red-bg+1))))
  675. (ediff-fine-diff-A ((,c :background ,(gc 'red-bg))))
  676. (ediff-even-diff-A ((,c :background ,(gc 'bg))))
  677. (ediff-odd-diff-A ((,c :background ,(gc 'bg+1))))
  678. (ediff-current-diff-B ((,c :background ,(gc 'green-bg+1))))
  679. (ediff-fine-diff-B ((,c :background ,(gc 'green-bg))))
  680. (ediff-even-diff-B ((,c :inherit ediff-even-diff-A)))
  681. (ediff-odd-diff-B ((,c :inherit ediff-odd-diff-A)))
  682. (ediff-current-diff-C ((,c :background ,(gc 'yellow-bg+1))))
  683. (ediff-fine-diff-C ((,c :background ,(gc 'yellow-bg))))
  684. (ediff-even-diff-C ((,c :inherit ediff-even-diff-A)))
  685. (ediff-odd-diff-C ((,c :inherit ediff-odd-diff-A)))
  686. (ediff-current-diff-Ancestor ((,c :background ,(gc 'magenta-bg+1))))
  687. (ediff-fine-diff-Ancestor ((,c :background ,(gc 'magenta-bg))))
  688. (ediff-even-diff-Ancestor ((,c :inherit ediff-even-diff-A)))
  689. (ediff-odd-diff-Ancestor ((,c :inherit ediff-odd-diff-A)))
  690. ;; eldoc
  691. (eldoc-highlight-function-argument ((,c :foreground ,(gc 'green)
  692. :weight bold)))
  693. ;; emms
  694. (emms-playlist-track-face ((,c :inherit gnus-summary-normal-unread)))
  695. (emms-playlist-selected-face ((,c :inherit alect-selected-item)))
  696. (emms-stream-name-face ((,c :foreground ,(gc 'blue+1))))
  697. (emms-stream-url-face ((,c :inherit default)))
  698. ;; erc
  699. (erc-header-line ((,c :inherit header-line)))
  700. (erc-bold-face ((,c :weight bold)))
  701. (erc-underline-face ((,c :underline t)))
  702. (erc-current-nick-face ((,c :foreground ,(gc 'blue) :weight bold)))
  703. (erc-dangerous-host-face ((,c :inherit font-lock-warning-face)))
  704. (erc-default-face ((,c :foreground ,(gc 'fg+1))))
  705. (erc-direct-msg-face ((,c :inherit erc-default-face
  706. :foreground ,(gc 'red-2))))
  707. (erc-action-face ((,c :inherit erc-bold-face)))
  708. (erc-error-face ((,c :inherit error)))
  709. (erc-fool-face ((,c :foreground ,(gc 'blue-2))))
  710. (erc-highlight-face ((,c :inherit hover-highlight)))
  711. (erc-input-face ((,c :background ,(gc 'cyan-bg+1))))
  712. (erc-keyword-face ((,c :foreground ,(gc 'green+1))))
  713. (erc-nick-default-face ((,c :foreground ,(gc 'blue+1))))
  714. (erc-my-nick-face ((,c :foreground ,(gc 'red))))
  715. (erc-nick-msg-face ((,c :foreground ,(gc 'cyan+2))))
  716. (erc-notice-face ((,c :foreground ,(gc 'green))))
  717. (erc-pal-face ((,c :foreground ,(gc 'magenta+2))))
  718. (erc-prompt-face ((,c :inherit alect-prompt)))
  719. (erc-timestamp-face ((,c :inherit alect-time)))
  720. ;; epa
  721. (epa-mark ((,c :foreground ,(gc 'blue+1))))
  722. (epa-string ((,c :foreground ,(gc 'cyan+2))))
  723. (epa-validity-disabled ((,c :foreground ,(gc 'fg-2))))
  724. (epa-validity-high ((,c :foreground ,(gc 'green-1))))
  725. (epa-validity-medium ((,c :foreground ,(gc 'yellow-1))))
  726. (epa-validity-low ((,c :foreground ,(gc 'red-1))))
  727. ;; ert
  728. (ert-test-result-expected ((,c :foreground ,(gc 'green)
  729. :background ,(gc 'bg-2)
  730. :box (:line-width 1
  731. :style nil))))
  732. (ert-test-result-unexpected ((,c :inherit ert-test-result-expected
  733. :foreground ,(gc 'red))))
  734. ;; eshell
  735. (eshell-prompt ((,c :inherit alect-prompt)))
  736. (eshell-ls-archive ((,c :foreground ,(gc 'green))))
  737. (eshell-ls-backup ((,c :inherit dired-ignored)))
  738. (eshell-ls-clutter ((,c :inherit font-lock-comment-face)))
  739. (eshell-ls-directory ((,c :inherit dired-directory)))
  740. (eshell-ls-executable ((,c :foreground ,(gc 'yellow))))
  741. (eshell-ls-unreadable ((,c :foreground ,(gc 'red-2))))
  742. (eshell-ls-readonly ((,c :foreground ,(gc 'fg-2))))
  743. (eshell-ls-missing ((,c :inherit dired-warning)))
  744. (eshell-ls-product ((,c :inherit font-lock-doc-face)))
  745. (eshell-ls-special ((,c :foreground ,(gc 'fg+1) :weight bold)))
  746. (eshell-ls-symlink ((,c :inherit dired-symlink)))
  747. ;; ffap
  748. (ffap ((,c :foreground ,(gc 'fg+1)
  749. :background ,(gc 'blue-bg))))
  750. ;; flycheck
  751. (flycheck-error-face ((,c :foreground ,(gc 'red-1)
  752. :weight bold
  753. :underline t)))
  754. (flycheck-warning-face ((,c :foreground ,(gc 'fg-2)
  755. :weight bold
  756. :underline t)))
  757. ;; flymake
  758. (flymake-errline ((,c :foreground ,(gc 'red-1)
  759. :weight bold
  760. :underline t)))
  761. (flymake-warnline ((,c :foreground ,(gc 'fg-2)
  762. :weight bold
  763. :underline t)))
  764. ;; flyspell
  765. (flyspell-duplicate ((,c :foreground ,(gc 'gray)
  766. :background ,(gc 'bg)
  767. :weight bold)))
  768. (flyspell-incorrect ((,c :inherit flyspell-duplicate
  769. :foreground ,(gc 'red+1))))
  770. ;; font lock
  771. (font-lock-builtin-face ((,c :foreground ,(gc 'magenta-1))))
  772. (font-lock-comment-face ((,c :foreground ,(gc 'green+1))))
  773. (font-lock-comment-delimiter-face ((,c :inherit font-lock-comment-face)))
  774. (font-lock-constant-face ((,c :foreground ,(gc 'cyan-1))))
  775. (font-lock-doc-face ((,c :foreground ,(gc 'fg-1)
  776. :slant italic)))
  777. (font-lock-function-name-face ((,c :foreground ,(gc 'blue-1))))
  778. (font-lock-keyword-face ((,c :foreground ,(gc 'blue+1)
  779. :weight bold)))
  780. (font-lock-negation-char-face ((,c :foreground ,(gc 'blue))))
  781. (font-lock-preprocessor-face ((,c :foreground ,(gc 'green-1))))
  782. (font-lock-string-face ((,c :foreground ,(gc 'red-2))))
  783. (font-lock-type-face ((,c :foreground ,(gc 'magenta+1))))
  784. (font-lock-variable-name-face ((,c :foreground ,(gc 'yellow+2))))
  785. (font-lock-warning-face ((,c :foreground ,(gc 'red)
  786. :weight bold)))
  787. (font-lock-regexp-grouping-backslash ((,c :foreground ,(gc 'red+2))))
  788. (font-lock-regexp-grouping-construct ((,c :foreground ,(gc 'yellow-1))))
  789. ;; gdb
  790. (breakpoint-enabled ((,c :foreground ,(gc 'red))))
  791. (breakpoint-disabled ((,c :foreground ,(gc 'gray))))
  792. ;; geiser
  793. (geiser-font-lock-doc-title ((,c :inherit bold)))
  794. (geiser-font-lock-doc-link ((,c :inherit link)))
  795. (geiser-font-lock-doc-button ((,c :inherit button)))
  796. (geiser-font-lock-xref-header ((,c :inherit bold)))
  797. (geiser-font-lock-xref-link ((,c :inherit link)))
  798. (geiser-font-lock-error-link ((,c :inherit (error link))))
  799. (geiser-font-lock-autodoc-identifier ((,c :inherit font-lock-function-name-face)))
  800. (geiser-font-lock-autodoc-current-arg ((,c :inherit font-lock-variable-name-face)))
  801. ;; gnus
  802. (gnus-group-news-1-empty ((,c :inherit alect-color-level-1)))
  803. (gnus-group-news-2-empty ((,c :inherit alect-color-level-2)))
  804. (gnus-group-news-3-empty ((,c :inherit alect-color-level-3)))
  805. (gnus-group-news-4-empty ((,c :inherit alect-color-level-4)))
  806. (gnus-group-news-5-empty ((,c :inherit alect-color-level-5)))
  807. (gnus-group-news-6-empty ((,c :inherit alect-color-level-6)))
  808. (gnus-group-news-low-empty ((,c :inherit alect-color-level-7)))
  809. (gnus-group-news-1 ((,c :inherit gnus-group-news-1-empty
  810. :weight bold)))
  811. (gnus-group-news-2 ((,c :inherit gnus-group-news-2-empty
  812. :weight bold)))
  813. (gnus-group-news-3 ((,c :inherit gnus-group-news-3-empty
  814. :weight bold)))
  815. (gnus-group-news-4 ((,c :inherit gnus-group-news-4-empty
  816. :weight bold)))
  817. (gnus-group-news-5 ((,c :inherit gnus-group-news-5-empty
  818. :weight bold)))
  819. (gnus-group-news-6 ((,c :inherit gnus-group-news-6-empty
  820. :weight bold)))
  821. (gnus-group-news-low ((,c :inherit gnus-group-news-low-empty
  822. :weight bold)))
  823. (gnus-group-mail-1-empty ((,c :inherit gnus-group-news-1-empty
  824. :slant italic)))
  825. (gnus-group-mail-2-empty ((,c :inherit gnus-group-news-2-empty
  826. :slant italic)))
  827. (gnus-group-mail-3-empty ((,c :inherit gnus-group-news-3-empty
  828. :slant italic)))
  829. (gnus-group-mail-low-empty ((,c :inherit gnus-group-news-low-empty
  830. :slant italic)))
  831. (gnus-group-mail-1 ((,c :inherit gnus-group-news-1
  832. :slant italic)))
  833. (gnus-group-mail-2 ((,c :inherit gnus-group-news-2
  834. :slant italic)))
  835. (gnus-group-mail-3 ((,c :inherit gnus-group-news-3
  836. :slant italic)))
  837. (gnus-group-mail-low ((,c :inherit gnus-group-news-low
  838. :slant italic)))
  839. (gnus-header-content ((,c :inherit message-header-other)))
  840. (gnus-header-from ((,c :foreground ,(gc 'red-1))))
  841. (gnus-header-name ((,c :inherit message-header-name)))
  842. (gnus-header-newsgroups ((,c :inherit message-header-newsgroups)))
  843. (gnus-header-subject ((,c :inherit message-header-subject)))
  844. (gnus-summary-cancelled ((,c :background ,(gc 'fg-1)
  845. :foreground ,(gc 'bg-2))))
  846. (gnus-summary-low-ancient ((,c :foreground ,(gc 'blue-2))))
  847. (gnus-summary-low-read ((,c :foreground ,(gc 'green-2))))
  848. (gnus-summary-low-ticked ((,c :foreground ,(gc 'red-2))))
  849. (gnus-summary-low-unread ((,c :foreground ,(gc 'fg-1))))
  850. (gnus-summary-normal-ancient ((,c :foreground ,(gc 'blue))))
  851. (gnus-summary-normal-read ((,c :foreground ,(gc 'green))))
  852. (gnus-summary-normal-ticked ((,c :foreground ,(gc 'red))))
  853. (gnus-summary-normal-unread ((,c :foreground ,(gc 'fg+1))))
  854. (gnus-summary-high-ancient ((,c :inherit gnus-summary-normal-ancient
  855. :weight bold)))
  856. (gnus-summary-high-read ((,c :inherit gnus-summary-normal-read
  857. :weight bold)))
  858. (gnus-summary-high-ticked ((,c :inherit gnus-summary-normal-ticked
  859. :weight bold)))
  860. (gnus-summary-high-unread ((,c :inherit gnus-summary-normal-unread
  861. :weight bold)))
  862. (gnus-summary-selected ((,c :inherit alect-selected-item)))
  863. (gnus-cite-1 ((,c :inherit alect-color-level-1)))
  864. (gnus-cite-2 ((,c :inherit alect-color-level-2)))
  865. (gnus-cite-3 ((,c :inherit alect-color-level-3)))
  866. (gnus-cite-4 ((,c :inherit alect-color-level-4)))
  867. (gnus-cite-5 ((,c :inherit alect-color-level-5)))
  868. (gnus-cite-6 ((,c :inherit alect-color-level-6)))
  869. (gnus-cite-7 ((,c :inherit alect-color-level-7)))
  870. (gnus-cite-8 ((,c :inherit alect-color-level-8)))
  871. (gnus-cite-9 ((,c :inherit alect-color-level-9)))
  872. (gnus-cite-10 ((,c :inherit alect-color-level-10)))
  873. (gnus-cite-11 ((,c :inherit alect-color-level-11)))
  874. (gnus-signature ((,c :foreground ,(gc 'cyan+1))))
  875. (gnus-x ((,c :background ,(gc 'fg+1)
  876. :foreground ,(gc 'bg-1))))
  877. (gnus-server-agent ((,c :foreground ,(gc 'magenta+2))))
  878. (gnus-server-closed ((,c :foreground ,(gc 'blue))))
  879. (gnus-server-denied ((,c :inherit font-lock-warning-face)))
  880. (gnus-server-offline ((,c :foreground ,(gc 'yellow-1))))
  881. (gnus-server-opened ((,c :foreground ,(gc 'green))))
  882. ;; google-translate
  883. (google-translate-text-face ((,c :foreground ,(gc 'blue+2))))
  884. (google-translate-translation-face ((,c :foreground ,(gc 'green+1))))
  885. (google-translate-phonetic-face ((,c :foreground ,(gc 'gray))))
  886. (google-translate-suggestion-label-face ((,c :foreground ,(gc 'red))))
  887. (google-translate-suggestion-face ((,c :inherit button)))
  888. (google-translate-listen-button-face ((,c :inherit alect-button)))
  889. ;; guix
  890. (guix-true ((,c :foreground ,(gc 'green-1)
  891. :weight bold)))
  892. (guix-operation-option-key ((,c :inherit alect-key)))
  893. (guix-package-info-name ((,c :inherit alect-title)))
  894. (guix-package-info-version ((,c :foreground ,(gc 'blue-2))))
  895. (guix-package-info-name-button ((,c :foreground ,(gc 'fg)
  896. :weight bold)))
  897. (guix-package-info-synopsis ((,c :inherit variable-pitch)))
  898. (guix-package-info-license ((,c :foreground ,(gc 'red-1))))
  899. (guix-package-info-inputs ((,c :inherit guix-package-info-name-button)))
  900. (guix-package-info-native-inputs ((,c :inherit guix-package-info-name-button
  901. :foreground ,(gc 'fg-1))))
  902. (guix-package-info-propagated-inputs ((,c :inherit guix-package-info-name-button)))
  903. (guix-package-info-future ((,c :foreground ,(gc 'blue-1)
  904. :inherit guix-package-info-installed-outputs)))
  905. (guix-package-info-unknown ((,c :foreground ,(gc 'fg+2)
  906. :background ,(gc 'red-bg)
  907. :inherit guix-package-info-installed-outputs)))
  908. (guix-devel-gexp-symbol ((,c :foreground ,(gc 'yellow+2))))
  909. (guix-derivation-drv-file-name ((,c :inherit guix-derivation-file-name
  910. :foreground ,(gc 'cyan))))
  911. ;; helm
  912. (helm-header-line-left-margin ((,c :inherit alect-prompt)))
  913. (helm-header ((,c :inherit header-line)))
  914. (helm-source-header ((,c :inherit alect-title)))
  915. (helm-separator ((,c :foreground ,(gc 'blue+2))))
  916. (helm-M-x-key ((,c :foreground ,(gc 'yellow))))
  917. (helm-selection ((,c :background ,(gc 'bg))))
  918. (helm-selection-line ((,c :background ,(gc 'bg))))
  919. (helm-visible-mark ((,c :foreground ,(gc 'yellow-1))))
  920. (helm-candidate-number ((,c :background ,(gc 'bg-2)
  921. :foreground ,(gc 'green-2))))
  922. (helm-ff-file ((,c)))
  923. (helm-ff-executable ((,c :foreground ,(gc 'green-1))))
  924. (helm-ff-directory ((,c :inherit dired-directory)))
  925. (helm-ff-symlink ((,c :inherit dired-symlink)))
  926. (helm-ff-invalid-symlink ((,c :inherit dired-warning)))
  927. (helm-ff-prefix ((,c :background ,(gc 'bg)
  928. :foreground ,(gc 'red+1))))
  929. (helm-buffer-directory ((,c :inherit helm-ff-directory)))
  930. (helm-buffer-saved-out ((,c :background ,(gc 'bg-2)
  931. :foreground ,(gc 'red))))
  932. (helm-buffer-not-saved ((,c :foreground ,(gc 'red-2))))
  933. (helm-buffer-process ((,c :foreground ,(gc 'green+1))))
  934. (helm-buffer-size ((,c :foreground ,(gc 'cyan))))
  935. (helm-grep-file ((,c :inherit compilation-info)))
  936. ;; help
  937. (help-argument-name ((,c :inherit font-lock-variable-name-face)))
  938. ;; hl-line-mode
  939. (hl-line ((,c :background ,(gc 'bg))))
  940. ;; hl-todo
  941. (hl-todo ((,c :foreground ,(gc 'red) :weight bold)))
  942. ;; hydra
  943. (hydra-face-amaranth ((,c :foreground ,(gc 'yellow) :weight bold)))
  944. (hydra-face-red ((,c :foreground ,(gc 'red-1) :weight bold)))
  945. (hydra-face-pink ((,c :foreground ,(gc 'magenta-2) :weight bold)))
  946. (hydra-face-blue ((,c :foreground ,(gc 'blue-1) :weight bold)))
  947. (hydra-face-teal ((,c :foreground ,(gc 'cyan+1) :weight bold)))
  948. ;; indent-guide
  949. (indent-guide-face ((,c :foreground ,(gc 'yellow+1))))
  950. ;; info
  951. (info-title-1 ((,c :inherit alect-color-level-1
  952. :height 1.5 :weight bold)))
  953. (info-title-2 ((,c :inherit alect-color-level-2
  954. :height 1.4 :weight bold)))
  955. (info-title-3 ((,c :inherit alect-color-level-3
  956. :height 1.3 :weight bold)))
  957. (info-title-4 ((,c :inherit alect-color-level-4
  958. :height 1.2 :weight bold)))
  959. (info-menu-header ((,c :inherit alect-color-level-5
  960. :height 1.1 :weight bold)))
  961. (info-node ((,c :foreground ,(gc 'red+1))))
  962. (info-menu-star ((,c :foreground ,(gc 'red))))
  963. (Info-quoted ((,c :foreground ,(gc 'fg+2) :weight bold)))
  964. ;; ido-mode
  965. (ido-first-match ((,c :weight bold)))
  966. (ido-only-match ((,c :inherit ido-first-match
  967. :foreground ,(gc 'blue))))
  968. (ido-subdir ((,c :inherit dired-directory)))
  969. (ido-virtual ((,c :foreground ,(gc 'red-2))))
  970. ;; I have no idea where this face is used.
  971. (ido-indicator ((,c :background ,(gc 'red-bg)
  972. :foreground ,(gc 'fg+1))))
  973. ;; isearch
  974. (isearch-fail ((,c :background ,(gc 'red-bg))))
  975. (isearch ((,c :foreground ,(gc 'fg+1)
  976. :background ,(gc 'blue-bg-1))))
  977. (lazy-highlight ((,c :foreground ,(gc 'fg+1)
  978. :background ,(gc 'bg+2))))
  979. ;; ivy
  980. (ivy-cursor ((,c :background ,(gc 'cursor)
  981. :foreground ,(gc 'bg-2)
  982. :box (:line-width 1
  983. :color ,(gc 'bg-2)
  984. :style nil))))
  985. (ivy-current-match ((,c :foreground ,(gc 'fg+2)
  986. :weight bold)))
  987. (ivy-highlight-face ((,c :inherit font-lock-variable-name-face)))
  988. (ivy-confirm-face ((,c :inherit minibuffer-prompt
  989. :foreground ,(gc 'green))))
  990. (ivy-match-required-face ((,c :inherit minibuffer-prompt
  991. :foreground ,(gc 'red))))
  992. (ivy-virtual ((,c :foreground ,(gc 'red-2))))
  993. (ivy-remote ((,c :foreground ,(gc 'blue+1))))
  994. ;; Ideally `ivy-minibuffer-match-face-2' should have some
  995. ;; background, but by default, ivy mixes colors (in
  996. ;; `ivy--add-face') instead of applying only one face. This
  997. ;; may look really ugly, so just disable all minibuffer match
  998. ;; faces.
  999. (ivy-minibuffer-match-face-1 ((,c nil)))
  1000. (ivy-minibuffer-match-face-2 ((,c nil)))
  1001. (ivy-minibuffer-match-face-3 ((,c :inherit ivy-minibuffer-match-face-2)))
  1002. (ivy-minibuffer-match-face-4 ((,c :inherit ivy-minibuffer-match-face-2)))
  1003. (counsel-key-binding ((,c :inherit alect-key)))
  1004. ;; linum-mode
  1005. (linum ((,c :foreground ,(gc 'fg-2))))
  1006. ;; magit and related git modes
  1007. (magit-dimmed ((,c :inherit shadow)))
  1008. (magit-section-heading ((,c :inherit alect-title)))
  1009. (magit-section-highlight ((,c :background ,(gc 'bg))))
  1010. (magit-section-heading-selection ((,c :foreground ,(gc 'blue-2))))
  1011. (magit-header-line-key ((,c :inherit alect-key)))
  1012. (magit-head ((,c :background ,(gc 'bg-2)
  1013. :foreground ,(gc 'fg+2)
  1014. :box (:line-width 2
  1015. :color ,(gc 'red)))))
  1016. (magit-refname ((,c :box (:line-width 1
  1017. :color ,(gc 'fg+1)))))
  1018. (magit-refname-wip ((,c :inherit magit-refname
  1019. :foreground ,(gc 'red-1))))
  1020. (magit-refname-stash ((,c :inherit magit-refname
  1021. :foreground ,(gc 'magenta-1))))
  1022. (magit-branch-local ((,c :inherit magit-refname
  1023. :foreground ,(gc 'blue))))
  1024. (magit-branch-current ((,c :inherit magit-branch-local
  1025. :box (:line-width 2
  1026. :color ,(gc 'red)))))
  1027. (magit-branch-remote ((,c :inherit magit-refname
  1028. :foreground ,(gc 'green+1))))
  1029. (magit-tag ((,c :foreground ,(gc 'yellow-1)
  1030. :weight bold)))
  1031. (magit-hash ((,c :foreground ,(gc 'yellow+2))))
  1032. (magit-log-date ((,c :inherit alect-time)))
  1033. (magit-log-author ((,c :inherit alect-author)))
  1034. (magit-reflog-checkout ((,c :inherit magit-branch-local)))
  1035. (magit-reflog-remote ((,c :inherit magit-branch-remote)))
  1036. (magit-reflog-commit ((,c :foreground ,(gc 'green-1))))
  1037. (magit-reflog-amend ((,c :foreground ,(gc 'magenta))))
  1038. (magit-reflog-merge ((,c :foreground ,(gc 'blue-2)
  1039. :weight bold)))
  1040. (magit-reflog-reset ((,c :foreground ,(gc 'red)
  1041. :weight bold)))
  1042. (magit-reflog-rebase ((,c :foreground ,(gc 'yellow))))
  1043. (magit-reflog-cherry-pick ((,c :foreground ,(gc 'cyan))))
  1044. (magit-reflog-other ((,c :inherit magit-branch-local
  1045. :foreground ,(gc 'fg+1))))
  1046. (magit-bisect-bad ((,c :foreground ,(gc 'red+1)
  1047. :box (:line-width -1))))
  1048. (magit-bisect-skip ((,c :inherit magit-bisect-bad
  1049. :foreground ,(gc 'yellow+1))))
  1050. (magit-bisect-good ((,c :inherit magit-bisect-bad
  1051. :foreground ,(gc 'green+1))))
  1052. (magit-cherry-unmatched ((,c :foreground ,(gc 'red+2))))
  1053. (magit-cherry-equivalent ((,c :foreground ,(gc 'cyan+2))))
  1054. (magit-process-ok ((,c :inherit magit-section-title
  1055. :foreground ,(gc 'green))))
  1056. (magit-process-ng ((,c :inherit magit-section-title
  1057. :foreground ,(gc 'red))))
  1058. (magit-blame-heading ((,c :background ,(gc 'bg-2))))
  1059. (magit-blame-summary ((,c :inherit magit-blame-heading)))
  1060. (magit-blame-hash ((,c :inherit (magit-hash
  1061. magit-blame-heading))))
  1062. (magit-blame-name ((,c :inherit (magit-log-author
  1063. magit-blame-heading))))
  1064. (magit-blame-date ((,c :inherit (magit-log-date
  1065. magit-blame-heading))))
  1066. (magit-diff-file-heading ((,c :inherit diff-file-header)))
  1067. (magit-diff-file-heading-selection ((,c :inherit (magit-section-heading-selection
  1068. magit-diff-file-heading-highlight))))
  1069. (magit-diff-lines-heading ((,c :foreground ,(gc 'fg+1)
  1070. :background ,(gc 'blue-bg-1))))
  1071. (magit-diff-lines-boundary ((,c :background ,(gc 'blue+1))))
  1072. (magit-diff-conflict-heading ((,c :inherit magit-diff-hunk-heading
  1073. :foreground ,(gc 'red+2))))
  1074. (magit-diff-hunk-heading ((,c :inherit diff-hunk-header)))
  1075. (magit-diff-hunk-heading-highlight ((,c :inherit magit-diff-hunk-heading
  1076. :background ,(gc 'bg-2))))
  1077. (magit-diff-hunk-heading-selection ((,c :inherit (magit-section-heading-selection
  1078. magit-diff-hunk-heading-highlight))))
  1079. (magit-diff-context ((,c :foreground ,(gc 'fg-2))))
  1080. (magit-diff-context-highlight ((,c :inherit magit-section-highlight)))
  1081. (magit-diff-added ((,c :inherit diff-added)))
  1082. (magit-diff-added-highlight ((,c :inherit (magit-diff-added
  1083. magit-diff-context-highlight))))
  1084. (magit-diff-removed ((,c :inherit diff-removed)))
  1085. (magit-diff-removed-highlight ((,c :inherit (magit-diff-removed
  1086. magit-diff-context-highlight))))
  1087. (magit-diffstat-added ((,c :inherit magit-diff-added)))
  1088. (magit-diffstat-removed ((,c :inherit magit-diff-removed)))
  1089. (magit-popup-heading ((,c :inherit alect-title)))
  1090. (magit-popup-key ((,c :inherit alect-key)))
  1091. (magit-popup-argument ((,c :foreground ,(gc 'blue-2)
  1092. :weight bold)))
  1093. (magit-popup-disabled-argument ((,c :foreground ,(gc 'gray))))
  1094. (magit-sequence-pick ((,c :underline (:color ,(gc 'fg-2)))))
  1095. (magit-sequence-part ((,c :inherit magit-sequence-pick
  1096. :foreground ,(gc 'yellow+1))))
  1097. (magit-sequence-head ((,c :inherit magit-sequence-pick
  1098. :foreground ,(gc 'blue-1))))
  1099. (magit-sequence-drop ((,c :inherit magit-sequence-pick
  1100. :foreground ,(gc 'red+1))))
  1101. (magit-sequence-onto ((,c :inherit magit-sequence-pick
  1102. :foreground ,(gc 'magenta+1))))
  1103. (magit-sequence-stop ((,c :inherit magit-sequence-pick
  1104. :foreground ,(gc 'cyan+1))))
  1105. (magit-sequence-done ((,c :inherit magit-sequence-pick
  1106. :foreground ,(gc 'blue+2))))
  1107. (magit-signature-good ((,c :foreground ,(gc 'green-1))))
  1108. (magit-signature-bad ((,c :foreground ,(gc 'red-1))))
  1109. (magit-signature-untrusted ((,c :foreground ,(gc 'cyan-1))))
  1110. (magit-signature-expired ((,c :foreground ,(gc 'yellow))))
  1111. (magit-signature-revoked ((,c :foreground ,(gc 'magenta))))
  1112. (magit-signature-error ((,c :inherit error)))
  1113. (git-rebase-hash ((,c :inherit magit-hash)))
  1114. (git-rebase-comment-heading ((,c :inherit alect-title)))
  1115. (git-commit-summary ((,c :weight bold)))
  1116. (git-commit-comment-branch ((,c :foreground ,(gc 'blue))))
  1117. (git-commit-comment-file ((,c :inherit default)))
  1118. (git-commit-comment-heading ((,c :inherit alect-title)))
  1119. (git-commit-comment-action ((,c :foreground ,(gc 'yellow+1))))
  1120. ;; makefile
  1121. (makefile-shell ((,c :weight bold)))
  1122. (makefile-space ((,c :inherit trailing-whitespace)))
  1123. (makefile-makepp-perl ((,c :background ,(gc 'bg+1))))
  1124. ;; man
  1125. (Man-overstrike ((,c :foreground ,(gc 'cyan+1) :weight bold)))
  1126. ;; markdown mode
  1127. (markdown-header-face ((,c :inherit alect-title-1)))
  1128. (markdown-header-face-1 ((,c :inherit alect-title-1)))
  1129. (markdown-header-face-2 ((,c :inherit alect-title-2)))
  1130. (markdown-header-face-3 ((,c :inherit alect-title-3)))
  1131. (markdown-header-face-4 ((,c :inherit alect-title-4)))
  1132. (markdown-header-face-5 ((,c :inherit alect-title-5)))
  1133. (markdown-header-face-6 ((,c :inherit alect-title-6)))
  1134. (markdown-header-rule-face ((,c :inherit markdown-header-face
  1135. :foreground ,(gc 'fg))))
  1136. (markdown-header-delimiter-face ((,c :inherit markdown-header-face
  1137. :foreground ,(gc 'fg+2))))
  1138. (markdown-footnote-face ((,c :foreground ,(gc 'blue+2))))
  1139. (markdown-inline-code-face ((,c :foreground ,(gc 'fg-2))))
  1140. (markdown-markup-face ((,c :foreground ,(gc 'fg))))
  1141. (markdown-comment-face ((,c :inherit font-lock-comment-face)))
  1142. (markdown-blockquote-face ((,c :inherit font-lock-doc-face)))
  1143. (markdown-bold-face ((,c :inherit bold)))
  1144. (markdown-italic-face ((,c :inherit italic)))
  1145. (markdown-missing-link-face ((,c :inherit font-lock-warning-face)))
  1146. (markdown-link-face ((,c :inherit link)))
  1147. (markdown-link-title-face ((,c :inherit font-lock-string-face)))
  1148. (markdown-url-face ((,c :foreground ,(gc 'green+2))))
  1149. (markdown-code-face ((,c :inherit alect-block)))
  1150. (markdown-language-keyword-face ((,c :inherit alect-block-title)))
  1151. (markdown-line-break-face ((,c :inherit underline)))
  1152. (markdown-list-face ((,c :foreground ,(gc 'fg+2)
  1153. :weight bold)))
  1154. (markdown-metadata-key-face ((,c :foreground ,(gc 'blue-2))))
  1155. (markdown-metadata-value-face ((,c :foreground ,(gc 'red-1))))
  1156. (markdown-pre-face ((,c)))
  1157. (markdown-reference-face ((,c :inherit link)))
  1158. ;; merlin
  1159. (merlin-locked-face ((,c :background ,(gc 'bg-2))))
  1160. (merlin-type-face ((,c :background ,(gc 'bg+1))))
  1161. (merlin-compilation-warning-face ((,c :inherit warning)))
  1162. (merlin-compilation-error-face ((,c :inherit error)))
  1163. ;; message-mode
  1164. (message-cited-text ((,c :inherit font-lock-comment-face)))
  1165. (message-separator ((,c :inherit font-lock-comment-face)))
  1166. (message-header-name ((,c :inherit alect-field-title)))
  1167. (message-header-other ((,c :foreground ,(gc 'fg))))
  1168. (message-header-to ((,c :foreground ,(gc 'blue))))
  1169. (message-header-cc ((,c :foreground ,(gc 'blue-1))))
  1170. (message-header-newsgroups ((,c :foreground ,(gc 'yellow+2))))
  1171. (message-header-subject ((,c :inherit alect-title)))
  1172. (message-header-xheader ((,c :foreground ,(gc 'green-1))))
  1173. (message-mml ((,c :foreground ,(gc 'cyan-2)
  1174. :weight bold)))
  1175. ;; mm (used in mails)
  1176. (mm-uu-extract ((,c :inherit alect-block)))
  1177. ;; mode-line
  1178. (mode-line-buffer-id ((,c :foreground ,(gc 'blue-1)
  1179. :weight bold)))
  1180. (mode-line ((,c :foreground ,(gc 'fg+1)
  1181. :background ,(gc 'bg-2)
  1182. :box (:line-width 2
  1183. :style released-button))))
  1184. (mode-line-inactive ((,c :foreground ,(gc 'fg-2)
  1185. :background ,(gc 'bg-1)
  1186. :box (:line-width 2
  1187. :color ,(gc 'bg-2)
  1188. :style nil))))
  1189. (mode-line-highlight ((,c :inherit highlight
  1190. :box (:line-width 1
  1191. :style released-button))))
  1192. ;; mu4e
  1193. (mu4e-title-face ((,c :inherit alect-title)))
  1194. (mu4e-cited-1-face ((,c :inherit alect-color-level-1)))
  1195. (mu4e-cited-2-face ((,c :inherit alect-color-level-2)))
  1196. (mu4e-cited-3-face ((,c :inherit alect-color-level-3)))
  1197. (mu4e-cited-4-face ((,c :inherit alect-color-level-4)))
  1198. (mu4e-cited-5-face ((,c :inherit alect-color-level-5)))
  1199. (mu4e-cited-6-face ((,c :inherit alect-color-level-6)))
  1200. (mu4e-cited-7-face ((,c :inherit alect-color-level-7)))
  1201. (mu4e-compose-separator-face ((,c :inherit message-separator)))
  1202. (mu4e-contact-face ((,c :inherit message-header-to)))
  1203. (mu4e-draft-face ((,c :foreground ,(gc 'red-2))))
  1204. (mu4e-flagged-face ((,c :foreground ,(gc 'yellow+2))))
  1205. (mu4e-footer-face ((,c :foreground ,(gc 'cyan+1))))
  1206. (mu4e-forwarded-face ((,c :foreground ,(gc 'magenta+2))))
  1207. (mu4e-header-highlight-face ((,c :inherit alect-selected-item)))
  1208. (mu4e-header-key-face ((,c :inherit message-header-name)))
  1209. (mu4e-header-value-face ((,c :inherit message-header-other)))
  1210. (mu4e-special-header-value-face ((,c :foreground ,(gc 'green))))
  1211. (mu4e-header-marks-face ((,c :foreground ,(gc 'red))))
  1212. (mu4e-highlight-face ((,c :inherit alect-key)))
  1213. (mu4e-modeline-face ((,c :foreground ,(gc 'green+1))))
  1214. (mu4e-moved-face ((,c :foreground ,(gc 'blue+2))))
  1215. (mu4e-region-code ((,c :background ,(gc 'bg))))
  1216. (mu4e-replied-face ((,c :foreground ,(gc 'green-1))))
  1217. (mu4e-system-face ((,c :foreground ,(gc 'cyan))))
  1218. (mu4e-trashed-face ((,c :foreground ,(gc 'fg-2))))
  1219. (mu4e-unread-face ((,c :foreground ,(gc 'blue-1))))
  1220. (mu4e-attach-number-face ((,c :foreground ,(gc 'fg)
  1221. :background ,(gc 'bg-2))))
  1222. (mu4e-url-number-face ((,c :inherit mu4e-attach-number-face
  1223. :foreground ,(gc 'yellow+1))))
  1224. ;; nethack-el
  1225. (nethack-dark-gray-face ((,c :foreground ,(gc 'fg-1))))
  1226. (nethack-message-highlight-face ((,c :background ,(gc 'bg)
  1227. :foreground ,(gc 'red+2))))
  1228. (nethack-yellow-face ((,c :foreground ,(gc 'yellow))))
  1229. ;; ocaml
  1230. (ocaml-help-face ((,c :inherit match)))
  1231. (ocaml-link-face ((,c :inherit link)))
  1232. ;; org-mode
  1233. (org-agenda-date ((,c :inherit alect-time)))
  1234. (org-agenda-date-today ((,c :inherit alect-selected-item
  1235. :foreground ,(gc 'cyan-2))))
  1236. (org-agenda-structure ((,c :inherit alect-title)))
  1237. (org-archived ((,c :foreground ,(gc 'fg+1) :weight bold)))
  1238. (org-block ((,c :inherit alect-block)))
  1239. (org-quote ((,c :inherit org-block
  1240. :foreground ,(gc 'fg+2))))
  1241. (org-verse ((,c :inherit org-block
  1242. :foreground ,(gc 'fg))))
  1243. (org-meta-line ((,c :inherit alect-block-title)))
  1244. (org-block-begin-line ((,c :inherit org-meta-line
  1245. :overline t)))
  1246. (org-block-end-line ((,c :inherit org-meta-line
  1247. :underline t)))
  1248. (org-checkbox ((,c :background ,(gc 'bg-2)
  1249. :foreground ,(gc 'fg)
  1250. :box (:line-width 1
  1251. :style pressed-button))))
  1252. (org-date ((,c :inherit alect-time)))
  1253. (org-date-selected ((,c :inherit alect-selected-item)))
  1254. (org-deadline-announce ((,c :foreground ,(gc 'red-1))))
  1255. (org-done ((,c :foreground ,(gc 'cyan-1)
  1256. :weight bold)))
  1257. (org-document-title ((,c :inherit alect-title)))
  1258. (org-document-info ((,c :foreground ,(gc 'red-1))))
  1259. (org-document-info-keyword ((,c :foreground ,(gc 'yellow+1))))
  1260. (org-ellipsis ((,c :foreground ,(gc 'fg-2))))
  1261. (org-footnote ((,c :foreground ,(gc 'cyan)
  1262. :underline t)))
  1263. (org-formula ((,c :foreground ,(gc 'yellow-2))))
  1264. (org-headline-done ((,c :foreground ,(gc 'cyan-1))))
  1265. (org-hide ((,c :foreground ,(gc 'bg-2))))
  1266. (org-level-1 ((,c :inherit alect-title-1)))
  1267. (org-level-2 ((,c :inherit alect-title-2)))
  1268. (org-level-3 ((,c :inherit alect-title-3)))
  1269. (org-level-4 ((,c :inherit alect-title-4)))
  1270. (org-level-5 ((,c :inherit alect-title-5)))
  1271. (org-level-6 ((,c :inherit alect-title-6)))
  1272. (org-level-7 ((,c :inherit alect-title-7)))
  1273. (org-level-8 ((,c :inherit alect-title-8)))
  1274. (org-link ((,c :inherit link)))
  1275. (org-mode-line-clock ((,c :foreground ,(gc 'green+1))))
  1276. (org-mode-line-clock-overrun ((,c :foreground ,(gc 'red)
  1277. :weight bold)))
  1278. (org-scheduled ((,c :foreground ,(gc 'green-2))))
  1279. (org-scheduled-previously ((,c :foreground ,(gc 'red-2))))
  1280. (org-scheduled-today ((,c :foreground ,(gc 'blue+1))))
  1281. (org-special-keyword ((,c :inherit font-lock-doc-face)))
  1282. (org-drawer ((,c :inherit org-special-keyword
  1283. :weight bold)))
  1284. (org-table ((,c :foreground ,(gc 'fg-1))))
  1285. (org-tag ((,c :slant italic)))
  1286. (org-time-grid ((,c :foreground ,(gc 'fg-2))))
  1287. (org-todo ((,c :foreground ,(gc 'red) :weight bold)))
  1288. (org-upcoming-deadline ((,c :inherit font-lock-keyword-face)))
  1289. (org-verbatim ((,c :foreground ,(gc 'fg-2))))
  1290. (org-code ((,c :foreground ,(gc 'cyan+1))))
  1291. (org-warning ((,c :foreground ,(gc 'red)
  1292. :weight bold :underline nil)))
  1293. (org-column ((,c :background ,(gc 'bg-2))))
  1294. (org-column-title ((,c :background ,(gc 'bg-2)
  1295. :underline t :weight bold)))
  1296. ;; org-transclusion
  1297. (org-transclusion-keyword ((,c :inherit org-meta-line)))
  1298. (org-transclusion ((,c :background ,(gc 'bg+1)
  1299. :extend t)))
  1300. (org-transclusion-edit ((,c :inherit org-transclusion)))
  1301. (org-transclusion-source ((,c :background ,(gc 'green-bg+1)
  1302. :extend t)))
  1303. (org-transclusion-source-edit ((,c :background ,(gc 'yellow-bg+1)
  1304. :extend t)))
  1305. ;; outline
  1306. (outline-1 ((,c :inherit alect-title-1)))
  1307. (outline-2 ((,c :inherit alect-title-2)))
  1308. (outline-3 ((,c :inherit alect-title-3)))
  1309. (outline-4 ((,c :inherit alect-title-4)))
  1310. (outline-5 ((,c :inherit alect-title-5)))
  1311. (outline-6 ((,c :inherit alect-title-6)))
  1312. (outline-7 ((,c :inherit alect-title-7)))
  1313. (outline-8 ((,c :inherit alect-title-8)))
  1314. ;; package
  1315. (package-help-section-name ((,c :inherit alect-field-title)))
  1316. (package-name ((,c :foreground ,(gc 'blue-1))))
  1317. (package-status-installed ((,c :foreground ,(gc 'green+1))))
  1318. (package-status-dependency ((,c :foreground ,(gc 'green-1))))
  1319. (package-status-built-in ((,c :foreground ,(gc 'blue+2))))
  1320. (package-status-external ((,c :foreground ,(gc 'blue+1))))
  1321. (package-status-incompat ((,c :foreground ,(gc 'magenta-1))))
  1322. (package-status-avail-obso ((,c :foreground ,(gc 'magenta+1))))
  1323. (package-status-disabled ((,c :foreground ,(gc 'red))))
  1324. (package-status-unsigned ((,c :inherit warning)))
  1325. ;; popup
  1326. (popup-tip-face ((,c :foreground ,(gc 'gray+2)
  1327. :background ,(gc 'yellow-2))))
  1328. (popup-scroll-bar-foreground-face ((,c :background ,(gc 'fg-2))))
  1329. (popup-scroll-bar-background-face ((,c :background ,(gc 'bg-2))))
  1330. (popup-isearch-match ((,c :foreground ,(gc 'fg+1)
  1331. :background ,(gc 'bg-1) )))
  1332. ;; powerline
  1333. (powerline-active1 ((,c :inherit mode-line
  1334. :background ,(gc 'cyan-bg))))
  1335. (powerline-active2 ((,c :inherit mode-line)))
  1336. (powerline-inactive1 ((,c :inherit mode-line-inactive
  1337. :background ,(gc 'cyan-bg))))
  1338. (powerline-inactive2 ((,c :inherit mode-line-inactive)))
  1339. ;; rainbow-delimiters
  1340. (rainbow-delimiters-depth-1-face ((,c :foreground ,(gc 'fg+1))))
  1341. (rainbow-delimiters-depth-2-face ((,c :foreground ,(gc 'green+2))))
  1342. (rainbow-delimiters-depth-3-face ((,c :foreground ,(gc 'yellow-2))))
  1343. (rainbow-delimiters-depth-4-face ((,c :foreground ,(gc 'cyan))))
  1344. (rainbow-delimiters-depth-5-face ((,c :foreground ,(gc 'green-1))))
  1345. (rainbow-delimiters-depth-6-face ((,c :foreground ,(gc 'blue+1))))
  1346. (rainbow-delimiters-depth-7-face ((,c :foreground ,(gc 'yellow-1))))
  1347. (rainbow-delimiters-depth-8-face ((,c :foreground ,(gc 'green+1))))
  1348. (rainbow-delimiters-depth-9-face ((,c :foreground ,(gc 'cyan-2))))
  1349. (rainbow-delimiters-depth-10-face ((,c :foreground ,(gc 'fg-2))))
  1350. (rainbow-delimiters-depth-11-face ((,c :foreground ,(gc 'green))))
  1351. (rainbow-delimiters-depth-12-face ((,c :foreground ,(gc 'cyan+2))))
  1352. ;; realgud
  1353. (realgud-overlay-arrow1 ((,c :foreground ,(gc 'green-1))))
  1354. (realgud-overlay-arrow2 ((,c :foreground ,(gc 'yellow+1))))
  1355. (realgud-overlay-arrow3 ((,c :foreground ,(gc 'yellow))))
  1356. (realgud-bp-enabled-face ((,c :foreground ,(gc 'red))))
  1357. (realgud-bp-disabled-face ((,c :foreground ,(gc 'gray))))
  1358. (realgud-bp-line-enabled-face ((,c :box (:color ,(gc 'red) :style nil))))
  1359. (realgud-bp-line-disabled-face ((,c :box (:color ,(gc 'gray) :style nil))))
  1360. (realgud-file-name ((,c :inherit alect-file)))
  1361. (realgud-line-number ((,c :foreground ,(gc 'yellow))))
  1362. (realgud-backtrace-number ((,c :foreground ,(gc 'fg+2)
  1363. :weight bold)))
  1364. ;; rcirc
  1365. (rcirc-my-nick ((,c :foreground ,(gc 'blue))))
  1366. (rcirc-other-nick ((,c :foreground ,(gc 'fg-2))))
  1367. (rcirc-bright-nick ((,c :foreground ,(gc 'blue+1))))
  1368. (rcirc-dim-nick ((,c :foreground ,(gc 'cyan-2))))
  1369. (rcirc-server ((,c :foreground ,(gc 'green))))
  1370. (rcirc-server-prefix ((,c :foreground ,(gc 'green+1))))
  1371. (rcirc-timestamp ((,c :inherit alect-time)))
  1372. (rcirc-nick-in-message ((,c :foreground ,(gc 'yellow))))
  1373. (rcirc-nick-in-message-full-line ((,c :weight bold)))
  1374. (rcirc-prompt ((,c :inherit alect-prompt)))
  1375. (rcirc-track-nick ((,c :inverse-video t)))
  1376. (rcirc-track-keyword ((,c :weight bold)))
  1377. (rcirc-url ((,c :weight bold)))
  1378. (rcirc-keyword ((,c :foreground ,(gc 'yellow)
  1379. :weight bold)))
  1380. ;; rst-mode
  1381. (rst-level-1 ((,c :inherit alect-title-1)))
  1382. (rst-level-2 ((,c :inherit alect-title-2)))
  1383. (rst-level-3 ((,c :inherit alect-title-3)))
  1384. (rst-level-4 ((,c :inherit alect-title-4)))
  1385. (rst-level-5 ((,c :inherit alect-title-5)))
  1386. (rst-level-6 ((,c :inherit alect-title-6)))
  1387. (rst-reference ((,c :inherit link)))
  1388. (rst-adornment ((,c :foreground ,(gc 'fg+2))))
  1389. (rst-literal ((,c :foreground ,(gc 'cyan+1))))
  1390. ;; rubik
  1391. (rubik-yellow ((,c :background ,(gc 'yellow-bg-1))))
  1392. (rubik-white ((,c :background ,(gc 'gray-2))))
  1393. (rubik-red ((,c :background ,(gc 'red-bg-1))))
  1394. (rubik-orange ((,c :background ,(gc 'yellow))))
  1395. (rubik-green ((,c :background ,(gc 'green-bg-1))))
  1396. (rubik-blue ((,c :background ,(gc 'blue-bg-1))))
  1397. ;; ruler-mode
  1398. (ruler-mode-default ((,c :inherit alect-tab-unselected
  1399. :height 1.0)))
  1400. (ruler-mode-pad ((,c :inherit ruler-mode-default)))
  1401. (ruler-mode-column-number ((,c :inherit ruler-mode-default
  1402. :foreground ,(gc 'fg+1))))
  1403. (ruler-mode-current-column ((,c :inherit ruler-mode-default
  1404. :background ,(gc 'cursor)
  1405. :foreground ,(gc 'cursor))))
  1406. (ruler-mode-comment-column ((,c :inherit (font-lock-comment-face
  1407. ruler-mode-default))))
  1408. (ruler-mode-fill-column ((,c :inherit ruler-mode-default
  1409. :foreground ,(gc 'red)
  1410. :weight bold)))
  1411. (ruler-mode-goal-column ((,c :inherit ruler-mode-default
  1412. :foreground ,(gc 'red-1))))
  1413. (ruler-mode-tab-stop ((,c :inherit ruler-mode-default
  1414. :foreground ,(gc 'blue-2))))
  1415. (ruler-mode-fringes ((,c :inherit ruler-mode-default
  1416. :foreground ,(gc 'green))))
  1417. (ruler-mode-margins ((,c :inherit ruler-mode-default
  1418. :foreground ,(gc 'magenta))))
  1419. ;; sauron
  1420. (sauron-timestamp-face ((,c :inherit alect-time)))
  1421. (sauron-message-face ((,c :inherit font-lock-doc-face)))
  1422. (sauron-origin-face ((,c :foreground ,(gc 'blue+1))))
  1423. (sauron-priority-face ((,c :foreground ,(gc 'yellow+2))))
  1424. ;; `sauron-header-face' is useless as the header is already
  1425. ;; fontified by `header-line' face.
  1426. (sauron-header-face ((,c nil)))
  1427. (sauron-highlight1-face ((,c :foreground ,(gc 'green))))
  1428. (sauron-highlight2-face ((,c :foreground ,(gc 'red-1))))
  1429. (sauron-highlight3-face ((,c :foreground ,(gc 'magenta))))
  1430. ;; shell-script
  1431. (sh-heredoc ((,c :inherit font-lock-doc-face)))
  1432. (sh-quoted-exec ((,c :foreground ,(gc 'cyan))))
  1433. (sh-escaped-newline ((,c :foreground ,(gc 'fg-1)
  1434. :weight bold)))
  1435. ;; show-paren
  1436. (show-paren-mismatch ((,c :foreground ,(gc 'gray-2)
  1437. :background ,(gc 'red))))
  1438. (show-paren-match ((,c :foreground ,(gc 'gray-2)
  1439. :background ,(gc 'green+1))))
  1440. ;; SLIME
  1441. (slime-error-face ((,c :inherit error)))
  1442. (slime-repl-input-face ((,c :inherit comint-highlight-input)))
  1443. (slime-repl-output-face ((,c :foreground ,(gc 'green-1))))
  1444. (slime-repl-inputed-output-face ((,c :foreground ,(gc 'red))))
  1445. (slime-repl-output-mouseover-face ((,c :inherit highlight)))
  1446. (slime-repl-prompt-face ((,c :inherit alect-prompt)))
  1447. (slime-repl-result-face ((,c :foreground ,(gc 'blue+2))))
  1448. (sldb-section-face ((,c :inherit alect-title)))
  1449. (sldb-frame-label-face ((,c :foreground ,(gc 'fg-2))))
  1450. (sldb-restart-number-face ((,c :inherit sldb-frame-label-face
  1451. :weight bold)))
  1452. (sldb-detailed-frame-line-face ((,c :weight bold)))
  1453. (sldb-restartable-frame-line-face ((,c :foreground ,(gc 'green+1))))
  1454. (sldb-non-restartable-frame-line-face ((,c :foreground ,(gc 'red+1))))
  1455. ;; speedbar
  1456. (speedbar-file-face ((,c)))
  1457. (speedbar-directory-face ((,c :inherit dired-directory)))
  1458. (speedbar-tag-face ((,c :foreground ,(gc 'yellow+1))))
  1459. (speedbar-selected-face ((,c :foreground ,(gc 'red))))
  1460. (speedbar-separator-face ((,c :inherit alect-title)))
  1461. (speedbar-highlight-face ((,c :inherit highlight)))
  1462. (speedbar-button-face ((,c :foreground ,(gc 'green)
  1463. :box (:line-width 1
  1464. :style released-button))))
  1465. ;; sunrise-commander
  1466. (sr-active-path-face ((,c :inherit dired-header)))
  1467. (sr-passive-path-face ((,c :inherit dired-header
  1468. :foreground ,(gc 'fg-2))))
  1469. (sr-directory-face ((,c :inherit dired-directory)))
  1470. (sr-marked-file-face ((,c :inherit dired-marked)))
  1471. (sr-marked-dir-face ((,c :inherit sr-alt-marked-file-face
  1472. :weight bold)))
  1473. (sr-alt-marked-file-face ((,c :inherit sr-marked-file-face
  1474. :slant italic)))
  1475. (sr-alt-marked-dir-face ((,c :inherit sr-marked-dir-face
  1476. :slant italic)))
  1477. (sr-symlink-face ((,c :inherit dired-symlink)))
  1478. (sr-symlink-directory-face ((,c :inherit sr-symlink-face
  1479. :weight bold)))
  1480. (sr-broken-link-face ((,c :inherit dired-warning)))
  1481. (sr-highlight-path-face ((,c :inherit highlight)))
  1482. (sr-editing-path-face ((,c :foreground ,(gc 'bg-1)
  1483. :background ,(gc 'blue-1))))
  1484. (sr-clex-hotchar-face ((,c :foreground ,(gc 'red))))
  1485. (sr-encrypted-face ((,c :foreground ,(gc 'yellow))))
  1486. (sr-compressed-face ((,c :foreground ,(gc 'magenta-1))))
  1487. (sr-packaged-face ((,c :foreground ,(gc 'magenta+1))))
  1488. (sr-log-face ((,c :foreground ,(gc 'green-1))))
  1489. (sr-xml-face ((,c :foreground ,(gc 'green+2))))
  1490. (sr-html-face ((,c :foreground ,(gc 'cyan+2))))
  1491. (sunshine-forecast-date-face ((,c :inherit alect-time)))
  1492. (sunshine-forecast-day-divider-face ((,c :foreground ,(gc 'fg-1))))
  1493. (sunshine-forecast-headline-face ((,c :inherit alect-title)))
  1494. ;; syslog-mode
  1495. (syslog-error ((,c :inherit error)))
  1496. (syslog-warn ((,c :inherit warning)))
  1497. (syslog-info ((,c :foreground ,(gc 'blue-2))))
  1498. (syslog-debug ((,c :foreground ,(gc 'magenta-1))))
  1499. (syslog-hour ((,c :foreground ,(gc 'blue+1))))
  1500. (syslog-su ((,c :foreground ,(gc 'cyan))))
  1501. (syslog-ip ((,c :foreground ,(gc 'yellow+1) :underline t)))
  1502. ;; tab-bar
  1503. (tab-line ((,c :inherit header-line)))
  1504. (tab-bar ((,c :inherit alect-tab-default)))
  1505. (tab-bar-tab ((,c :inherit alect-tab-selected)))
  1506. (tab-bar-tab-inactive ((,c :inherit alect-tab-unselected)))
  1507. ;; tabbar
  1508. (tabbar-default ((,c :inherit alect-tab-default)))
  1509. (tabbar-separator ((,c :inherit tabbar-default)))
  1510. (tabbar-highlight ((,c :inherit alect-tab-mouse)))
  1511. (tabbar-button ((,c :inherit alect-button)))
  1512. (tabbar-button-highlight ((,c :inherit tabbar-highlight)))
  1513. (tabbar-unselected ((,c :inherit alect-tab-unselected)))
  1514. (tabbar-selected ((,c :inherit alect-tab-selected)))
  1515. (tabbar-modified ((,c :inherit tabbar-unselected
  1516. :foreground ,(gc 'red+2))))
  1517. ;; table
  1518. (table-cell ((,c :background ,(gc 'bg))))
  1519. ;; term
  1520. (term-color-black ((,c :foreground ,(gc 'gray+2)
  1521. :background ,(gc 'gray+2))))
  1522. (term-color-white ((,c :foreground ,(gc 'gray-2)
  1523. :background ,(gc 'gray-2))))
  1524. (term-color-red ((,c :foreground ,(gc 'red+1)
  1525. :background ,(gc 'red))))
  1526. (term-color-green ((,c :foreground ,(gc 'green+1)
  1527. :background ,(gc 'green))))
  1528. (term-color-yellow ((,c :foreground ,(gc 'yellow-1)
  1529. :background ,(gc 'yellow+1))))
  1530. (term-color-blue ((,c :foreground ,(gc 'blue)
  1531. :background ,(gc 'blue-1))))
  1532. (term-color-magenta ((,c :foreground ,(gc 'magenta+1)
  1533. :background ,(gc 'magenta))))
  1534. (term-color-cyan ((,c :foreground ,(gc 'cyan)
  1535. :background ,(gc 'cyan+1))))
  1536. ;; texinfo
  1537. (texinfo-heading ((,c :inherit alect-title)))
  1538. ;; transient
  1539. (transient-heading ((,c :inherit alect-title)))
  1540. (transient-key ((,c :inherit alect-key)))
  1541. (transient-unreachable ((,c :foreground ,(gc 'fg-2))))
  1542. (transient-unreachable-key ((,c :inherit (transient-unreachable
  1543. alect-key))))
  1544. (transient-nonstandard-key ((,c :inherit alect-key
  1545. :foreground ,(gc 'yellow))))
  1546. (transient-mismatched-key ((,c :inherit (error
  1547. alect-key))))
  1548. (transient-separator ((,c :background ,(gc 'gray))))
  1549. (transient-argument ((,c :foreground ,(gc 'blue-2)
  1550. :weight bold)))
  1551. (transient-value ((,c :inherit (italic
  1552. font-lock-string-face))))
  1553. (transient-inactive-argument ((,c :inherit shadow)))
  1554. (transient-inactive-value ((,c :inherit (transient-inactive-argument
  1555. transient-value))))
  1556. (transient-disabled-suffix ((,c :background ,(gc 'red-bg))))
  1557. (transient-enabled-suffix ((,c :background ,(gc 'green-bg))))
  1558. ;; tuareg
  1559. (tuareg-font-lock-governing-face ((,c :foreground ,(gc 'fg+2)
  1560. :weight bold)))
  1561. (tuareg-font-lock-multistage-face ((,c :foreground ,(gc 'blue-2)
  1562. :background ,(gc 'bg))))
  1563. (tuareg-font-lock-line-number-face ((,c :foreground ,(gc 'fg-2))))
  1564. (tuareg-font-lock-operator-face ((,c :foreground ,(gc 'green-1))))
  1565. (tuareg-font-lock-module-face ((,c :foreground ,(gc 'cyan))))
  1566. (tuareg-font-lock-constructor-face ((,c :foreground ,(gc 'yellow))))
  1567. (tuareg-font-lock-error-face ((,c :inherit error
  1568. :underline t)))
  1569. (tuareg-font-lock-interactive-error-face ((,c :inherit font-lock-warning-face)))
  1570. (tuareg-font-lock-interactive-output-face ((,c :foreground ,(gc 'fg))))
  1571. ;; utop
  1572. (utop-prompt ((,c :inherit alect-prompt)))
  1573. (utop-error ((,c :inherit error)))
  1574. (utop-stderr ((,c :foreground ,(gc 'red+1))))
  1575. ;; vc
  1576. (vc-up-to-date-state ((,c :foreground ,(gc 'green-1))))
  1577. (vc-edited-state ((,c :foreground ,(gc 'yellow+1))))
  1578. (vc-missing-state ((,c :foreground ,(gc 'red))))
  1579. (vc-conflict-state ((,c :foreground ,(gc 'red+2)
  1580. :weight bold)))
  1581. (vc-locked-state ((,c :foreground ,(gc 'cyan-1))))
  1582. (vc-locally-added-state ((,c :foreground ,(gc 'blue))))
  1583. (vc-needs-update-state ((,c :foreground ,(gc 'magenta))))
  1584. (vc-removed-state ((,c :foreground ,(gc 'red-1))))
  1585. ;; emacs-w3m
  1586. (w3m-anchor ((,c :inherit link
  1587. :underline nil)))
  1588. (w3m-arrived-anchor ((,c :inherit link-visited
  1589. :underline nil)))
  1590. (w3m-current-anchor ((,c :inherit link
  1591. :weight bold)))
  1592. (w3m-image-anchor ((,c :inherit w3m-anchor
  1593. :box (:line-width -1
  1594. :color ,(gc 'green)
  1595. :style nil))))
  1596. (w3m-form ((,c :foreground ,(gc 'red-1)
  1597. :underline t)))
  1598. (w3m-form-button ((,c :inherit alect-button)))
  1599. (w3m-form-button-pressed ((,c :inherit alect-button-pressed)))
  1600. (w3m-form-button-mouse ((,c :inherit alect-button-mouse)))
  1601. (w3m-tab-background ((,c :inherit alect-tab-default)))
  1602. (w3m-tab-selected ((,c :inherit alect-tab-selected)))
  1603. (w3m-tab-selected-retrieving ((,c :inherit w3m-tab-selected
  1604. :foreground ,(gc 'red+1))))
  1605. (w3m-tab-selected-background ((,c :background ,(gc 'bg))))
  1606. (w3m-tab-unselected ((,c :inherit alect-tab-unselected)))
  1607. (w3m-tab-unselected-retrieving ((,c :inherit w3m-tab-unselected
  1608. :foreground ,(gc 'red+1))))
  1609. (w3m-tab-unselected-unseen ((,c :inherit w3m-tab-unselected
  1610. :foreground ,(gc 'fg))))
  1611. (w3m-tab-mouse ((,c :inherit alect-tab-mouse)))
  1612. (w3m-header-line-background ((,c :background ,(gc 'bg))))
  1613. (w3m-header-line-title ((,c :inherit (alect-title
  1614. header-line))))
  1615. (w3m-header-line-content ((,c :foreground ,(gc 'blue-1)
  1616. :inherit header-line)))
  1617. (w3m-history-current-url ((,c :inherit alect-selected-item)))
  1618. ;; which-func-mode
  1619. (which-func ((,c :inherit font-lock-function-name-face)))
  1620. ;; which-key
  1621. (which-key-key-face ((,c :inherit alect-key)))
  1622. (which-key-separator-face ((,c :foreground ,(gc 'fg-1))))
  1623. (which-key-note-face ((,c :inherit font-lock-comment-face)))
  1624. (which-key-command-description-face ((,c nil)))
  1625. (which-key-highlighted-command-face ((,c :foreground ,(gc 'blue))))
  1626. (which-key-group-description-face ((,c :inherit which-key-command-description-face
  1627. :weight bold)))
  1628. (which-key-docstring-face ((,c :inherit font-lock-doc-face)))
  1629. ;; whitespace-mode
  1630. (whitespace-space ((,c :foreground ,(gc 'bg+1))))
  1631. (whitespace-hspace ((,c :background ,(gc 'bg)
  1632. :foreground ,(gc 'yellow))))
  1633. (whitespace-tab ((,c :background ,(gc 'bg+1)
  1634. :foreground ,(gc 'blue-2))))
  1635. (whitespace-newline ((,c :foreground ,(gc 'blue-2))))
  1636. (whitespace-trailing ((,c :inherit trailing-whitespace)))
  1637. (whitespace-line ((,c :background ,(gc 'bg-2))))
  1638. (whitespace-empty ((,c :background ,(gc 'bg+1))))
  1639. (whitespace-indentation ((,c :background ,(gc 'bg+1)
  1640. :foreground ,(gc 'red))))
  1641. (whitespace-space-before-tab ((,c :background ,(gc 'bg+1)
  1642. :foreground ,(gc 'green))))
  1643. (whitespace-space-after-tab ((,c :background ,(gc 'bg+1)
  1644. :foreground ,(gc 'blue))))
  1645. ;; widget
  1646. (widget-field ((,c :background ,(gc 'bg)
  1647. :box (:line-width -1
  1648. :color ,(gc 'fg-2)
  1649. :style nil))))
  1650. (widget-button ((,c :inherit alect-button)))
  1651. (widget-button-pressed ((,c :inherit alect-button-pressed)))
  1652. (widget-documentation ((,c :inherit font-lock-doc-face)))
  1653. (widget-inactive ((,c :inherit shadow)))
  1654. (widget-single-line-field ((,c :foreground ,(gc 'fg)
  1655. :inherit widget-field)))
  1656. ;; winum
  1657. (winum-face ((,c :foreground ,(gc 'magenta)
  1658. :weight bold)))
  1659. ;; woman
  1660. (woman-bold ((,c :inherit Man-overstrike)))
  1661. (woman-italic ((,c :inherit Man-underline))))
  1662. ;; VARIABLES
  1663. `((ansi-color-names-vector
  1664. [,(gc 'bg-1)
  1665. ,(gc 'red)
  1666. ,(gc 'green)
  1667. ,(gc 'yellow)
  1668. ,(gc 'blue)
  1669. ,(gc 'magenta)
  1670. ,(gc 'cyan)
  1671. ,(gc 'fg+1)])
  1672. (emms-mode-line-icon-color ,(gc 'cyan))
  1673. ;; gnus icon at mode line (is taken from gnus source)
  1674. (gnus-mode-line-image-cache
  1675. '(image :type xpm :ascent center :data ,(concat "/* XPM */
  1676. static char *gnus-pointer[] = {
  1677. /* width height num_colors chars_per_pixel */
  1678. \" 18 13 2 1\",
  1679. /* colors */
  1680. \". c " (gc 'cyan) "\",
  1681. \"# c None s None\",
  1682. /* pixels */
  1683. \"##################\",
  1684. \"######..##..######\",
  1685. \"#####........#####\",
  1686. \"#.##.##..##...####\",
  1687. \"#...####.###...##.\",
  1688. \"#..###.######.....\",
  1689. \"#####.########...#\",
  1690. \"###########.######\",
  1691. \"####.###.#..######\",
  1692. \"######..###.######\",
  1693. \"###....####.######\",
  1694. \"###..######.######\",
  1695. \"###########.######\" };"))
  1696. t)
  1697. ;; gnus startup logo
  1698. (gnus-logo-colors '(,(gc 'cyan+1) ,(gc 'gray-1)) t)
  1699. ;; diary events in calendar
  1700. (diary-entry-marker 'font-lock-variable-name-face t)
  1701. ;; fill-column-indicator
  1702. (fci-rule-color ,(gc 'bg-2))
  1703. ;; vc-annotate
  1704. (vc-annotate-color-map
  1705. '(( 20 . ,(gc 'red-1))
  1706. ( 40 . ,(gc 'red))
  1707. ( 60 . ,(gc 'yellow-2))
  1708. ( 80 . ,(gc 'yellow-1))
  1709. (100 . ,(gc 'yellow))
  1710. (120 . ,(gc 'yellow+1))
  1711. (140 . ,(gc 'green-1))
  1712. (160 . ,(gc 'green-2))
  1713. (180 . ,(gc 'green))
  1714. (200 . ,(gc 'green+1))
  1715. (220 . ,(gc 'green+2))
  1716. (240 . ,(gc 'cyan-1))
  1717. (260 . ,(gc 'cyan))
  1718. (280 . ,(gc 'cyan-2))
  1719. (300 . ,(gc 'blue-1))
  1720. (320 . ,(gc 'blue))
  1721. (340 . ,(gc 'blue+1))
  1722. (360 . ,(gc 'magenta))))
  1723. (vc-annotate-very-old-color ,(gc 'magenta))
  1724. (vc-annotate-background ,(gc 'bg-2))
  1725. )))))
  1726. (defun alect-substitute-color (theme-name plist prop)
  1727. "Substitute color name for property PROP in property list PLIST.
  1728. Return plist with substituted color value. Replace a color only
  1729. if PROP contains such color name (symbol from `alect-colors').
  1730. This function is destructive: PLIST may not stay the same.
  1731. See `alect-substitute-colors-in-plist' for details."
  1732. (let ((color-name (plist-get plist prop))
  1733. color-val)
  1734. (and (symbolp color-name)
  1735. (setq color-val (alect-get-color theme-name color-name))
  1736. (setq plist (plist-put plist prop color-val)))
  1737. plist))
  1738. (defun alect-substitute-colors-in-plist (theme-name plist)
  1739. "Substitute color names in property list PLIST with color values.
  1740. PLIST can also be a list containing property list.
  1741. Color values (strings) are defined by color names (symbols) for a
  1742. specified theme THEME-NAME from `alect-colors' variable. Replace
  1743. colors for the `:foreground' and `:background' properties. If
  1744. there is also `:box' property in PLIST, replace its `:color'
  1745. property as well.
  1746. Return plist with substituted colors. This function is
  1747. destructive: PLIST may not stay the same."
  1748. (if (and (consp (car plist))
  1749. (null (cdr plist)))
  1750. (alect-substitute-colors-in-plist theme-name (car plist))
  1751. (setq plist (alect-substitute-color theme-name plist :foreground))
  1752. (setq plist (alect-substitute-color theme-name plist :background))
  1753. (let ((box-plist (plist-get plist :box)))
  1754. (and box-plist
  1755. (setq box-plist (alect-substitute-color theme-name box-plist :color))
  1756. (setq plist (plist-put plist :box box-plist))))
  1757. plist))
  1758. (defun alect-substitute-colors-in-faces (theme-name faces)
  1759. "Substitute color names in a list FACES with color values.
  1760. FACES is a list of face specifications accepted by
  1761. `custom-theme-set-faces'.
  1762. Return a list of faces with substituted colors. This function is
  1763. destructive: FACES may not stay the same.
  1764. See `alect-substitute-colors-in-plist' for details."
  1765. (mapcar (lambda (face)
  1766. (list (car face)
  1767. (mapcar (lambda (spec)
  1768. (cons (car spec)
  1769. (alect-substitute-colors-in-plist
  1770. theme-name (cdr spec))))
  1771. (cadr face))))
  1772. faces))
  1773. (defun alect-override-faces (original overriding)
  1774. "Override faces from ORIGINAL list with faces from OVERRIDING list.
  1775. Both ORIGINAL and OVERRIDING are lists of face specifications
  1776. accepted by `custom-theme-set-faces'.
  1777. Replace face specifications from ORIGINAL list with the ones from
  1778. OVERRIDING list, add new faces from OVERRIDING list, and return the
  1779. resulting list.
  1780. This function is destructive: ORIGINAL list may not stay the same."
  1781. (mapc (lambda (face)
  1782. (let ((orig-face (assoc (car face) original)))
  1783. (and orig-face
  1784. (setq original (delete orig-face original)))
  1785. (add-to-list 'original face)))
  1786. overriding)
  1787. original)
  1788. (defcustom alect-ignored-faces nil
  1789. "List of faces that will not be themed.
  1790. If nil, an alect theme will change all faces it can.
  1791. See Info node `(elisp) Custom Themes' for information about how a
  1792. theme customizes faces and variables."
  1793. :type '(choice
  1794. (const :tag "Theme (change) all intended faces" nil)
  1795. (repeat :tag "Choose ignored faces" face))
  1796. :group 'alect)
  1797. (defcustom alect-ignored-variables nil
  1798. "List of variables that will not be themed.
  1799. If nil, an alect theme will change some variables.
  1800. If t, none of the variables will be modified, only faces are
  1801. themed.
  1802. See Info node `(elisp) Custom Themes' for information about how a
  1803. theme customizes faces and variables."
  1804. :type `(choice
  1805. (const :tag "Theme (change) all intended variables" nil)
  1806. (const :tag "Ignore all (do not change any variable)" t)
  1807. (repeat :tag "Choose ignored variables"
  1808. (radio
  1809. ,@(mapcar (lambda (var-def)
  1810. (list 'variable-item (car var-def)))
  1811. (cdr (alect-get-customization nil))))))
  1812. :group 'alect)
  1813. (defun alect-delete-objects (original ignored)
  1814. "Delete IGNORED objects from ORIGINAL list.
  1815. Delete all objects from ORIGINAL list whose car is an object from
  1816. IGNORED list and return result.
  1817. If IGNORED is nil, return ORIGINAL. If IGNORED is t, return nil.
  1818. This function is destructive to ORIGINAL."
  1819. (cond
  1820. ((null ignored) original)
  1821. ((eq t ignored) nil)
  1822. (t (cl-delete-if (lambda (elt) (memq (car elt) ignored))
  1823. original))))
  1824. (defmacro alect-create-theme (theme &optional invert)
  1825. "Define and provide a color theme THEME.
  1826. For INVERT, see `alect-get-color'."
  1827. (let* ((theme-name (intern (concat "alect-"
  1828. (symbol-name theme)
  1829. (and invert "-alt"))))
  1830. (theme-vals (alect-get-customization theme invert))
  1831. (theme-faces (alect-override-faces
  1832. (alect-delete-objects
  1833. (car theme-vals) alect-ignored-faces)
  1834. (alect-substitute-colors-in-faces
  1835. theme (copy-tree alect-overriding-faces))))
  1836. (theme-vars (alect-delete-objects
  1837. (cdr theme-vals) alect-ignored-variables)))
  1838. `(progn
  1839. (deftheme ,theme-name ,(format "The %s color theme."
  1840. (concat (and invert "alternative ")
  1841. (symbol-name theme))))
  1842. (apply 'custom-theme-set-variables ',theme-name ',theme-vars)
  1843. (apply 'custom-theme-set-faces ',theme-name ',theme-faces)
  1844. (provide-theme ',theme-name))))
  1845. ;;;###autoload
  1846. (and load-file-name
  1847. (boundp 'custom-theme-load-path)
  1848. (add-to-list 'custom-theme-load-path
  1849. (file-name-as-directory
  1850. (file-name-directory load-file-name))))
  1851. (provide 'alect-themes)
  1852. ;;; alect-themes.el ends here