[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/modus-vivendi-theme d3958bb 074/110: NEW CUSTOMISATION
From: |
Stefan Monnier |
Subject: |
[elpa] externals/modus-vivendi-theme d3958bb 074/110: NEW CUSTOMISATION OPTION for "rainbow headings" |
Date: |
Wed, 29 Apr 2020 21:40:10 -0400 (EDT) |
branch: externals/modus-vivendi-theme
commit d3958bba5616849cc7a9f02b4750ed8f30d7c686
Author: Protesilaos Stavrou <address@hidden>
Commit: Protesilaos Stavrou <address@hidden>
NEW CUSTOMISATION OPTION for "rainbow headings"
As with all customisation options, this is set to nil by default.
The idea with this toggle is to allow users to apply more vivid colours
to headings. Currently, the effect is implemented in the Org and
Outline modes, though other face groups will be supported in the near
future.
---
README.org | 17 +++++++++++
modus-operandi-theme.el | 79 ++++++++++++++++++++++++++++---------------------
modus-vivendi-theme.el | 79 ++++++++++++++++++++++++++++---------------------
3 files changed, 109 insertions(+), 66 deletions(-)
diff --git a/README.org b/README.org
index a3a572a..a07f8a2 100644
--- a/README.org
+++ b/README.org
@@ -212,6 +212,23 @@ default is to use the same background as the rest of the
buffer for the
contents of the block, while beginning and end lines do not extend to
the end of the window (again, the "extend" is for Emacs 27 or higher).
+** Option for colourful "rainbow" headings
+ :PROPERTIES:
+ :CUSTOM_ID: h:1be42afb-bcd2-4425-b956-0ba93eb960c2
+ :END:
+
++ =modus-operandi-theme-rainbow-headings=
++ =modus-vivendi-theme-rainbow-headings=
+
+Apply more saturated colours to headings in =org-mode= and =outline-mode=
+while retaining all other heading properties (such as a bold weight and
+the optional scaled height ---see relevant customisation toggle). The
+colours follow the rainbow's spectrum. In Org headings, some additional
+tweaks are made to adapt keywords (like "TODO") to the more vivid
+presentation. The default uses a more frugal aesthetic for headings,
+letting their bold typography and the nuances between the various
+heading levels provide the elements of differentiation.
+
** Option for scaled headings
:PROPERTIES:
:CUSTOM_ID: h:db0275ea-11c2-47c9-82a9-10b65d8df0f8
diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index b974e88..22a5fa4 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -42,6 +42,7 @@
;; modus-operandi-theme-slanted-constructs
;; modus-operandi-theme-bold-constructs
;; modus-operandi-theme-proportional-fonts
+;; modus-operandi-theme-rainbow-headings
;; modus-operandi-theme-scale-headings
;; modus-operandi-theme-visible-fringes
;; modus-operandi-theme-distinct-org-blocks
@@ -373,6 +374,10 @@ between foreground and background is >= 7:1)."
"Use proportional fonts (variable-pitch) in headings."
:type 'boolean)
+(defcustom modus-operandi-theme-rainbow-headings nil
+ "Use more saturated colours for headings."
+ :type 'boolean)
+
(defcustom modus-operandi-theme-scale-headings nil
"Use font scaling for headings."
:type 'boolean)
@@ -411,6 +416,14 @@ between foreground and background is >= 7:1)."
;; Helper functions that are meant to ease the implementation of the
;; above customisation options.
+(defun modus-operandi-theme-heading-style (subtle rainbow)
+ "Apply foreground value to headings.
+SUBTLE is the default aesthetic.
+RAINBOW is the saturated one."
+ (if modus-operandi-theme-rainbow-headings
+ (list :foreground rainbow)
+ (list :foreground subtle)))
+
(defun modus-operandi-theme-modeline-box (col3d col &optional btn int)
"Control the box properties of the mode line.
COL3D is the border that is intended for the three-dimensional modeline.
@@ -2384,26 +2397,26 @@ AMOUNT is a customisation option."
`(org-headline-done ((,class (:foreground ,green-nuanced))))
`(org-hide ((,class (:foreground ,fg-main))))
`(org-latex-and-related ((,class (:foreground ,magenta-refine-fg))))
- `(org-level-1 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-main :weight bold
+ `(org-level-1 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
fg-main magenta-alt-other)
,@(modus-operandi-theme-scale
modus-operandi-theme-scale-4)))))
- `(org-level-2 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-warm :weight bold
+ `(org-level-2 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
fg-special-warm magenta-alt)
,@(modus-operandi-theme-scale
modus-operandi-theme-scale-3)))))
- `(org-level-3 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-cold :weight bold
+ `(org-level-3 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
fg-special-cold blue)
,@(modus-operandi-theme-scale
modus-operandi-theme-scale-2)))))
- `(org-level-4 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-mild :weight bold
+ `(org-level-4 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
fg-special-mild cyan-alt-other)
,@(modus-operandi-theme-scale
modus-operandi-theme-scale-1)))))
- `(org-level-5 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-calm :weight
bold))))
- `(org-level-6 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,yellow-nuanced :weight
bold))))
- `(org-level-7 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,red-nuanced :weight bold))))
- `(org-level-8 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-dim :weight bold))))
+ `(org-level-5 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
fg-special-calm green-alt)))))
+ `(org-level-6 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
yellow-nuanced yellow-alt-other)))))
+ `(org-level-7 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
red-nuanced red-alt)))))
+ `(org-level-8 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
fg-dim magenta)))))
`(org-link ((,class (:inherit link))))
`(org-list-dt ((,class (:weight bold))))
`(org-macro ((,class (:inherit org-latex-and-related))))
@@ -2422,7 +2435,7 @@ AMOUNT is a customisation option."
`(org-tag-group ((,class (:foreground ,cyan-nuanced :weight bold))))
`(org-target ((,class (:underline t))))
`(org-time-grid ((,class (:foreground ,cyan-nuanced))))
- `(org-todo ((,class (:foreground ,magenta-alt-other))))
+ `(org-todo ((,class (,@(modus-operandi-theme-heading-style
magenta-alt-other blue-alt-other)))))
`(org-upcoming-deadline ((,class (:foreground ,red-alt-other))))
`(org-upcoming-distant-deadline ((,class (:foreground ,red-nuanced))))
`(org-verbatim ((,class (:background ,bg-alt :foreground
,fg-special-calm))))
@@ -2454,26 +2467,26 @@ AMOUNT is a customisation option."
`(origami-fold-header-face ((,class (:background ,bg-dim :foreground
,fg-dim :box t))))
`(origami-fold-replacement-face ((,class (:background ,bg-alt :foreground
,fg-alt))))
;;;; outline-mode
- `(outline-1 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-main :weight bold
+ `(outline-1 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
fg-main magenta-alt-other)
,@(modus-operandi-theme-scale
modus-operandi-theme-scale-4)))))
- `(outline-2 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-warm :weight bold
+ `(outline-2 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
fg-special-warm magenta-alt)
,@(modus-operandi-theme-scale
modus-operandi-theme-scale-3)))))
- `(outline-3 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-cold :weight bold
+ `(outline-3 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
fg-special-cold blue)
,@(modus-operandi-theme-scale
modus-operandi-theme-scale-2)))))
- `(outline-4 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-mild :weight bold
+ `(outline-4 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
fg-special-mild cyan-alt-other)
,@(modus-operandi-theme-scale
modus-operandi-theme-scale-1)))))
- `(outline-5 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-calm :weight bold))))
- `(outline-6 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,yellow-nuanced :weight bold))))
- `(outline-7 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,red-nuanced :weight bold))))
- `(outline-8 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-dim :weight bold))))
+ `(outline-5 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
fg-special-calm green-alt)))))
+ `(outline-6 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
yellow-nuanced yellow-alt-other)))))
+ `(outline-7 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style
red-nuanced red-alt)))))
+ `(outline-8 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-operandi-theme-heading-style fg-dim
magenta)))))
;;;; outline-minor-faces
`(outline-minor-0 ((,class (:background ,bg-alt))))
;;;; package (M-x list-packages)
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 81aaf3c..e39e6fd 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -42,6 +42,7 @@
;; modus-vivendi-theme-slanted-constructs
;; modus-vivendi-theme-bold-constructs
;; modus-vivendi-theme-proportional-fonts
+;; modus-vivendi-theme-rainbow-headings
;; modus-vivendi-theme-scale-headings
;; modus-vivendi-theme-visible-fringes
;; modus-vivendi-theme-distinct-org-blocks
@@ -373,6 +374,10 @@ between foreground and background is >= 7:1)."
"Use proportional fonts (variable-pitch) in headings."
:type 'boolean)
+(defcustom modus-vivendi-theme-rainbow-headings nil
+ "Use more saturated colours for headings."
+ :type 'boolean)
+
(defcustom modus-vivendi-theme-scale-headings nil
"Use font scaling for headings."
:type 'boolean)
@@ -411,6 +416,14 @@ between foreground and background is >= 7:1)."
;; Helper functions that are meant to ease the implementation of the
;; above customisation options.
+(defun modus-vivendi-theme-heading-style (subtle rainbow)
+ "Apply foreground value to headings.
+SUBTLE is the default aesthetic.
+RAINBOW is the saturated one."
+ (if modus-vivendi-theme-rainbow-headings
+ (list :foreground rainbow)
+ (list :foreground subtle)))
+
(defun modus-vivendi-theme-modeline-box (col3d col &optional btn int)
"Control the box properties of the mode line.
COL3D is the border that is intended for the three-dimensional modeline.
@@ -2384,26 +2397,26 @@ AMOUNT is a customisation option."
`(org-headline-done ((,class (:foreground ,green-nuanced))))
`(org-hide ((,class (:foreground ,fg-main))))
`(org-latex-and-related ((,class (:foreground ,magenta-refine-fg))))
- `(org-level-1 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-main :weight bold
+ `(org-level-1 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
fg-main magenta-alt-other)
,@(modus-vivendi-theme-scale
modus-vivendi-theme-scale-4)))))
- `(org-level-2 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-warm :weight bold
+ `(org-level-2 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
fg-special-warm magenta-alt)
,@(modus-vivendi-theme-scale
modus-vivendi-theme-scale-3)))))
- `(org-level-3 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-cold :weight bold
+ `(org-level-3 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
fg-special-cold blue)
,@(modus-vivendi-theme-scale
modus-vivendi-theme-scale-2)))))
- `(org-level-4 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-mild :weight bold
+ `(org-level-4 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
fg-special-mild cyan-alt-other)
,@(modus-vivendi-theme-scale
modus-vivendi-theme-scale-1)))))
- `(org-level-5 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-calm :weight
bold))))
- `(org-level-6 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,yellow-nuanced :weight
bold))))
- `(org-level-7 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,red-nuanced :weight bold))))
- `(org-level-8 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-dim :weight bold))))
+ `(org-level-5 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
fg-special-calm green-alt)))))
+ `(org-level-6 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
yellow-nuanced yellow-alt-other)))))
+ `(org-level-7 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
red-nuanced red-alt)))))
+ `(org-level-8 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
fg-dim magenta)))))
`(org-link ((,class (:inherit link))))
`(org-list-dt ((,class (:weight bold))))
`(org-macro ((,class (:inherit org-latex-and-related))))
@@ -2422,7 +2435,7 @@ AMOUNT is a customisation option."
`(org-tag-group ((,class (:foreground ,cyan-nuanced :weight bold))))
`(org-target ((,class (:underline t))))
`(org-time-grid ((,class (:foreground ,cyan-nuanced))))
- `(org-todo ((,class (:foreground ,magenta-alt-other))))
+ `(org-todo ((,class (,@(modus-vivendi-theme-heading-style magenta-alt-other
blue-alt-other)))))
`(org-upcoming-deadline ((,class (:foreground ,red-alt-other))))
`(org-upcoming-distant-deadline ((,class (:foreground ,red-nuanced))))
`(org-verbatim ((,class (:background ,bg-alt :foreground
,fg-special-calm))))
@@ -2454,26 +2467,26 @@ AMOUNT is a customisation option."
`(origami-fold-header-face ((,class (:background ,bg-dim :foreground
,fg-dim :box t))))
`(origami-fold-replacement-face ((,class (:background ,bg-alt :foreground
,fg-alt))))
;;;; outline-mode
- `(outline-1 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-main :weight bold
+ `(outline-1 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style fg-main
magenta-alt-other)
,@(modus-vivendi-theme-scale
modus-vivendi-theme-scale-4)))))
- `(outline-2 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-warm :weight bold
+ `(outline-2 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
fg-special-warm magenta-alt)
,@(modus-vivendi-theme-scale
modus-vivendi-theme-scale-3)))))
- `(outline-3 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-cold :weight bold
+ `(outline-3 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
fg-special-cold blue)
,@(modus-vivendi-theme-scale
modus-vivendi-theme-scale-2)))))
- `(outline-4 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-mild :weight bold
+ `(outline-4 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
fg-special-mild cyan-alt-other)
,@(modus-vivendi-theme-scale
modus-vivendi-theme-scale-1)))))
- `(outline-5 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-special-calm :weight bold))))
- `(outline-6 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,yellow-nuanced :weight bold))))
- `(outline-7 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,red-nuanced :weight bold))))
- `(outline-8 ((,class (:inherit ,modus-theme-variable-pitch
- :foreground ,fg-dim :weight bold))))
+ `(outline-5 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
fg-special-calm green-alt)))))
+ `(outline-6 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
yellow-nuanced yellow-alt-other)))))
+ `(outline-7 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style
red-nuanced red-alt)))))
+ `(outline-8 ((,class (:inherit ,modus-theme-variable-pitch :weight bold
+ ,@(modus-vivendi-theme-heading-style fg-dim
magenta)))))
;;;; outline-minor-faces
`(outline-minor-0 ((,class (:background ,bg-alt))))
;;;; package (M-x list-packages)
- [elpa] externals/modus-vivendi-theme ded2d1f 035/110: Provide concise docs of customisation options, (continued)
- [elpa] externals/modus-vivendi-theme ded2d1f 035/110: Provide concise docs of customisation options, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme ca9a69d 040/110: Add support for AG, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 530787e 048/110: Refine FLYSPELL: use new dedicated lang colours, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 409648d 049/110: Refine FLYMAKE: new linter colours, better fringes, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme f635f9b 050/110: Refine ARTBOLLOCKS-MODE: use new lang colours, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme a0e9380 055/110: Add tentative support for Emacs27 TAB-{BAR, LINE}, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme b298d30 067/110: Add note on package list refresh in the README, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 1cb0353 068/110: Simplify `outline-minor-faces', Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme f744335 069/110: Add support for ORDERLESS, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 75199a6 071/110: Minor formatting change in README, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme d3958bb 074/110: NEW CUSTOMISATION OPTION for "rainbow headings",
Stefan Monnier <=
- [elpa] externals/modus-vivendi-theme e7a5f9a 077/110: NEW CUSTOMISATION OPTION for "section headings", Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 4d7d769 020/110: Fix MAGIT regression on colours of unfocused diffs, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme d931e3c 022/110: Add docs on ORG colour-coded source blocks, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 7fabd85 042/110: Add support for VIMISH-FOLD, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 2c42b61 041/110: Add support for COLOR-RG, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 53e1a43 046/110: Define new dedicated colours for language checkers, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme f8a4b1d 047/110: Refine FLYCHECK: use new dedicated linter colours, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 272f7da 054/110: Style the `vertical-border' explicitly, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme d7b7252 056/110: Tweak border colour for Emacs 27 active tabs, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 88489ed 014/110: New customisation option for SUBTLE DIFFS, Stefan Monnier, 2020/04/29