From b923979f7a8d4133d7f08f3cf394cabd4152e845 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 14 Feb 2020 23:47:27 +0000 Subject: [PATCH] chore(themes): Simplify theme initialization and setup I've been using doom-themes' doom-vibrant for long enough now that I'm certain I won't be moving away from it anytime soon. So let's simplify and strip away all other theme setup stuff. --- core/siren-core-init.el | 3 - core/siren-core-modules.el | 3 + core/siren-core-packages.el | 3 - core/siren-core-theme.el | 16 ---- .../editor}/siren-doom-modeline.el | 0 modules/themes/siren-doom-themes.el | 79 +++++++++++++++++++ themes/siren-theme-atom-one-dark.el | 14 ---- themes/siren-theme-doom-nord-light.el | 61 -------------- themes/siren-theme-doom-nord.el | 61 -------------- themes/siren-theme-doom-one.el | 60 -------------- themes/siren-theme-doom-opera-light.el | 61 -------------- themes/siren-theme-doom-vibrant.el | 60 -------------- themes/siren-theme-spacemacs-dark.el | 14 ---- themes/siren-theme-tomorrow-night-paradise.el | 14 ---- themes/siren-theme-twilight-anti-bright.el | 14 ---- 15 files changed, 82 insertions(+), 381 deletions(-) delete mode 100644 core/siren-core-theme.el rename {themes => modules/editor}/siren-doom-modeline.el (100%) create mode 100644 modules/themes/siren-doom-themes.el delete mode 100644 themes/siren-theme-atom-one-dark.el delete mode 100644 themes/siren-theme-doom-nord-light.el delete mode 100644 themes/siren-theme-doom-nord.el delete mode 100644 themes/siren-theme-doom-one.el delete mode 100644 themes/siren-theme-doom-opera-light.el delete mode 100644 themes/siren-theme-doom-vibrant.el delete mode 100644 themes/siren-theme-spacemacs-dark.el delete mode 100644 themes/siren-theme-tomorrow-night-paradise.el delete mode 100644 themes/siren-theme-twilight-anti-bright.el diff --git a/core/siren-core-init.el b/core/siren-core-init.el index 3016d1d..4d98918 100644 --- a/core/siren-core-init.el +++ b/core/siren-core-init.el @@ -55,8 +55,5 @@ ;; The modules (require 'siren-core-modules) -;; The theme -(require 'siren-core-theme) - (provide 'siren-core-init) ;;; siren-core-init.el ends here diff --git a/core/siren-core-modules.el b/core/siren-core-modules.el index ea87156..5a781fd 100644 --- a/core/siren-core-modules.el +++ b/core/siren-core-modules.el @@ -157,5 +157,8 @@ (require 'siren-xml) (require 'siren-yaml) +;; Theme +(require 'siren-doom-themes) + (provide 'siren-core-modules) ;;; siren-core-modules.el ends here diff --git a/core/siren-core-packages.el b/core/siren-core-packages.el index 8d11fa2..22351be 100644 --- a/core/siren-core-packages.el +++ b/core/siren-core-packages.el @@ -6,9 +6,6 @@ ;;; Code: -;; Work-around bug in Emacs 26.2 preventing GNU ELPA to work over HTTPS. -(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") - ;; Initialize straight.el (setq straight-cache-autoloads t straight-check-for-modifications '(check-on-save find-when-checking) diff --git a/core/siren-core-theme.el b/core/siren-core-theme.el deleted file mode 100644 index 11572c7..0000000 --- a/core/siren-core-theme.el +++ /dev/null @@ -1,16 +0,0 @@ -;;; siren-core-theme.el --- jimeh's Emacs Siren: Theme loading. - -;;; Commentary: - -;; Load the theme! - -;;; Code: - -(setq siren-themes-dir (expand-file-name "themes" siren-dir)) -(siren-recursive-add-to-load-path siren-themes-dir) - -;; Use doom-vibrant theme -(require 'siren-theme-doom-vibrant) - -(provide 'siren-core-theme) -;;; siren-core-theme.el ends here diff --git a/themes/siren-doom-modeline.el b/modules/editor/siren-doom-modeline.el similarity index 100% rename from themes/siren-doom-modeline.el rename to modules/editor/siren-doom-modeline.el diff --git a/modules/themes/siren-doom-themes.el b/modules/themes/siren-doom-themes.el new file mode 100644 index 0000000..fe95047 --- /dev/null +++ b/modules/themes/siren-doom-themes.el @@ -0,0 +1,79 @@ +;;; siren-doom-themes.el --- jimeh's Emacs Siren: doom-themes. + +;;; Commentary: + +;; Setup for doom-themes. + +;;; Code: + +(require 'siren-all-the-icons) +(require 'siren-doom-modeline) + +(use-package doom-themes + :custom + (doom-themes-enable-bold t) ; if nil, bold is universally disabled + (doom-themes-enable-italic t) ; if nil, italics is universally disabled + (doom-themes-treemacs-theme "doom-colors") + (doom-themes-treemacs-enable-variable-pitch nil) + + (doom-nord-light-brighter-comments nil) + (doom-nord-light-brighter-modeline nil) + (doom-nord-light-comment-bg nil) + (doom-nord-light-padded-modeline nil) + + (doom-vibrant-brighter-comments nil) + (doom-vibrant-brighter-modeline nil) + (doom-vibrant-comment-bg nil) + (doom-vibrant-padded-modeline nil) + + (nlinum-highlight-current-line t) + + :config + ;; By default load the doom-vibrant theme. + (siren-doom-vibrant) + + ;; Enable flashing mode-line on errors + (doom-themes-visual-bell-config) + + ;; Configure treemacs styling + (doom-themes-treemacs-config) + + ;; Corrects (and improves) org-mode's native fontification. + (doom-themes-org-config) + + :init + (defun siren-doom-vibrant () + (interactive) + (load-theme 'doom-vibrant t) + (siren-doom-themes-overrides)) + + (defun siren-doom-nord-light () + (interactive) + (load-theme 'doom-nord-light t) + (siren-doom-themes-overrides)) + + (defun siren-doom-themes-overrides () + ;; Override some of doom-vibrant's colors. + (set-face-foreground 'font-lock-variable-name-face (doom-lighten 'blue 0.25)) + (set-face-foreground 'vertical-border (doom-darken 'vertical-bar 0.1)) + (set-face-background 'vertical-border (doom-darken 'vertical-bar 0.1)) + + (when (not (version< emacs-version "27.0")) + (set-face-foreground 'fill-column-indicator (doom-lighten 'base3 0.10))) + + (with-eval-after-load 'diff-hl + (set-face-foreground 'diff-hl-insert (doom-blend 'vc-added 'bg 0.7)) + (set-face-background 'diff-hl-insert (doom-blend 'vc-added 'bg 0.2)) + (set-face-foreground 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.7)) + (set-face-background 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.2)) + (set-face-foreground 'diff-hl-change (doom-blend 'vc-modified 'bg 0.7)) + (set-face-background 'diff-hl-change (doom-blend 'vc-modified 'bg 0.2))) + + (with-eval-after-load 'hideshowvis + (set-face-foreground 'hideshowvis-hidable-face (doom-color 'base7))) + + (with-eval-after-load 'fill-column-indicator + (setq fci-rule-color (doom-lighten (doom-color 'base3) 0.10))))) + +(provide 'siren-doom-themes) +;;; siren-doom-themes.el ends here diff --git a/themes/siren-theme-atom-one-dark.el b/themes/siren-theme-atom-one-dark.el deleted file mode 100644 index 75da764..0000000 --- a/themes/siren-theme-atom-one-dark.el +++ /dev/null @@ -1,14 +0,0 @@ -;;; siren-theme-atom-one-dark.el --- jimeh's Emacs Siren: atom-one-dark-theme. - -;;; Commentary: - -;; Setup for atom-one-dark-theme. - -;;; Code: - -(siren-require-packages '(atom-one-dark-theme)) - -(require 'atom-one-dark-theme) - -(provide 'siren-theme-atom-one-dark) -;;; siren-theme-atom-one-dark.el ends here diff --git a/themes/siren-theme-doom-nord-light.el b/themes/siren-theme-doom-nord-light.el deleted file mode 100644 index c639a95..0000000 --- a/themes/siren-theme-doom-nord-light.el +++ /dev/null @@ -1,61 +0,0 @@ -;;; siren-theme-doom-nord-light.el --- jimeh's Emacs Siren: doom-nord-light theme. - -;;; Commentary: - -;; Setup for doom-nord-light theme. - -;;; Code: - -(require 'siren-all-the-icons) -(require 'siren-doom-modeline) -(require 'siren-folding) - -(use-package doom-themes - :custom - ;; Global settings (defaults) - (doom-themes-enable-bold t) ; if nil, bold is universally disabled - (doom-themes-enable-italic t) ; if nil, italics is universally disabled - (doom-nord-light-brighter-comments nil) - (doom-nord-light-brighter-modeline nil) - (doom-nord-light-comment-bg t) - (doom-nord-light-padded-modeline nil) - (nlinum-highlight-current-line t) - - :config - ;; Load the theme (doom-nord-light, doom-molokai, etc); keep in mind that each - ;; theme may have their own settings. - (load-theme 'doom-nord-light t) - - ;; Enable flashing mode-line on errors - (doom-themes-visual-bell-config) - - ;; Enable custom neotree theme - (doom-themes-neotree-config) ; all-the-icons fonts must be installed! - - ;; Corrects (and improves) org-mode's native fontification. - ;; (doom-themes-org-config) - - ;; Override some of doom-nord-light's colors. - (set-face-foreground 'font-lock-variable-name-face (doom-lighten 'blue 0.25)) - (set-face-foreground 'vertical-border (doom-darken 'vertical-bar 0.1)) - (set-face-background 'vertical-border (doom-darken 'vertical-bar 0.1)) - - (when (not (version< emacs-version "27.0")) - (set-face-foreground 'fill-column-indicator (doom-lighten 'base3 0.10))) - - (with-eval-after-load 'diff-hl - (set-face-foreground 'diff-hl-insert (doom-blend 'vc-added 'bg 0.7)) - (set-face-background 'diff-hl-insert (doom-blend 'vc-added 'bg 0.2)) - (set-face-foreground 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.7)) - (set-face-background 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.2)) - (set-face-foreground 'diff-hl-change (doom-blend 'vc-modified 'bg 0.7)) - (set-face-background 'diff-hl-change (doom-blend 'vc-modified 'bg 0.2))) - - (with-eval-after-load 'hideshowvis - (set-face-foreground 'hideshowvis-hidable-face (doom-color 'base7))) - - (with-eval-after-load 'fill-column-indicator - (setq fci-rule-color (doom-lighten (doom-color 'base3) 0.10)))) - -(provide 'siren-theme-doom-nord-light) -;;; siren-theme-doom-nord-light.el ends here diff --git a/themes/siren-theme-doom-nord.el b/themes/siren-theme-doom-nord.el deleted file mode 100644 index fbf2531..0000000 --- a/themes/siren-theme-doom-nord.el +++ /dev/null @@ -1,61 +0,0 @@ -;;; siren-theme-doom-nord.el --- jimeh's Emacs Siren: doom-nord theme. - -;;; Commentary: - -;; Setup for doom-nord theme. - -;;; Code: - -(require 'siren-all-the-icons) -(require 'siren-doom-modeline) -(require 'siren-folding) - -(use-package doom-themes - :custom - ;; Global settings (defaults) - (doom-themes-enable-bold t) ; if nil, bold is universally disabled - (doom-themes-enable-italic t) ; if nil, italics is universally disabled - (doom-nord-brighter-comments nil) - (doom-nord-brighter-modeline nil) - (doom-nord-comment-bg t) - (doom-nord-padded-modeline nil) - (nlinum-highlight-current-line t) - - :config - ;; Load the theme (doom-nord, doom-molokai, etc); keep in mind that each - ;; theme may have their own settings. - (load-theme 'doom-nord t) - - ;; Enable flashing mode-line on errors - (doom-themes-visual-bell-config) - - ;; Enable custom neotree theme - (doom-themes-neotree-config) ; all-the-icons fonts must be installed! - - ;; Corrects (and improves) org-mode's native fontification. - ;; (doom-themes-org-config) - - ;; Override some of doom-nord's colors. - (set-face-foreground 'font-lock-variable-name-face (doom-lighten 'blue 0.25)) - (set-face-foreground 'vertical-border (doom-darken 'vertical-bar 0.1)) - (set-face-background 'vertical-border (doom-darken 'vertical-bar 0.1)) - - (when (not (version< emacs-version "27.0")) - (set-face-foreground 'fill-column-indicator (doom-lighten 'base3 0.10))) - - (with-eval-after-load 'diff-hl - (set-face-foreground 'diff-hl-insert (doom-blend 'vc-added 'bg 0.7)) - (set-face-background 'diff-hl-insert (doom-blend 'vc-added 'bg 0.2)) - (set-face-foreground 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.7)) - (set-face-background 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.2)) - (set-face-foreground 'diff-hl-change (doom-blend 'vc-modified 'bg 0.7)) - (set-face-background 'diff-hl-change (doom-blend 'vc-modified 'bg 0.2))) - - (with-eval-after-load 'hideshowvis - (set-face-foreground 'hideshowvis-hidable-face (doom-color 'base7))) - - (with-eval-after-load 'fill-column-indicator - (setq fci-rule-color (doom-lighten (doom-color 'base3) 0.10)))) - -(provide 'siren-theme-doom-nord) -;;; siren-theme-doom-nord.el ends here diff --git a/themes/siren-theme-doom-one.el b/themes/siren-theme-doom-one.el deleted file mode 100644 index b458e8a..0000000 --- a/themes/siren-theme-doom-one.el +++ /dev/null @@ -1,60 +0,0 @@ -;;; siren-theme-doom-one.el --- jimeh's Emacs Siren: doom-one theme. - -;;; Commentary: - -;; Setup for doom-one theme. - -;;; Code: - -(require 'siren-all-the-icons) -(require 'siren-doom-modeline) -(require 'siren-folding) - -(use-package doom-themes - :custom - ;; Global settings (defaults) - (doom-themes-enable-bold t) ; if nil, bold is universally disabled - (doom-themes-enable-italic t) ; if nil, italics is universally disabled - (doom-one-brighter-comments nil) - (doom-one-brighter-modeline nil) - (doom-one-comment-bg t) - (doom-one-padded-modeline nil) - - :config - ;; Load the theme (doom-one, doom-molokai, etc); keep in mind that each - ;; theme may have their own settings. - (load-theme 'doom-one t) - - ;; Enable flashing mode-line on errors - (doom-themes-visual-bell-config) - - ;; Enable custom neotree theme - (doom-themes-neotree-config) ; all-the-icons fonts must be installed! - - ;; Corrects (and improves) org-mode's native fontification. - ;; (doom-themes-org-config) - - ;; Override some of doom-one's colors. - (set-face-foreground 'font-lock-variable-name-face (doom-lighten 'blue 0.25)) - (set-face-foreground 'vertical-border (doom-darken 'vertical-bar 0.1)) - (set-face-background 'vertical-border (doom-darken 'vertical-bar 0.1)) - - (when (not (version< emacs-version "27.0")) - (set-face-foreground 'fill-column-indicator (doom-lighten 'base3 0.10))) - - (with-eval-after-load 'diff-hl - (set-face-foreground 'diff-hl-insert (doom-blend 'vc-added 'bg 0.7)) - (set-face-background 'diff-hl-insert (doom-blend 'vc-added 'bg 0.2)) - (set-face-foreground 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.7)) - (set-face-background 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.2)) - (set-face-foreground 'diff-hl-change (doom-blend 'vc-modified 'bg 0.7)) - (set-face-background 'diff-hl-change (doom-blend 'vc-modified 'bg 0.2))) - - (with-eval-after-load 'hideshowvis - (set-face-foreground 'hideshowvis-hidable-face (doom-color 'base7))) - - (with-eval-after-load 'fill-column-indicator - (setq fci-rule-color (doom-lighten (doom-color 'base3) 0.10)))) - -(provide 'siren-theme-doom-one) -;;; siren-theme-doom-one.el ends here diff --git a/themes/siren-theme-doom-opera-light.el b/themes/siren-theme-doom-opera-light.el deleted file mode 100644 index 1b97064..0000000 --- a/themes/siren-theme-doom-opera-light.el +++ /dev/null @@ -1,61 +0,0 @@ -;;; siren-theme-doom-opera-light.el --- jimeh's Emacs Siren: doom-opera-light theme. - -;;; Commentary: - -;; Setup for doom-opera-light theme. - -;;; Code: - -(require 'siren-all-the-icons) -(require 'siren-doom-modeline) -(require 'siren-folding) - -(use-package doom-themes - :custom - ;; Global settings (defaults) - (doom-themes-enable-bold t) ; if nil, bold is universally disabled - (doom-themes-enable-italic t) ; if nil, italics is universally disabled - (doom-opera-light-brighter-comments nil) - (doom-opera-light-brighter-modeline nil) - (doom-opera-light-comment-bg t) - (doom-opera-light-padded-modeline nil) - (nlinum-highlight-current-line t) - - :config - ;; Load the theme (doom-opera-light, doom-molokai, etc); keep in mind that each - ;; theme may have their own settings. - (load-theme 'doom-opera-light t) - - ;; Enable flashing mode-line on errors - (doom-themes-visual-bell-config) - - ;; Enable custom neotree theme - (doom-themes-neotree-config) ; all-the-icons fonts must be installed! - - ;; Corrects (and improves) org-mode's native fontification. - ;; (doom-themes-org-config) - - ;; Override some of doom-opera-light's colors. - (set-face-foreground 'font-lock-variable-name-face (doom-lighten 'blue 0.25)) - (set-face-foreground 'vertical-border (doom-darken 'vertical-bar 0.1)) - (set-face-background 'vertical-border (doom-darken 'vertical-bar 0.1)) - - (when (not (version< emacs-version "27.0")) - (set-face-foreground 'fill-column-indicator (doom-lighten 'base3 0.10))) - - (with-eval-after-load 'diff-hl - (set-face-foreground 'diff-hl-insert (doom-blend 'vc-added 'bg 0.7)) - (set-face-background 'diff-hl-insert (doom-blend 'vc-added 'bg 0.2)) - (set-face-foreground 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.7)) - (set-face-background 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.2)) - (set-face-foreground 'diff-hl-change (doom-blend 'vc-modified 'bg 0.7)) - (set-face-background 'diff-hl-change (doom-blend 'vc-modified 'bg 0.2))) - - (with-eval-after-load 'hideshowvis - (set-face-foreground 'hideshowvis-hidable-face (doom-color 'base7))) - - (with-eval-after-load 'fill-column-indicator - (setq fci-rule-color (doom-lighten (doom-color 'base3) 0.10)))) - -(provide 'siren-theme-doom-opera-light) -;;; siren-theme-doom-opera-light.el ends here diff --git a/themes/siren-theme-doom-vibrant.el b/themes/siren-theme-doom-vibrant.el deleted file mode 100644 index b3b9d16..0000000 --- a/themes/siren-theme-doom-vibrant.el +++ /dev/null @@ -1,60 +0,0 @@ -;;; siren-theme-doom-vibrant.el --- jimeh's Emacs Siren: doom-vibrant theme. - -;;; Commentary: - -;; Setup for doom-vibrant theme. - -;;; Code: - -(require 'siren-all-the-icons) -(require 'siren-doom-modeline) -(require 'siren-folding) - -(use-package doom-themes - :custom - ;; Global settings (defaults) - (doom-themes-enable-bold t) ; if nil, bold is universally disabled - (doom-themes-enable-italic t) ; if nil, italics is universally disabled - (doom-vibrant-brighter-comments nil) - (doom-vibrant-brighter-modeline nil) - (doom-vibrant-comment-bg t) - (doom-vibrant-padded-modeline nil) - - :config - ;; Load the theme (doom-vibrant, doom-molokai, etc); keep in mind that each - ;; theme may have their own settings. - (load-theme 'doom-vibrant t) - - ;; Enable flashing mode-line on errors - (doom-themes-visual-bell-config) - - ;; Enable custom neotree theme - (doom-themes-neotree-config) ; all-the-icons fonts must be installed! - - ;; Corrects (and improves) org-mode's native fontification. - ;; (doom-themes-org-config) - - ;; Override some of doom-vibrant's colors. - (set-face-foreground 'font-lock-variable-name-face (doom-lighten 'blue 0.25)) - (set-face-foreground 'vertical-border (doom-darken 'vertical-bar 0.1)) - (set-face-background 'vertical-border (doom-darken 'vertical-bar 0.1)) - - (when (not (version< emacs-version "27.0")) - (set-face-foreground 'fill-column-indicator (doom-lighten 'base3 0.10))) - - (with-eval-after-load 'diff-hl - (set-face-foreground 'diff-hl-insert (doom-blend 'vc-added 'bg 0.7)) - (set-face-background 'diff-hl-insert (doom-blend 'vc-added 'bg 0.2)) - (set-face-foreground 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.7)) - (set-face-background 'diff-hl-delete (doom-blend 'vc-deleted 'bg 0.2)) - (set-face-foreground 'diff-hl-change (doom-blend 'vc-modified 'bg 0.7)) - (set-face-background 'diff-hl-change (doom-blend 'vc-modified 'bg 0.2))) - - (with-eval-after-load 'hideshowvis - (set-face-foreground 'hideshowvis-hidable-face (doom-color 'base7))) - - (with-eval-after-load 'fill-column-indicator - (setq fci-rule-color (doom-lighten (doom-color 'base3) 0.10)))) - -(provide 'siren-theme-doom-vibrant) -;;; siren-theme-doom-vibrant.el ends here diff --git a/themes/siren-theme-spacemacs-dark.el b/themes/siren-theme-spacemacs-dark.el deleted file mode 100644 index da8956d..0000000 --- a/themes/siren-theme-spacemacs-dark.el +++ /dev/null @@ -1,14 +0,0 @@ -;;; siren-theme-spacemacs-dark.el --- jimeh's Emacs Siren: spacemacs-dark theme. - -;;; Commentary: - -;; Setup for spacemacs-dark theme. - -;;; Code: - -(siren-require-packages '(spacemacs-theme)) - -(require 'spacemacs-dark-theme) - -(provide 'siren-theme-spacemacs-dark) -;;; siren-theme-spacemacs-dark.el ends here diff --git a/themes/siren-theme-tomorrow-night-paradise.el b/themes/siren-theme-tomorrow-night-paradise.el deleted file mode 100644 index a9b098c..0000000 --- a/themes/siren-theme-tomorrow-night-paradise.el +++ /dev/null @@ -1,14 +0,0 @@ -;;; siren-theme-tomorrow-night-paradise.el --- jimeh's Emacs Siren: tomorrow-night-paradise-theme. - -;;; Commentary: - -;; Setup for tomorrow-night-paradise-theme. - -;;; Code: - -(use-package tomorrow-night-paradise-theme - :straight (:type git :host github - :repo "jimeh/tomorrow-night-paradise-theme.el")) - -(provide 'siren-theme-tomorrow-night-paradise) -;;; siren-theme-tomorrow-night-paradise.el ends here diff --git a/themes/siren-theme-twilight-anti-bright.el b/themes/siren-theme-twilight-anti-bright.el deleted file mode 100644 index baa818f..0000000 --- a/themes/siren-theme-twilight-anti-bright.el +++ /dev/null @@ -1,14 +0,0 @@ -;;; siren-theme-twilight-anti-bright.el --- jimeh's Emacs Siren: twilight-anti-bright-theme. - -;;; Commentary: - -;; Setup for twilight-anti-bright-theme. - -;;; Code: - -(siren-require-packages '(twilight-anti-bright-theme twilight-bright-theme)) - -(require 'twilight-anti-bright-theme) - -(provide 'siren-theme-twilight-anti-bright) -;;; siren-theme-twilight-anti-bright.el ends here