commit ab21e4a63e06ceb73ec3c97b895ea54e65d33915
parent ed5b51c5fec6d72b71cdd7041382c137f6325783
Author: Vincent Demeester <vincent@sbr.pm>
Date: Fri, 17 Nov 2023 16:28:48 +0100
tools/emacs: refactor modus-them loading
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
1 file changed, 28 insertions(+), 46 deletions(-)
diff --git a/tools/emacs/early-init.el b/tools/emacs/early-init.el
@@ -63,54 +63,36 @@
(add-to-list 'load-path (concat user-emacs-directory "lisp/"))
(advice-add #'load-theme :after #'contrib/run-after-load-theme-hook)
+
(require 'modus-themes)
+(setq modus-themes-to-toggle '(modus-operandi modus-vivendi)
+ modus-themes-slanted-constructs nil
+ modus-themes-italic-constructs nil
+ modus-themes-bold-constructs nil
+ modus-themes-mixed-fonts t
+ modus-themes-subtle-diffs t
+ modus-themes-fringes 'subtle ; {nil,'subtle,'intense}
+ modus-themes-headings '((0 . (variable-pitch semilight 1.5))
+ (1 . (regular 1.4))
+ (2 . (regular 1.3))
+ (3 . (regular 1.2))
+ (agenda-structure . (variable-pitch light 2.2))
+ (agenda-date . (variable-pitch regular 1.3))
+ (t . (regular 1.15)))
+ modus-themes-intense-paren-match t
+ modus-themes-completions '(opinionated) ; {nil,'moderate,'opinionated}
+ modus-themes-diffs 'desaturated ; {nil,'desaturated,'fg-only}
+ modus-themes-org-blocks 'gray-background
+ modus-themes-paren-match '(subtle-bold)
+ modus-themes-variable-pitch-headings nil
+ modus-themes-rainbow-headings t
+ modus-themes-section-headings nil
+ modus-themes-scale-headings t
+ )
+(define-key global-map (kbd "C-<f5>") #'modus-themes-toggle)
+
+(load-theme 'modus-operandi :no-confirm)
-(defun vde/modus-operandi ()
- "Enable some Modus Operandi variables and load the theme.
-This is used internally by `vde/modus-themes-toggle'."
- (setq
- ;; modus-themes-slanted-constructs t
- ;; modus-themes-bold-constructs t
- modus-themes-subtle-diffs t
- modus-themes-fringes 'subtle ; {nil,'subtle,'intense}
- modus-themes-mode-line '(moody)
- ;; modus-themes-hl-line nil
- modus-themes-intense-paren-match t
- ;; modus-themes-prompts '(subtle-accented) ; {nil,'subtle,'intense}
- modus-themes-completions '(opinionated) ; {nil,'moderate,'opinionated}
- modus-themes-diffs 'desaturated ; {nil,'desaturated,'fg-only}
- modus-themes-org-blocks 'greyscale ; {nil,'greyscale,'rainbow}
- ;; modus-themes-links '(neutral-underline)
- modus-themes-paren-match '(subtle-bold)
- ;; modus-themes-syntax nil
- modus-themes-variable-pitch-headings nil
- modus-themes-rainbow-headings t
- modus-themes-section-headings nil
- modus-themes-scale-headings t
- modus-themes-scale-1 1.05
- modus-themes-scale-2 1.1
- modus-themes-scale-3 1.15
- modus-themes-scale-4 1.2
- ;; x-underline-at-descent-line t
- )
- (require-theme 'modus-themes)
- (load-theme 'modus-operandi :no-confirm)
- ;; (modus-themes-load-theme modus-operandi)
- )
-
-(defun vde/modus-operandi-custom ()
- "Customize modus-operandi theme."
- (modus-themes-with-colors
- (custom-set-faces
- `(whitespace-tab ((,class (:background "#ffffff" :foreground "#cccccc"))))
- `(whitespace-space ((,class (:background "#ffffff" :foreground "#cccccc"))))
- `(whitespace-hspace ((,class (:background "#ffffff" :foreground "#cccccc"))))
- `(whitespace-newline ((,class (:background "#ffffff" :foreground "#cccccc"))))
- `(whitespace-indentation ((,class (:background "#ffffff" :foreground "#cccccc"))))
- )))
-
-(add-hook 'modus-themes-after-load-theme-hook #'vde/modus-operandi-custom)
-(vde/modus-operandi)
(defconst font-height 130
"Default font-height to use.")