init-doom-theme.el 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. ;;; init-doom-theme.el --- .Emacs Configuration -*- lexical-binding: t -*-
  2. ;;; Commentary:
  3. ;;
  4. ;;; Code:
  5. (use-package doom-themes
  6. :pin "MELPA"
  7. :ensure t
  8. :bind
  9. ("C-x t d" . dark-theme)
  10. ("C-x t s" . semi-dark-theme)
  11. ("C-x t l" . light-theme)
  12. :init
  13. (defun light-theme ()
  14. "Activate light colortheme"
  15. (interactive)
  16. (load-theme 'doom-one-light)
  17. (delete-selection-mode 1)
  18. )
  19. (defun dark-theme ()
  20. "Activate dark colortheme"
  21. (interactive)
  22. (load-theme 'doom-molokai)
  23. (delete-selection-mode 1)
  24. ;; Invoke customcolors
  25. (darkcolor)
  26. )
  27. (defun semi-dark-theme ()
  28. "Activate semi-dark colortheme"
  29. (interactive)
  30. (load-theme 'doom-molokai)
  31. (delete-selection-mode 1)
  32. ;; Invoke customcolors
  33. (semidarkcolor)
  34. )
  35. ;; Invoke theme
  36. (load-theme 'doom-molokai t) ;; global
  37. :config
  38. (defun darkcolor ()
  39. "Simple dark for theme."
  40. (set-cursor-color "#2979FF")
  41. (set-face-background 'highlight "#2979FF")
  42. (set-background-color "#101418")
  43. ;; Modeline
  44. (set-face-background 'mode-line "#0C0E10")
  45. (set-face-background 'modeline-inactive "#333333")
  46. ;; (set-face-foreground 'mode-line "#FFFFFF")
  47. ;; Fix linum current-line highlight
  48. (defface my-linum-hl
  49. '((t :background "#0C0E10" :foreground "gold"))
  50. "Face for the currently active Line number"
  51. :group 'linum)
  52. )
  53. (defun semidarkcolor ()
  54. "Simple semidarkcolor for theme."
  55. (set-cursor-color "#2979FF")
  56. (set-face-background 'highlight "#2979FF")
  57. (set-background-color "#1C1E1F")
  58. ;; Modeline
  59. (set-face-background 'mode-line "#2D2E2E")
  60. (set-face-background 'mode-line-inactive "#333333")
  61. ;; (set-face-foreground 'mode-line "#FFFFFF")
  62. ;; Fix linum current-line highlight
  63. (defface my-linum-hl
  64. '((t :background "gray20" :foreground "gold"))
  65. "Face for the currently active Line number"
  66. :group 'linum)
  67. )
  68. ;; Invoke color
  69. (semidarkcolor) ;; default
  70. )
  71. (provide 'init-doom-theme)
  72. ;;; init-doom-theme.el ends here