From 98a178cfef6d84ce5cdb069ce291284a83def48a Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Thu, 27 Jun 2024 21:28:53 -0700 Subject: Better Theming --- elchemy-personal.el | 8 ++------ elchemy-user.el | 4 +++- elchemy-util.el | 11 +++++++---- elchemy.el | 20 +++++++++++++++----- 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/elchemy-personal.el b/elchemy-personal.el index 3b453e7..7744570 100644 --- a/elchemy-personal.el +++ b/elchemy-personal.el @@ -41,14 +41,10 @@ (elchemy/create-dashboard)) ;; Face Color Customizations -(unless elchemy/user/dark-theme +(unless (or elchemy/user/dark-theme elchemy/user/light-theme) (add-hook 'minibuffer-setup-hook (lambda () (make-local-variable 'face-remapping-alist) - (add-to-list 'face-remapping-alist '(default (:background "#DECEAF"))))) - (custom-set-faces - '(mode-line ((t (:box (:line-width (1 . 1) :color "grey75" :style flat-button))))) - '(mode-line-inactive ((t (:foreground "gray20")))) - '(org-document-info-keyword ((t (:foreground "gray100" :height 0.1)))))) + (add-to-list 'face-remapping-alist '(default (:background "#DECEAF")))))) (provide 'elchemy-personal) diff --git a/elchemy-user.el b/elchemy-user.el index 4ad9fd1..669d7ca 100644 --- a/elchemy-user.el +++ b/elchemy-user.el @@ -22,7 +22,9 @@ (setq completion-at-point-functions '(elisp-completion-at-point comint-dynamic-complete-filename t)) ;; User Options -(setq elchemy/user/dark-theme nil +(setq elchemy/user/dark-theme t + elchemy/user/light-theme nil + elchemy/user/transparency 100 elchemy/user/font-height 120 elchemy/user/font-name "Andale Mono" elchemy/user/use-meow nil diff --git a/elchemy-util.el b/elchemy-util.el index ac06e59..caaff70 100644 --- a/elchemy-util.el +++ b/elchemy-util.el @@ -33,27 +33,30 @@ (defun elchemy/my-frame-config (&optional frame) (with-selected-frame (or frame (selected-frame)) - (set-frame-parameter (selected-frame) 'alpha '(95 . 90)) + (set-frame-parameter (selected-frame) 'alpha `(,elchemy/user/transparency . 90)) (cond ((find-font (font-spec :name elchemy/user/font-name)) (set-frame-font elchemy/user/font-name))) (set-face-attribute 'default nil :height elchemy/user/font-height) (when elchemy/user/dark-theme (load-theme 'base16-gruvbox-dark-pale t)) + (when elchemy/user/light-theme + (load-theme 'base16-catppucin-latte t)) (if (get-buffer "*Dashboard*") (switch-to-buffer "*Dashboard*")))) (defun elchemy/my-silly-frame-config (&optional frame) (with-selected-frame (or frame (selected-frame)) - (set-frame-parameter (selected-frame) 'alpha '(95 . 90)) + (set-frame-parameter (selected-frame) 'alpha `(,elchemy/user/transparency . 90)) (cond ((find-font (font-spec :name "Liga Comic Mono")) (set-frame-font "Liga Comic Mono-14"))) (set-face-attribute 'default nil :height elchemy/user/font-height))) (add-to-list 'default-frame-alist '(fullscreen . maximized)) -(add-to-list 'default-frame-alist '(background-color . "#ECE2D0")) -(add-to-list 'default-frame-alist '(foreground-color . "#7E1E30")) +(unless (or elchemy/user/light-theme elchemy/user/dark-theme) + (add-to-list 'default-frame-alist '(background-color . "#ECE2D0")) + (add-to-list 'default-frame-alist '(foreground-color . "#7E1E30"))) (add-hook 'after-make-frame-functions 'elchemy/my-frame-config) (add-hook 'after-init-hook 'elchemy/my-frame-config) (custom-set-faces `(default ((t (:height ,elchemy/user/font-height))))) diff --git a/elchemy.el b/elchemy.el index c5eb916..18ac73f 100644 --- a/elchemy.el +++ b/elchemy.el @@ -26,12 +26,22 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(cursor ((t (:background "gray30")))) - '(link ((t (:foreground "blue" :underline t)))) - '(minibuffer-prompt ((t (:foreground "#771C9B")))) - '(mode-line ((t (:box (:line-width (1 . 1) :color "grey75" :style flat-button) :height 1.1)))) - '(mode-line-inactive ((t (:foreground "gray20")))) + `(default ((t (:height ,elchemy/user/font-height)))) + '(link ((t (:underline t)))) + '(mode-line ((t (:box (:line-width (1 . 1) :style flat-button) :height 1.1)))) '(org-document-title ((t (:height 2.0 :underline nil)))) '(org-level-1 ((t (:inherit outline-1 :extend nil :weight extra-bold :height 1.4)))) '(org-level-2 ((t (:inherit outline-2 :extend nil :slant italic :weight bold :height 1.2)))) '(org-level-3 ((t (:inherit outline-3 :extend nil :weight semi-bold))))) + +(unless (or elchemy/user/light-theme elchemy/user/dark-theme) + (custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(cursor ((t (:background "gray30")))) + '(link ((t (:foreground "blue")))) + '(minibuffer-prompt ((t (:foreground "#771C9B")))) + '(mode-line ((t (:box (:color "grey75"))))) + '(mode-line-inactive ((t (:foreground "gray20")))))) -- cgit v1.2.1