Emacs personal configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 line
1.5KB

  1. ;;; package --- themes
  2. ;;; Commentary:
  3. ;;; Code:
  4. (when (< emacs-major-version 24)
  5. (require-package 'color-theme))
  6. ;;(require-package 'color-theme-sanityinc-solarized)
  7. ;;(require-package 'color-theme-sanityinc-tomorrow)
  8. (require-package 'base16-theme)
  9. (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
  10. ;; (load-theme 'tron-legacy t)
  11. ;; (load-theme 'base16-tomorrow t)
  12. ;; (load-theme 'base16-tomorrow-night t)
  13. (load-theme 'base16-harmonic16-light t)
  14. ;; If you don't customize it, this is the theme you get.
  15. ;;(setq-default custom-enabled-themes '(sanityinc-solarized-light))
  16. ;; Ensure that themes will be applied even if they have not been customized
  17. (defun reapply-themes ()
  18. "Forcibly load the themes listed in `custom-enabled-themes'."
  19. (dolist (theme custom-enabled-themes)
  20. (unless (custom-theme-p theme)
  21. (load-theme theme)))
  22. (custom-set-variables `(custom-enabled-themes (quote ,custom-enabled-themes))))
  23. (add-hook 'after-init-hook 'reapply-themes)
  24. ;;------------------------------------------------------------------------------
  25. ;; Toggle between light and dark
  26. ;;------------------------------------------------------------------------------
  27. (defun light ()
  28. "Activate a light color theme."
  29. (interactive)
  30. ;; (color-theme-sanityinc-solarized-light))
  31. (load-theme 'base16-harmonic16-light t))
  32. (defun dark ()
  33. "Activate a dark color theme."
  34. (interactive)
  35. ;; (color-theme-sanityinc-solarized-dark))
  36. (load-theme 'base16-harmonic16-dark t))
  37. (provide 'init-themes)