Klimi's new dotfiles with stow.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

513 líneas
26 KiB

hace 4 años
  1. ;;; moe-theme --- A colorful eye-candy theme. Moe, moe, kyun!
  2. ;; This program is not part of GNU Emacs, but it is distributed under GPL v3 :-)
  3. ;;
  4. ;; This file is established for packaging. If you want to install manually,
  5. ;; check README.md
  6. ;;
  7. ;; Author: kuanyui <azazabc123@gmail.com>
  8. ;; Keywords: themes
  9. ;; X-URL: https://github.com/kuanyui/moe-theme.el
  10. ;; URL: https://github.com/kuanyui/moe-theme.el
  11. ;; Version: {{VERSION}}
  12. ;;; Commentary:
  13. ;; You can take a look at screenshots and acquire more information on:
  14. ;;
  15. ;; https://github.com/kuanyui/moe-theme.el
  16. ;;
  17. ;;
  18. ;; = Requirements ==============================================================
  19. ;;
  20. ;; - Emacs 24 (or above)
  21. ;; - 256 colors terminal (or higher)
  22. ;;
  23. ;; = Usage =====================================================================
  24. ;;
  25. ;; Add you to your .emacs:
  26. ;;
  27. ;; (require 'moe-theme)
  28. ;; (moe-dark)
  29. ;; or
  30. ;; (moe-light)
  31. ;;
  32. ;; But if you want to install manually, add this first:
  33. ;;
  34. ;; (add-to-list 'custom-theme-load-path "~/path/to/moe-theme")
  35. ;; (add-to-list 'load-path "~/path/to/moe-theme")
  36. ;;
  37. ;; = Customizations ============================================================
  38. ;;
  39. ;; It's impossible to satisfy everyone with one theme, so `moe-theme` provide
  40. ;; some customizations that you may like.
  41. ;;
  42. ;; ### Resize Titles ########################################################
  43. ;;
  44. ;; You may want to resize the titles in `markdown-mode', `org-mode', or
  45. ;; `rst-mode':
  46. ;;
  47. ;; (setq moe-theme-resize-markdown-title '(2.0 1.7 1.5 1.3 1.0 1.0))
  48. ;; (setq moe-theme-resize-org-title '(2.2 1.8 1.6 1.4 1.2 1.0 1.0 1.0 1.0))
  49. ;; (setq moe-theme-resize-rst-title '(2.0 1.7 1.5 1.3 1.1 1.0))
  50. ;;
  51. ;; Markdown should have 6 items; org has 9 items; rst has 6 items.
  52. ;;
  53. ;; The values should be lists. Larger the values, larger the fonts.
  54. ;; If you don't like this, just leave them nil, and all the titles will be
  55. ;; the same size.
  56. ;;
  57. ;; ### Colorful Mode-line and Powerline #####################################
  58. ;;
  59. ;; Tired of boring blue mode-line? Set default mode-line color like this:
  60. ;;
  61. ;; (setq moe-theme-mode-line-color 'orange)
  62. ;;
  63. ;; Available colors: blue, orange, magenta, yellow, purple, red, cyan, w/b.
  64. ;;
  65. ;; You can use `moe-theme-select-color' to change color interactively.
  66. ;;
  67. ;; Mayby you'll also like `moe-theme-random-color', which gives you a
  68. ;; random mood :D.
  69. ;;
  70. ;; ### Powerline ############################################################
  71. ;;
  72. ;; Now we supports Powerline (https://github.com/milkypostman/powerline),
  73. ;; which makes mode-line looks fabulous! We recommended installing Powerline
  74. ;; and run `powerline-moe-theme'.
  75. ;;
  76. ;; ### Too Yellow Background? ###############################################
  77. ;;
  78. ;; With 256-colors, default yellow background of moe-light may be too yellow
  79. ;; and harsh to eyes on some screens.
  80. ;;
  81. ;; If you encounter this problem, and want to set background color to #ffffff
  82. ;; in terminal, set the value of `moe-light-pure-white-background-in-terminal'
  83. ;; to t:
  84. ;;
  85. ;; (setq moe-light-pure-white-background-in-terminal t)
  86. ;;
  87. ;; ### Highlight Buffer-id on Mode-line? ####################################
  88. ;;
  89. ;; You may be dislike default highlight on mode-line-buffer-id, now it can be
  90. ;; disable:
  91. ;;
  92. ;; (setq moe-theme-highlight-buffer-id nil)
  93. ;;
  94. ;;
  95. ;; = Auto Switching ============================================================
  96. ;;
  97. ;; I prefer a terminal with a black-on-white color scheme. I found that in the
  98. ;; daytime, sunlight is strong and black-on-white is more readable; However,
  99. ;; white-on-black would be less harsh to the eyes at night.
  100. ;; So if you like, you can add the following line to your ~/.emacs to
  101. ;; automatically switch between moe-dark and moe-light according to the system
  102. ;; time:
  103. ;;
  104. ;; (require 'moe-theme-switcher)
  105. ;;
  106. ;; By adding the line above, your Emacs will have a light theme in the day
  107. ;; and a dark one at night. =w=+
  108. ;;
  109. ;;
  110. ;; # Live in Antarctica? #######################################################
  111. ;;
  112. ;; Daytime is longer in summer but shorter in winter; or you live in a high
  113. ;; latitude region which midnight-sun or polar-night may occur such as Finland
  114. ;; or Antarctica?
  115. ;;
  116. ;; There's a variable `moe-theme-switch-by-sunrise-and-sunset` would solve
  117. ;; your problem (default value is `t`)
  118. ;;
  119. ;; If this value is `nil`, `moe-theme-switcher` will switch theme at fixed
  120. ;; time (06:00 and 18:00).
  121. ;;
  122. ;; If this value is `t` and both `calendar-latitude` and `calendar-longitude`
  123. ;; are set properly, the switching will be triggered at the sunrise and sunset
  124. ;; time of the local calendar.
  125. ;;
  126. ;; Take "Keelung, Taiwan" (25N,121E) for example, you can set like this:
  127. ;;
  128. ;; (setq calendar-latitude +25)
  129. ;; (setq calendar-longitude +121)
  130. ;;; Code:
  131. (when load-file-name
  132. (add-to-list 'custom-theme-load-path
  133. (file-name-as-directory (file-name-directory load-file-name))))
  134. (defvar moe-theme-highlight-buffer-id t
  135. "If t, highlight buffer-id on mode-line.
  136. If nil, just bold buffer-id without highlight")
  137. (defvar moe-theme-mode-line-color 'blue
  138. "Default is 'blue.
  139. If nil, no background color.
  140. Available choices: 'blue, 'green, 'magenta, 'red, 'orange, 'yellow, 'purple, 'b/w")
  141. (defvar moe-light-pure-white-background-in-terminal nil
  142. "With 256-colors, default yellow background of moe-light may be 'too yellow'
  143. on some screen.
  144. If you encounter this problem, and want to have a background of #ffffff, set
  145. the value of `moe-light-pure-white-background-in-terminal' to t.")
  146. ;; The variable `moe-theme-resize-title-fonts`
  147. (defvar moe-theme-resize-markdown-title nil
  148. "Resize header/title faces of Markdown-mode or not. (default value is nil)
  149. The value should be a list with 6 items of number, which decide title font sizes
  150. of each level.
  151. (setq moe-theme-resize-markdown-title '(2.0 1.7 1.5 1.3 1.0 1.0))
  152. If the vaule is nil, all the titles will be the same size.")
  153. (defvar moe-theme-resize-org-title nil
  154. "Resize outline/title faces of Org-mode or not. (default value is nil)
  155. The value should be a list with 9 items of number; which decide title font sizes
  156. of each level. The first item is the font size of `org-document-title', from
  157. second to ninth is outlines of 1-8.
  158. For example, you can set like this:
  159. (setq moe-theme-resize-org-title '(2.2 1.8 1.6 1.4 1.2 1.0 1.0 1.0 1.0))
  160. If the vaule is nil, all the outlines will be the same size.")
  161. (defvar moe-theme-resize-rst-title nil
  162. "Resize title faces of ReStructuredText-mode or not. (default value is nil)
  163. The value should be a list with 6 items of number, which decide title font sizes
  164. of each level.
  165. (setq moe-theme-resize-rst-title '(2.0 1.7 1.5 1.3 1.1 1.0))
  166. If the value is t, the titles will be resized by its level.
  167. If the vaule is nil, all the outlines will be the same size.")
  168. (defvar moe-theme-revert-theme t
  169. "When call (moe-light) or (moe-dark), `load-theme' & `set-background-color'
  170. (they would cause screen flashing) again or not. If doesn't need load-theme,
  171. set this to nil temporarily: (let (moe-theme-revert-theme) ...)
  172. DO NOT CHANGE ITS VALUE.")
  173. (defvar moe-theme-powerline-enable-p nil
  174. "A variable indicate if `powerline-moe-theme' has been run.
  175. If you want to use powerline powered by moe-theme, please run
  176. `powerline-moe-theme', or `moe-theme-select-color' may act
  177. incorrectly.
  178. Don't setq this manually.")
  179. (defun moe-theme-resize-font-size ()
  180. (when (and (listp moe-theme-resize-markdown-title)
  181. (not (null moe-theme-resize-markdown-title))
  182. (>= (length moe-theme-resize-markdown-title) 6))
  183. (let* ((s1 (car moe-theme-resize-markdown-title))
  184. (s2 (cadr moe-theme-resize-markdown-title))
  185. (s3 (nth 2 moe-theme-resize-markdown-title))
  186. (s4 (nth 3 moe-theme-resize-markdown-title))
  187. (s5 (nth 4 moe-theme-resize-markdown-title))
  188. (s6 (nth 5 moe-theme-resize-markdown-title)))
  189. (progn (require 'markdown-mode)
  190. (set-face-attribute 'markdown-header-face-1 nil :height s1)
  191. (set-face-attribute 'markdown-header-face-2 nil :height s2)
  192. (set-face-attribute 'markdown-header-face-3 nil :height s3)
  193. (set-face-attribute 'markdown-header-face-4 nil :height s4)
  194. (set-face-attribute 'markdown-header-face-5 nil :height s5)
  195. (set-face-attribute 'markdown-header-face-6 nil :height s6))))
  196. (when (and (listp moe-theme-resize-org-title)
  197. (not (null moe-theme-resize-org-title))
  198. (>= (length moe-theme-resize-org-title) 9))
  199. (let* ((s1 (car moe-theme-resize-org-title))
  200. (s2 (cadr moe-theme-resize-org-title))
  201. (s3 (nth 2 moe-theme-resize-org-title))
  202. (s4 (nth 3 moe-theme-resize-org-title))
  203. (s5 (nth 4 moe-theme-resize-org-title))
  204. (s6 (nth 5 moe-theme-resize-org-title))
  205. (s7 (nth 6 moe-theme-resize-org-title))
  206. (s8 (nth 7 moe-theme-resize-org-title))
  207. (s9 (nth 8 moe-theme-resize-org-title)))
  208. (progn (require 'org)
  209. (set-face-attribute 'org-document-title nil :height s1)
  210. (set-face-attribute 'org-level-1 nil :height s2)
  211. (set-face-attribute 'org-level-2 nil :height s3)
  212. (set-face-attribute 'org-level-3 nil :height s4)
  213. (set-face-attribute 'org-level-4 nil :height s5)
  214. (set-face-attribute 'org-level-5 nil :height s6)
  215. (set-face-attribute 'org-level-6 nil :height s7)
  216. (set-face-attribute 'org-level-7 nil :height s8)
  217. (set-face-attribute 'org-level-8 nil :height s9))))
  218. (when (and (listp moe-theme-resize-rst-title)
  219. (not (null moe-theme-resize-rst-title))
  220. (>= (length moe-theme-resize-rst-title) 6))
  221. (let* ((s1 (car moe-theme-resize-rst-title))
  222. (s2 (cadr moe-theme-resize-rst-title))
  223. (s3 (nth 2 moe-theme-resize-rst-title))
  224. (s4 (nth 3 moe-theme-resize-rst-title))
  225. (s5 (nth 4 moe-theme-resize-rst-title))
  226. (s6 (nth 5 moe-theme-resize-rst-title)))
  227. (require 'rst)
  228. (if (facep 'rst-level-1-face)
  229. (progn
  230. (set-face-attribute 'rst-level-1-face nil :height s1)
  231. (set-face-attribute 'rst-level-2-face nil :height s2)
  232. (set-face-attribute 'rst-level-3-face nil :height s3)
  233. (set-face-attribute 'rst-level-4-face nil :height s4)
  234. (set-face-attribute 'rst-level-5-face nil :height s5)
  235. (set-face-attribute 'rst-level-6-face nil :height s6))
  236. (progn
  237. (set-face-attribute 'rst-level-1 nil :height s1)
  238. (set-face-attribute 'rst-level-2 nil :height s2)
  239. (set-face-attribute 'rst-level-3 nil :height s3)
  240. (set-face-attribute 'rst-level-4 nil :height s4)
  241. (set-face-attribute 'rst-level-5 nil :height s5)
  242. (set-face-attribute 'rst-level-6 nil :height s6))
  243. )))
  244. )
  245. (defun moe-light ()
  246. "Load moe-light-theme with your customizations."
  247. (interactive)
  248. (if (not (null moe-theme-revert-theme)) ;Avoid unnecessary flashing screen when using random-color
  249. (progn (load-theme 'moe-light t)
  250. (moe-theme-resize-font-size)
  251. (if (and (not (null moe-light-pure-white-background-in-terminal))
  252. (null (window-system)))
  253. (set-face-attribute 'default nil :background "#ffffff" :foreground "#5f5f5f"))))
  254. (cond ((eq moe-theme-mode-line-color 'blue)
  255. (set-face-attribute 'mode-line nil :background "#afd7ff" :foreground "#005f87")
  256. (set-face-attribute 'mode-line-buffer-id nil :background "#afd7ff" :foreground "#080808")
  257. (set-face-attribute 'minibuffer-prompt nil :foreground "#5fafd7" :background "#3a3a3a"))
  258. ((eq moe-theme-mode-line-color 'green)
  259. (set-face-attribute 'mode-line nil :background "#afdf77" :foreground "#005f00")
  260. (set-face-attribute 'mode-line-buffer-id nil :background "#a1db00" :foreground "#3a3a3a")
  261. (set-face-attribute 'minibuffer-prompt nil :foreground "#a1db00" :background "#3a3a3a"))
  262. ((eq moe-theme-mode-line-color 'orange)
  263. (set-face-attribute 'mode-line nil :background "#ffd787" :foreground "#d75f00")
  264. (set-face-attribute 'mode-line-buffer-id nil :background "#ffd787" :foreground "#1c1c1c")
  265. (set-face-attribute 'minibuffer-prompt nil :foreground "#ff8700" :background "#1c1c1c"))
  266. ((eq moe-theme-mode-line-color 'magenta)
  267. (set-face-attribute 'mode-line nil :background "#ffafd7" :foreground "#cc1f8b")
  268. (set-face-attribute 'mode-line-buffer-id nil :background "#ffafd7" :foreground "#3a3a3a")
  269. (set-face-attribute 'minibuffer-prompt nil :foreground "#ff4ea3" :background "#3a3a3a"))
  270. ((eq moe-theme-mode-line-color 'yellow)
  271. (set-face-attribute 'mode-line nil :background "#fce94f" :foreground "#875f00")
  272. (set-face-attribute 'mode-line-buffer-id nil :background "#fce94f" :foreground "#3a3a3a")
  273. (set-face-attribute 'minibuffer-prompt nil :foreground "#fce94f" :background "#3a3a3a"))
  274. ((eq moe-theme-mode-line-color 'purple)
  275. (set-face-attribute 'mode-line nil :background "#e6a8df" :foreground "#6c0099")
  276. (set-face-attribute 'mode-line-buffer-id nil :background "#e6a8df" :foreground "#080808")
  277. (set-face-attribute 'minibuffer-prompt nil :foreground "#af5fd7" :background "#080808"))
  278. ((eq moe-theme-mode-line-color 'red)
  279. (set-face-attribute 'mode-line nil :background "#ffafaf" :foreground "#d40000")
  280. (set-face-attribute 'mode-line-buffer-id nil :background "#ffafaf" :foreground "#080808")
  281. (set-face-attribute 'minibuffer-prompt nil :foreground "#ff4b4b" :background "#080808"))
  282. ((eq moe-theme-mode-line-color 'cyan)
  283. (set-face-attribute 'mode-line nil :background "#87d7af" :foreground "#005f5f")
  284. (set-face-attribute 'mode-line-buffer-id nil :background "#87d7af" :foreground "#080808")
  285. (set-face-attribute 'minibuffer-prompt nil :foreground "#5faf87" :background "#3a3a3a"))
  286. ((eq moe-theme-mode-line-color 'w/b)
  287. (set-face-attribute 'mode-line nil :background "#9b9b9b" :foreground "#ffffff")
  288. (set-face-attribute 'mode-line-buffer-id nil :background "#9b9b9b" :foreground "#080808")
  289. (set-face-attribute 'minibuffer-prompt nil :foreground "#8a8a8a" :background "#080808")))
  290. (if (null moe-theme-highlight-buffer-id)
  291. (set-face-attribute 'mode-line-buffer-id nil :background nil))
  292. (if (eq moe-theme-powerline-enable-p t)
  293. (powerline-moe-theme)))
  294. (defun moe-dark ()
  295. "Load moe-light-theme with your customizations."
  296. (interactive)
  297. (if (not (null moe-theme-revert-theme))
  298. (load-theme 'moe-dark t))
  299. (moe-theme-resize-font-size)
  300. (cond ((eq moe-theme-mode-line-color 'blue)
  301. (set-face-attribute 'mode-line nil :background "#afd7ff" :foreground "#005f87")
  302. (set-face-attribute 'mode-line-buffer-id nil :background "#afd7ff" :foreground "#080808")
  303. (set-face-attribute 'minibuffer-prompt nil :foreground "#005f87" :background "#afd7ff"))
  304. ((eq moe-theme-mode-line-color 'green)
  305. (set-face-attribute 'mode-line nil :background "#afdf77" :foreground "#005f00")
  306. (set-face-attribute 'mode-line-buffer-id nil :background "#afdf77" :foreground "#080808")
  307. (set-face-attribute 'minibuffer-prompt nil :foreground "#005f00" :background "#a1db00"))
  308. ((eq moe-theme-mode-line-color 'orange)
  309. (set-face-attribute 'mode-line nil :background "#ffaf5f" :foreground "#b75f00")
  310. (set-face-attribute 'mode-line-buffer-id nil :background "#ffaf5f" :foreground "#080808")
  311. (set-face-attribute 'minibuffer-prompt nil :foreground "#080808" :background "#ffaf5f"))
  312. ((eq moe-theme-mode-line-color 'magenta)
  313. (set-face-attribute 'mode-line nil :background "#ffafd7" :foreground "#cc1f8b")
  314. (set-face-attribute 'mode-line-buffer-id nil :background "#ffafd7" :foreground "#080808")
  315. (set-face-attribute 'minibuffer-prompt nil :foreground "#ff1f8b" :background "#ffffff"))
  316. ((eq moe-theme-mode-line-color 'yellow)
  317. (set-face-attribute 'mode-line nil :background "#fce94f" :foreground "#875f00")
  318. (set-face-attribute 'mode-line-buffer-id nil :background "#fce94f" :foreground "#080808")
  319. (set-face-attribute 'minibuffer-prompt nil :foreground "#875f00" :background "#ffff87"))
  320. ((eq moe-theme-mode-line-color 'purple)
  321. (set-face-attribute 'mode-line nil :background "#e6a8df" :foreground "#6c0099")
  322. (set-face-attribute 'mode-line-buffer-id nil :background "#e6a8df" :foreground "#080808")
  323. (set-face-attribute 'minibuffer-prompt nil :foreground "#6c0099" :background "#e6a8df"))
  324. ((eq moe-theme-mode-line-color 'red)
  325. (set-face-attribute 'mode-line nil :background "#ef2929" :foreground "#ffffff")
  326. (set-face-attribute 'mode-line-buffer-id nil :background "#ef2929" :foreground "#080808")
  327. (set-face-attribute 'minibuffer-prompt nil :foreground "#a40000" :background "#ffafaf"))
  328. ((eq moe-theme-mode-line-color 'cyan)
  329. (set-face-attribute 'mode-line nil :background "#87d7af" :foreground "#005f5f")
  330. (set-face-attribute 'mode-line-buffer-id nil :background "#87d7af" :foreground "#080808")
  331. (set-face-attribute 'minibuffer-prompt nil :foreground "#005f5f" :background "#87d7af"))
  332. ((eq moe-theme-mode-line-color 'w/b)
  333. (set-face-attribute 'mode-line nil :background "#ffffff" :foreground "#3a3a3a")
  334. (set-face-attribute 'mode-line-buffer-id nil :background "#9e9e9e" :foreground "#080808")
  335. (set-face-attribute 'minibuffer-prompt nil :foreground "#3e3e3e" :background "#ffffff")))
  336. (if (null moe-theme-highlight-buffer-id)
  337. (set-face-attribute 'mode-line-buffer-id nil :background nil))
  338. (if (eq moe-theme-powerline-enable-p t)
  339. (powerline-moe-theme)))
  340. ;; Powerline
  341. (defun moe-theme-set-color (color)
  342. "Set the COLOR of mode-line you like. You may also like
  343. `moe-theme-random-color' This should be called
  344. programmly (e.g. in init.el), not interactively."
  345. (setq moe-theme-mode-line-color
  346. color)
  347. (let (moe-theme-revert-theme) ;set to nil to change only mode-line's color
  348. (if (eq (frame-parameter nil 'background-mode) 'light)
  349. (moe-light)
  350. (moe-dark)))
  351. (if (eq moe-theme-powerline-enable-p t)
  352. (powerline-moe-theme)))
  353. (defun moe-theme-select-color ()
  354. "Interactively select the color of mode-line you like and set
  355. it. (Notice: we support Powerline :D) You may also like
  356. `moe-theme-random-color'"
  357. (interactive)
  358. (moe-theme-set-color (intern (completing-read
  359. "Select a color: "
  360. '((blue) (green) (orange) (magenta) (yellow) (purple) (red) (cyan) (w/b))
  361. nil t "" nil nil t))))
  362. (defun moe-theme-random-color ()
  363. "Give me a random mode-line color.=w=+
  364. This function can be called both programmly and interactively."
  365. (interactive)
  366. (let* ((n (abs (% (random) 9)))
  367. (current-color moe-theme-mode-line-color)
  368. (color-list '(blue green orange magenta yellow purple red cyan w/b)))
  369. (if (eq (elt color-list n) current-color) ;If gotten color eq current-color, random again.
  370. (moe-theme-random-color)
  371. (moe-theme-set-color (elt color-list n)))))
  372. (when (require 'powerline nil :no-error)
  373. (defadvice powerline-revert (after moe-theme-powerline-revert activate)
  374. "Auto set `moe-theme-powerline-enable-p' to nil after `powerline-revert'
  375. Because when `powerline-moe-theme' has been run, `moe-theme-select-color'
  376. and `moe-theme-random-color' should call `powerline-moe-theme' again for update."
  377. (setq moe-theme-powerline-enable-p nil)
  378. (if (eq (frame-parameter nil 'background-mode) 'light)
  379. (moe-light)
  380. (moe-dark)))
  381. (defun powerline-moe-theme ()
  382. "Powerline theme powered by moe-theme.el
  383. It's recommended use this with `moe-light' or `moe-dark', but it's ok without them,
  384. as long as setq `moe-theme-mode-line-color' first."
  385. (interactive)
  386. (cond ((eq (frame-parameter nil 'background-mode) 'light)
  387. (set-face-attribute 'mode-line-buffer-id nil :background nil :foreground "#1c1c1c")
  388. (set-face-attribute 'mode-line-inactive nil :background "#b2b2b2" :foreground "#ffffff")
  389. (set-face-attribute 'powerline-active2 nil :background "#585858" :foreground "#ffffff")
  390. (set-face-attribute 'powerline-inactive1 nil :background "#c6c6c6" :foreground "#585858")
  391. (set-face-attribute 'powerline-inactive2 nil :background "#e4e4e4" :foreground "#585858")
  392. (cond ((eq moe-theme-mode-line-color 'blue)
  393. (set-face-attribute 'mode-line nil :background "#5fafd7" :foreground "#ffffff")
  394. (set-face-attribute 'powerline-active1 nil :background "#afd7ff" :foreground "#005faf"))
  395. ((eq moe-theme-mode-line-color 'green)
  396. (set-face-attribute 'mode-line nil :background "#a1db00" :foreground "#005f00")
  397. (set-face-attribute 'powerline-active1 nil :background "#d7ff87" :foreground "#008700"))
  398. ((eq moe-theme-mode-line-color 'orange)
  399. (set-face-attribute 'mode-line nil :background "#ff8700" :foreground "#ffffff")
  400. (set-face-attribute 'powerline-active1 nil :background "#ffd787" :foreground "#d75f00"))
  401. ((eq moe-theme-mode-line-color 'magenta)
  402. (set-face-attribute 'mode-line nil :background "#ff4ea3" :foreground "#ffffff")
  403. (set-face-attribute 'powerline-active1 nil :background "#ffafff" :foreground "#ff1f8b"))
  404. ((eq moe-theme-mode-line-color 'yellow)
  405. (set-face-attribute 'mode-line nil :background "#fce94f" :foreground "#875f00")
  406. (set-face-attribute 'powerline-active1 nil :background "#ffff87" :foreground "#875f00"))
  407. ((eq moe-theme-mode-line-color 'purple)
  408. (set-face-attribute 'mode-line nil :background "#af5fd7" :foreground "#ffffff")
  409. (set-face-attribute 'powerline-active1 nil :background "#e6a8df" :foreground "#6c0099"))
  410. ((eq moe-theme-mode-line-color 'red)
  411. (set-face-attribute 'mode-line nil :background "#ff4b4b" :foreground "#ffffff")
  412. (set-face-attribute 'powerline-active1 nil :background "#ffafaf" :foreground "#cc0000"))
  413. ((eq moe-theme-mode-line-color 'cyan)
  414. (set-face-attribute 'mode-line nil :background "#5faf87" :foreground "#ffffff")
  415. (set-face-attribute 'powerline-active1 nil :background "#87d7af" :foreground "#005f5f"))
  416. ((eq moe-theme-mode-line-color 'w/b)
  417. (set-face-attribute 'mode-line nil :background "#1c1c1c" :foreground "#ffffff")
  418. (set-face-attribute 'powerline-active1 nil :background "#bcbcbc" :foreground "#3a3a3a")
  419. (set-face-attribute 'mode-line-buffer-id nil :background nil :foreground "#ffffff"))))
  420. ((eq (frame-parameter nil 'background-mode) 'dark)
  421. (set-face-attribute 'mode-line-buffer-id nil :background nil :foreground "#080808")
  422. (set-face-attribute 'mode-line-inactive nil :background "#4e4e4e" :foreground "#9e9e9e")
  423. (set-face-attribute 'powerline-active2 nil :background "#ffffff" :foreground "#3a3a3a")
  424. (set-face-attribute 'powerline-inactive1 nil :background "#626262" :foreground "#eeeeee")
  425. (set-face-attribute 'powerline-inactive2 nil :background "#767676" :foreground "#e4e4e4")
  426. (cond ((eq moe-theme-mode-line-color 'blue)
  427. (set-face-attribute 'mode-line nil :background "#5fafd7" :foreground "#ffffff")
  428. (set-face-attribute 'powerline-active1 nil :background "#afd7ff" :foreground "#005faf"))
  429. ((eq moe-theme-mode-line-color 'green)
  430. (set-face-attribute 'mode-line nil :background "#a1db00" :foreground "#005f00")
  431. (set-face-attribute 'powerline-active1 nil :background "#d7ff87" :foreground "#008700"))
  432. ((eq moe-theme-mode-line-color 'orange)
  433. (set-face-attribute 'mode-line nil :background "#ff8700" :foreground "#ffffff")
  434. (set-face-attribute 'powerline-active1 nil :background "#ffd787" :foreground "#d75f00"))
  435. ((eq moe-theme-mode-line-color 'magenta)
  436. (set-face-attribute 'mode-line nil :background "#ff4ea3" :foreground "#ffffff")
  437. (set-face-attribute 'powerline-active1 nil :background "#ffafff" :foreground "#ff1f8b"))
  438. ((eq moe-theme-mode-line-color 'yellow)
  439. (set-face-attribute 'mode-line nil :background "#fce94f" :foreground "#875f00")
  440. (set-face-attribute 'powerline-active1 nil :background "#ffff87" :foreground "#875f00"))
  441. ((eq moe-theme-mode-line-color 'purple)
  442. (set-face-attribute 'mode-line nil :background "#af5fd7" :foreground "#ffffff")
  443. (set-face-attribute 'powerline-active1 nil :background "#e6a8df" :foreground "#6c0099"))
  444. ((eq moe-theme-mode-line-color 'red)
  445. (set-face-attribute 'mode-line nil :background "#ff4b4b" :foreground "#ffffff")
  446. (set-face-attribute 'powerline-active1 nil :background "#ffafaf" :foreground "#cc0000"))
  447. ((eq moe-theme-mode-line-color 'cyan)
  448. (set-face-attribute 'mode-line nil :background "#5faf87" :foreground "#ffffff")
  449. (set-face-attribute 'powerline-active1 nil :background "#87d7af" :foreground "#005f5f"))
  450. ((eq moe-theme-mode-line-color 'w/b)
  451. (set-face-attribute 'mode-line nil :background "#ffffff" :foreground "#080808")
  452. (set-face-attribute 'powerline-active1 nil :background "#bcbcbc" :foreground "#3a3a3a")
  453. (set-face-attribute 'mode-line-buffer-id nil :background nil :foreground "#3a3a3a")))))
  454. (powerline-default-theme)
  455. (powerline-reset)
  456. (setq moe-theme-powerline-enable-p t)))
  457. ;;;###autoload
  458. (when (and (boundp 'custom-theme-load-path)
  459. load-file-name)
  460. ;; add theme folder to `custom-theme-load-path' when installing over MELPA
  461. (add-to-list 'custom-theme-load-path
  462. (file-name-as-directory (file-name-directory load-file-name))))
  463. (provide 'moe-theme)
  464. ;; Local Variables:
  465. ;; coding: utf-8
  466. ;; End:
  467. ;;; moe-theme.el ends here