forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-themes.el
34 lines (26 loc) · 1.1 KB
/
init-themes.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(require-package 'color-theme-sanityinc-solarized)
(require-package 'color-theme-sanityinc-tomorrow)
;; If you don't customize it, this is the theme you get.
(setq-default custom-enabled-themes '(sanityinc-tomorrow-bright))
;; Ensure that themes will be applied even if they have not been customized
(defun reapply-themes ()
"Forcibly load the themes listed in `custom-enabled-themes'."
(dolist (theme custom-enabled-themes)
(unless (custom-theme-p theme)
(load-theme theme)))
(custom-set-variables `(custom-enabled-themes (quote ,custom-enabled-themes))))
(add-hook 'after-init-hook 'reapply-themes)
;;------------------------------------------------------------------------------
;; Toggle between light and dark
;;------------------------------------------------------------------------------
(defun light ()
"Activate a light color theme."
(interactive)
(setq custom-enabled-themes '(sanityinc-tomorrow-day))
(reapply-themes))
(defun dark ()
"Activate a dark color theme."
(interactive)
(setq custom-enabled-themes '(sanityinc-tomorrow-bright))
(reapply-themes))
(provide 'init-themes)