PageRenderTime 62ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/sarcasm-theme.el

https://github.com/Sarcasm/.emacs.d
Emacs Lisp | 252 lines | 144 code | 31 blank | 77 comment | 0 complexity | 64ebb21fd216b218bf91b0973e039daa MD5 | raw file
  1. ;;; sarcasm-theme.el --- Custom face theme for Emacs
  2. ;; Copyright (C) 2010 Guillaume Papin.
  3. ;; This file is free software: you can redistribute it and/or modify
  4. ;; it under the terms of the GNU General Public License as published by
  5. ;; the Free Software Foundation, either version 3 of the License, or
  6. ;; (at your option) any later version.
  7. ;; This file is distributed in the hope that it will be useful,
  8. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ;; GNU General Public License for more details.
  11. ;; You should have received a copy of the GNU General Public License
  12. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  13. ;; usage:
  14. ;; In init file:
  15. ;;
  16. ;; (load-theme 'sarcasm)
  17. ;;
  18. ;; Or after init:
  19. ;; M-x `load-theme' RET `sarcasm' RET
  20. ;;
  21. ;; Or via `customize':
  22. ;; M-x `customize-variable' RET `custom-enabled-themes' RET.
  23. ;; Note:
  24. ;; M-x `list-faces-display' RET
  25. ;;; Code:
  26. (deftheme sarcasm
  27. "Created 2011-04-10.")
  28. (let* ((black "black")
  29. (white "white")
  30. (red "firebrick")
  31. (green "lime green") ;lime green, green1, green2, green3 ?
  32. (blue "DodgerBlue2")
  33. (yellow "yellow2")
  34. (orange "orange")
  35. (pink "deep pink")
  36. (violet "maroon")
  37. (brown "saddle brown")
  38. (grey "gray30")
  39. (cyan "cornflower blue")
  40. ;; (soft-black "grey14")
  41. (soft-black "grey10")
  42. (soft-white "white smoke") ;"MistyRose2"
  43. (soft-blue "#4477aa")
  44. (soft-gold "DarkGoldenrod2")
  45. (dark-grey "grey17")
  46. (dark-red "dark red")
  47. (dark-orange "chocolate")
  48. (bright-grey "grey60")
  49. (background soft-black)
  50. (foreground soft-white))
  51. (custom-theme-set-faces 'sarcasm
  52. `(default ((t (:background ,background :foreground ,foreground))))
  53. `(cursor ((t (:background ,soft-gold))))
  54. `(region ((t (:background ,blue :foreground ,soft-white))))
  55. `(header-line ((t (:background ,dark-red :foreground ,white))))
  56. `(fringe ((t (:background ,background))))
  57. `(minibuffer-prompt ((t (:foreground ,blue :bold t))))
  58. `(isearch ((t (:background ,pink :foreground ,black))))
  59. `(lazy-highlight ((t (:background ,orange :foreground ,background))))
  60. `(link ((t (:foreground ,soft-blue :underline t))))
  61. `(link-visited ((t (:foreground ,blue :underline t))))
  62. `(button ((t (:foreground ,bright-grey :underline t)))) ;backtick links in lisp
  63. `(trailing-whitespace ((t (:background ,dark-grey))))
  64. `(whitespace-line ((t (:background ,dark-red :underline ,dark-red))))
  65. `(show-paren-match ((t (:background ,yellow :foreground ,dark-grey :bold t))))
  66. `(highlight ((t (:background ,dark-grey))))
  67. `(hl-line ((t (:background ,dark-grey))))
  68. `(secondary-selection ((t (:background ,dark-grey))))
  69. ;; Mode line
  70. `(mode-line ((t (:background "#52002c" :foreground ,bright-grey :italic t
  71. :box (:line-width 1 :color ,grey)))))
  72. `(mode-line-inactive ((t (:background ,dark-grey :foreground ,bright-grey :italic nil :box nil))))
  73. `(mode-line-buffer-id ((t (:bold t :foreground ,pink :italic nil))))
  74. `(mode-line-emphasis ((t (:bold t))))
  75. `(mode-line-highlight ((t (:background ,grey :foreground ,white
  76. :box (:line-width 1 :color ,grey)))))
  77. `(shadow ((t (:foreground ,bright-grey))))
  78. ;; TODO: from tango-theme.el
  79. `(escape-glyph ((t (:foreground ,red))))
  80. `(success ((t (:foreground ,green))))
  81. `(warning ((t (:foreground ,orange))))
  82. `(error ((t (:foreground ,red))))
  83. ;; Flyspell
  84. `(flyspell-duplicate ((t (:underline ,orange))))
  85. `(flyspell-incorrect ((t (:underline ,red))))
  86. ;; see:
  87. ;; [[info:elisp#Faces%20for%20Font%20Lock][info: Faces for Font Lock]]
  88. ;; http://www.gnu.org/s/emacs/manual/html_node/elisp/Faces-for-Font-Lock.html
  89. `(font-lock-builtin-face ((t (:foreground ,soft-blue)))) ;includes statements, elisp properties, ..
  90. `(font-lock-comment-delimiter-face ((t (:inherit font-lock-comment-face))))
  91. `(font-lock-comment-face ((t (:foreground ,red :italic t))))
  92. `(font-lock-constant-face ((t (:foreground ,pink :bold t))))
  93. `(font-lock-doc-face ((t (:inherit font-lock-string-face :italic t)))) ;i.e: elisp docstring
  94. `(font-lock-function-name-face ((t (:foreground ,soft-blue :bold t))))
  95. `(font-lock-keyword-face ((t (:foreground ,cyan :bold t))))
  96. ;; Color the 'n' character in an '#ifndef' directive
  97. ;; `font-lock-negation-char-face'
  98. `(font-lock-preprocessor-face ((t (:foreground ,dark-orange :bold t))))
  99. `(font-lock-string-face ((t (:foreground ,violet))))
  100. `(font-lock-type-face ((t (:foreground ,dark-orange :bold t))))
  101. `(font-lock-variable-name-face ((t (:foreground ,pink)))) ;define, variable name, ...
  102. `(font-lock-warning-face ((t (:foreground ,red :bold t)))) ;cwarn-mode, ###autoloads
  103. ;; Flymake
  104. `(flymake-errline ((t (:background ,dark-grey :foreground ,soft-white :underline ,dark-red))))
  105. `(flymake-warnline ((t (:background ,dark-grey :underline ,soft-blue))))
  106. ;; C-x m
  107. `(message-header-name ((t (:foreground ,orange :bold t))))
  108. `(message-header-to ((t (:foreground ,pink :bold t))))
  109. `(message-header-other ((t (:foreground ,blue))))
  110. `(message-separator ((t (:foreground ,red))))
  111. `(message-header-subject ((t (:foreground ,green :bold t))))
  112. ;; TODO: (stolen from misterioso-theme.el)
  113. ;; `(message-header-cc ((,class (:foreground "#e67128"))))
  114. ;; `(message-cited-text ((,class (:foreground "#74af68"))))
  115. ;; ERC
  116. `(erc-prompt-face ((t (:background ,background :foreground ,orange :bold t))))
  117. ;; ace-window
  118. `(aw-leading-char-face ((t (:foreground "DarkGoldenrod2" :height 3.0))))
  119. ;; diff-mode
  120. `(diff-added ((t (:foreground ,green))))
  121. `(diff-changed ((t (:foreground ,orange))))
  122. `(diff-removed ((t (:foreground ,dark-red))))
  123. `(diff-hunk-header ((t (:bold t))))
  124. `(diff-function ((t (:foreground ,soft-blue :bold t))))
  125. `(diff-header ((t (:background ,dark-grey))))
  126. `(diff-file-header ((t (:foreground ,grey))))
  127. `(diff-refine-change ((t (:background ,dark-grey))))
  128. ;; magit
  129. `(magit-section-title ((t (:background ,dark-red :foreground ,white))))
  130. `(magit-diff-add ((t (:foreground ,green))))
  131. `(magit-diff-del ((t (:foreground ,dark-red))))
  132. `(magit-diff-none ((t (:inherit (diff-context)))))
  133. `(magit-branch ((t (:foreground ,pink :bold t))))
  134. `(magit-header ((t (:foreground ,orange :bold t))))
  135. `(magit-diff-del ((t (:inherit diff-removed :background "gray20" :foreground "red3"))))
  136. `(magit-diff-hunk-header ((t (:inherit (magit-header diff-hunk-header)))))
  137. `(magit-diff-file-header ((t (:inherit (magit-header diff-file-header)))))
  138. `(magit-log-sha1 ((t (:foreground ,soft-blue))))
  139. `(magit-log-graph ((t (:foreground ,pink))))
  140. `(magit-item-highlight ((t (:background ,dark-grey))))
  141. `(magit-item-mark ((t (:foreground ,pink))))
  142. `(magit-log-tag-label ((t (:box t))))
  143. `(magit-log-head-label-bisect-good ((t (:background ,green :box t))))
  144. `(magit-log-head-label-bisect-bad ((t (:background ,red :box t))))
  145. `(magit-log-head-label-remote ((t (:background ,soft-gold :box t))))
  146. '(magit-log-head-label-tags ((t (:inherit (magit-log-tag-label)))))
  147. `(magit-log-head-label-local ((t (:foreground ,soft-white :background ,dark-grey
  148. :box t))))
  149. ;; Ediff interactive resolve with magit
  150. ;; http://www.gnu.org/software/emacs/manual/html_node/ediff/Highlighting-Difference-Regions.html
  151. ;; (ediff-current-diff-A ((t (:background "pale green" :foreground "firebrick"))))
  152. ;; (ediff-current-diff-Ancestor ((t (:background "VioletRed" :foreground "Black"))))
  153. ;; (ediff-current-diff-B ((t (:background "Yellow" :foreground "DarkOrchid"))))
  154. ;; (ediff-current-diff-C ((t (:background "Pink" :foreground "Navy"))))
  155. ;; (ediff-even-diff-A ((t (:background "light grey" :foreground "Black"))))
  156. ;; (ediff-even-diff-Ancestor ((t (:background "Grey" :foreground "White"))))
  157. ;; (ediff-even-diff-B ((t (:background "Grey" :foreground "White"))))
  158. ;; (ediff-even-diff-C ((t (:background "light grey" :foreground "Black"))))
  159. ;; (ediff-fine-diff-A ((t (:background "sky blue" :foreground "Navy"))))
  160. ;; (ediff-fine-diff-Ancestor ((t (:background "Green" :foreground "Black"))))
  161. ;; (ediff-fine-diff-B ((t (:background "cyan" :foreground "Black"))))
  162. ;; (ediff-fine-diff-C ((t (:background "Turquoise" :foreground "Black"))))
  163. ;; (ediff-odd-diff-A ((t (:background "Grey" :foreground "White"))))
  164. ;; (ediff-odd-diff-Ancestor ((t (:background "gray40" :foreground "cyan3"))))
  165. ;; (ediff-odd-diff-B ((t (:background "light grey" :foreground "Black"))))
  166. ;; (ediff-odd-diff-C ((t (:background "Grey" :foreground "White"))))
  167. `(ediff-current-diff-C ((t (:background ,dark-grey))))
  168. `(ediff-odd-diff-C ((t (:background ,soft-blue))))
  169. `(ediff-even-diff-C ((t (:background ,dark-orange))))
  170. ;; Org-Mode & Babel
  171. `(org-todo ((t (:bold t :foreground ,red))))
  172. `(org-done ((t (:bold t :foreground ,green))))
  173. `(org-hide ((t (:foreground ,background))))
  174. `(org-document-info ((t (:foreground ,orange))))
  175. `(org-document-title ((t (:foreground ,orange))))
  176. `(org-document-info ((t (:foreground ,cyan))))
  177. `(org-document-info-keyword ((t (:foreground ,dark-orange))))
  178. ;; Company
  179. `(company-echo-common ((t (:underline t))))
  180. `(company-preview ((t (:inherit shadow))))
  181. `(company-preview-common ((t (:inherit company-preview :underline t))))
  182. `(company-scrollbar-bg ((t (:inherit company-tooltip :background "SteelBlue3"))))
  183. `(company-scrollbar-fg ((t (:background "DeepSkyBlue4"))))
  184. `(company-template-field ((t (:background "DeepSkyBlue3" :foreground "black"))))
  185. `(company-tooltip ((t (:background "LightSteelBlue1" :foreground "dark slate gray"))))
  186. `(company-tooltip-annotation ((t (:inherit company-tooltip :foreground "slate gray"))))
  187. `(company-tooltip-annotation-selection ((t (:inherit company-tooltip-annotation :background "LightSteelBlue3"))))
  188. `(company-tooltip-common ((t (:inherit company-tooltip :underline t))))
  189. `(company-tooltip-common-selection ((t (:inherit company-tooltip-selection :underline t))))
  190. `(company-tooltip-mouse ((t (:inherit company-tooltip-selection))))
  191. `(company-tooltip-selection ((t (:inherit company-tooltip :background "LightSteelBlue3"))))
  192. ;; Auto-Complete
  193. `(ac-completion-face ((t (:foreground ,soft-blue :underline ,blue))))
  194. ;; TODO:
  195. '(ac-candidate-face ((t :background "NavajoWhite1" :foreground "tomato4")))
  196. '(ac-selection-face ((t (:background "NavajoWhite3" :foreground "tomato4" :bold t))))
  197. ;; `(ac-gtags-candidate-face ((t (:background ,blue :foreground ,white))))
  198. ;; `(ac-gtags-selection-face ((t (:background ,blue :foreground ,white :bold t))))
  199. ;; `(ac-yasnippet-candidate-face ((t (:background ,dark-red :foreground ,white))))
  200. ;; `(ac-yasnippet-selection-face ((t (:background ,dark-orange :foreground ,white :bold t))))
  201. ;; TODO: Gnus
  202. ;; see: [[file:/usr/share/emacs/24.0.50/etc/themes/tango-theme.el::`(flyspell-duplicate%20((,class%20(:underline%20,orange-1))))][Tango]]
  203. ;; Ansi colors (*Shell*, ...)
  204. (custom-theme-set-variables 'sarcasm
  205. `(ansi-color-names-vector [,black
  206. ,red
  207. ,green
  208. ,yellow
  209. ,blue
  210. ,pink
  211. ,cyan
  212. ,white]))))
  213. ;;;###autoload
  214. (when (and (boundp 'custom-theme-load-path) load-file-name)
  215. (add-to-list 'custom-theme-load-path
  216. (file-name-as-directory (file-name-directory load-file-name))))
  217. (provide-theme 'sarcasm)
  218. ;; Local Variables:
  219. ;; no-byte-compile: t
  220. ;; End:
  221. ;;; sarcasm-theme.el ends here