From d74e4459cf561a872c96bd3a21930f2e88d47305 Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Sun, 15 Jun 2025 17:41:53 +0200 Subject: [PATCH] add custom theme --- lisp/my/my-theme.el | 44 ++++++++++++++++++++++++++++++++++++++ settings/theme-settings.el | 7 +++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 lisp/my/my-theme.el diff --git a/lisp/my/my-theme.el b/lisp/my/my-theme.el new file mode 100644 index 00000000..85d8d701 --- /dev/null +++ b/lisp/my/my-theme.el @@ -0,0 +1,44 @@ + +;; load via (load-theme 'my t) + +(require 'spacemacs-theme) + +(deftheme my "A simple custom theme") + +(custom-set-variables + '(custom-safe-themes (quote ("my")))) + +(let ((class '((class color) (min-colors 89))) + (main-bg "#1e1e1e") ;; "#292b2e" + ) + + (custom-theme-set-faces + 'my + `(default ((,class :background ,main-bg))) ;; "#292b2e" + `(region ((,class :background "#302e3d"))) ;; "#444155" selecting text + `(mode-line ((,class :background "#2e2e2e"))) ;; "#222226" + `(fringe ((,class :background ,main-bg))) ;; "#292b2e" + `(org-table ((,class :background "#222a30"))) ;; "#293239" + `(org-block ((,class :background "#232126"))) ;; "#2f2b33" + `(org-block-begin-line ((,class :background "#232126" + ;; :background "#211f21" + ;;:box (:line-width 1 :color "#373040") + ))) ;; "#2d2835" "#373040" + `(org-block-end-line ((,class :background "#232126" + ;; :background "#211f21" + ;;:box (:line-width 1 :color "#373040") + ))) ;; "#373040" + `(org-quote ((,class (:inherit org-block :slant italic)))) + `(org-verse ((,class (:inherit org-block :slant italic)))) + `(window-divider ((,class :foreground "#5d4d7a"))) ;; "#5d4d7a" + `(window-divider-first-pixel ((,class :foreground "#5d4d7a"))) ;; + `(window-divider-last-pixel ((,class :foreground "#5d4d7a"))) ;; +)) + +;;;###autoload +(when load-file-name + (add-to-list 'custom-theme-load-path + (file-name-as-directory (file-name-directory load-file-name)))) + +(provide-theme 'my) +;; (provide 'my-theme) diff --git a/settings/theme-settings.el b/settings/theme-settings.el index ae219272..988d8a6a 100644 --- a/settings/theme-settings.el +++ b/settings/theme-settings.el @@ -13,7 +13,12 @@ (use-package spacemacs-theme :after (cl-lib) ;; spacemacs-common misses to load cl-lib :config - (load-theme 'spacemacs-dark t)) + (setq spacemacs-theme-comment-bg nil) + (load-theme 'spacemacs-dark t) + ) +(use-package my-theme + :config + (load-theme 'my t)) ;; Test char and monospace: ;; 1234567890abcdefghijklmnopqrstuvwxyz [] () :;,. !@#$^&*