[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/modus-vivendi-theme 695f459 24/35: Expand README with d
From: |
Stefan Monnier |
Subject: |
[elpa] externals/modus-vivendi-theme 695f459 24/35: Expand README with demo for custom colour values |
Date: |
Wed, 24 Jun 2020 12:42:49 -0400 (EDT) |
branch: externals/modus-vivendi-theme
commit 695f459e451c6b8e3b6fb9e5554de344a23d15e7
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Expand README with demo for custom colour values
This is a reference to issue 45:
https://gitlab.com/protesilaos/modus-themes/-/issues/45
---
README.org | 65 +++++++++++++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 52 insertions(+), 13 deletions(-)
diff --git a/README.org b/README.org
index ed883b1..942151a 100644
--- a/README.org
+++ b/README.org
@@ -504,6 +504,56 @@ Example:
("magenta-alt-other" . "#bbaaff")))
#+end_src
+You can then use this as a basis for creating a spin-off theme, such as
+what [[https://gitlab.com/protesilaos/modus-themes/-/issues/45][Vincent Foley
did in issue 45]]. The customisations were used to
+emulate the aesthetic of Vincent's [[https://github.com/gnuvince/purp][purp
theme]].
+
+Excerpt of what was used in issue 45:
+
+#+begin_src emacs-lisp
+(use-package modus-operandi-theme
+ :ensure t
+ :config
+ (defun customize-modus-operandi ()
+ (when (member 'modus-operandi custom-enabled-themes)
+ (setq modus-operandi-theme-override-colors-alist
+ '(("magenta" . "#ff00ff"))) ; Redefine the value of the `magenta'
variable
+ (modus-operandi-theme-with-color-variables
+ (custom-theme-set-faces
+ 'modus-operandi
+ `(font-lock-builtin-face ((t (:background ,bg-main
:foreground ,fg-main))))
+ `(font-lock-comment-delimiter-face ((t (:background ,bg-main
:foreground ,green))))
+ `(font-lock-comment-face ((t (:background ,bg-main
:foreground ,green))))
+ `(font-lock-constant-face ((t (:background ,bg-main
:foreground ,fg-main))))
+ `(font-lock-doc-face ((t (:background ,bg-main
:foreground ,green))))
+ `(font-lock-function-name-face ((t (:background ,bg-main
:foreground ,magenta)))) ; gets the value from the above alist
+ `(font-lock-keyword-face ((t (:background ,bg-main
:foreground ,fg-main))))
+ `(font-lock-negation-char-face ((t (:background ,bg-main
:foreground ,fg-main))))
+ `(font-lock-preprocessor-face ((t (:background ,bg-main
:foreground ,fg-main))))
+ `(font-lock-regexp-grouping-backslash ((t (:background ,bg-main
:foreground ,fg-main))))
+ `(font-lock-regexp-grouping-construct ((t (:background ,bg-main
:foreground ,fg-main))))
+ `(font-lock-string-face ((t (:background ,bg-main
:foreground ,yellow))))
+ `(font-lock-type-face ((t (:background ,bg-main
:foreground ,fg-main))))
+ `(font-lock-variable-name-face ((t (:background ,bg-main
:foreground ,fg-main))))
+ `(font-lock-warning-face ((t (:weight bold :background
,bg-main :foreground ,red))))
+ ))))
+ (add-hook 'after-load-theme-hook 'customize-modus-operandi))
+#+end_src
+
+The code for the bespoke =after-load-theme-hook= could be something like
+the following (courtesy of the
[[https://github.com/seagle0128/.emacs.d/blob/master/lisp/init-funcs.el][Centaur
Emacs project]]):
+
+#+begin_src emacs-lisp
+(defvar after-load-theme-hook nil
+ "Hook run after a color theme is loaded using `load-theme'.")
+
+(defun run-after-load-theme-hook (&rest _)
+ "Run `after-load-theme-hook'."
+ (run-hooks 'after-load-theme-hook))
+
+(advice-add #'load-theme :after #'run-after-load-theme-hook)
+#+end_src
+
*** Option 2 to apply colour variables to faces
:PROPERTIES:
:CUSTOM_ID: h:9754abfd-c890-4af3-91a8-1a2cb2b5be44
@@ -574,19 +624,8 @@ Perhaps you want something simpler, such as a nice style
for the cursor:
`(cursor ((t (:background ,green-alt))))))
#+end_src
-The code for the bespoke =after-load-theme-hook= could be something like
-the following (courtesy of the
[[https://github.com/seagle0128/.emacs.d/blob/master/lisp/init-funcs.el][Centaur
Emacs project]]):
-
-#+begin_src emacs-lisp
-(defvar after-load-theme-hook nil
- "Hook run after a color theme is loaded using `load-theme'.")
-
-(defun run-after-load-theme-hook (&rest _)
- "Run `after-load-theme-hook'."
- (run-hooks 'after-load-theme-hook))
-
-(advice-add #'load-theme :after #'run-after-load-theme-hook)
-#+end_src
+Remember that the =after-load-theme-hook= is not built into Emacs. The
+code for it was shown under heading
[[#h:149e23b6-ada1-480f-95cd-c56fb40999b5][Option 1 to redefine colour values]].
If you need more ideas check how I configure the themes in
[[https://gitlab.com/protesilaos/dotemacs][my dotemacs]].
If something is not clear or not working as intended, please let me
- [elpa] externals/modus-vivendi-theme 9c15114 17/35: Tweak 'magit-tag' (better in context), (continued)
- [elpa] externals/modus-vivendi-theme 9c15114 17/35: Tweak 'magit-tag' (better in context), Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme 09fb3ef 16/35: Tweak 'eshell-prompt' (better in context), Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme b1c7c60 06/35: Ensure better consistency of some Org faces, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme 1ca78af 13/35: Make Org doc title consistent with other headings, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme f22749e 11/35: Modus Vivendi subtle palette review, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme b19d100 18/35: Extend support for INFO titles, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme 0d9c90c 19/35: Major review of DIREDFL faces, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme 9b8c0c8 20/35: Make diff indicators better for subtle diff option, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme 2c55c0f 21/35: Differentiate 'message-mml', 'message-header-name', Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme f1a22b5 22/35: Make 'message-separator' more intense greyscale, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme 695f459 24/35: Expand README with demo for custom colour values,
Stefan Monnier <=
- [elpa] externals/modus-vivendi-theme 38471df 25/35: Minor amendment to commit f1a22b5e3, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme c28d472 29/35: Don't give deffaces an invalid docstring, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme c0d35ae 32/35: Use appropriate colour for symlinks, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme f264a89 35/35: Merge branch 'master' into local branch, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme 25de45e 23/35: Tweak README advanced customisation example, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme 8317484 27/35: Fix Ibuffer dependency on Dired faces, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme 4068405 33/35: Define palette as a constant, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme deda7db 26/35: Fix parentheses and indentation, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme bfa6650 28/35: Review internal "mark" faces, Stefan Monnier, 2020/06/24
- [elpa] externals/modus-vivendi-theme 776977c 30/35: Use modern (DISPLAY . PLIST) face spec entries, Stefan Monnier, 2020/06/24