aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorProtesilaos Stavrou2021-03-04 16:20:15 +0200
committerBasil L. Contovounesios2021-03-06 09:16:00 +0000
commitde602dd7cf76b001244964aa5bbef4d9e08ea62b (patch)
tree13728319d6f017ea3f426ae9d9dd628ddf9dc59a /doc/misc
parentf2f233d867ac5a81504c62d5fdb45e8c1c04739b (diff)
downloademacs-de602dd7cf76b001244964aa5bbef4d9e08ea62b.tar.gz
emacs-de602dd7cf76b001244964aa5bbef4d9e08ea62b.zip
Update Modus themes to their version 1.2.0
* doc/misc/modus-themes.org: Add new version of the manual, with changes to markup and references to the latest state of the project. * etc/themes/modus-vivendi-theme.el: * etc/themes/modus-operandi-theme.el: Provide updated version of each theme, which expands the contents of 'modus-themes.el' (bug#45068). * etc/themes/modus-themes.el: Add new supportive file. This is where theme data, functions, and face definitions are defined.
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/modus-themes.org3267
1 files changed, 2304 insertions, 963 deletions
diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org
index 4a6150cf9db..20d7767053f 100644
--- a/doc/misc/modus-themes.org
+++ b/doc/misc/modus-themes.org
@@ -1,30 +1,52 @@
1#+TITLE: Modus themes for GNU Emacs 1#+title: Modus themes for GNU Emacs
2#+AUTHOR: Protesilaos Stavrou 2#+author: Protesilaos Stavrou
3#+EMAIL: info@protesilaos.com 3#+email: info@protesilaos.com
4#+TEXINFO_DIR_CATEGORY: Emacs misc features 4#+language: en
5#+TEXINFO_DIR_TITLE: Modus Themes: (modus-themes) 5#+options: ':t toc:nil author:t email:t
6#+TEXINFO_DIR_DESC: Highly accessible themes (WCAG AAA) 6
7#+OPTIONS: ':t toc:nil author:t email:t 7#+macro: stable-version 1.2.0
8#+MACRO: version-tag 0.13.0 8#+macro: release-date 2021-03-04
9#+MACRO: release-date 2020-10-08 9#+macro: development-version 1.3.0-dev
10#+macro: export-date (eval (format-time-string "%F %R %z" (current-time)))
11#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
12#+macro: space @@texinfo:@: @@
13# The "kbd" macro turns KBD into @kbd{KBD}. Additionally, it
14# encloses case-sensitive special keys (SPC, RET...) within @key{...}.
15# I got this from the Org source code.
16#+macro: kbd (eval (let ((case-fold-search nil) (regexp (regexp-opt '("SPC" "RET" "LFD" "TAB" "BS" "ESC" "DELETE" "SHIFT" "Ctrl" "Meta" "Alt" "Cmd" "Super" "UP" "LEFT" "RIGHT" "DOWN") 'words))) (format "@@texinfo:@kbd{@@%s@@texinfo:}@@" (replace-regexp-in-string regexp "@@texinfo:@key{@@\\&@@texinfo:}@@" $1 t))))
17
18#+texinfo_filename: modus-themes.info
19#+texinfo_dir_category: Emacs misc features
20#+texinfo_dir_title: Modus Themes: (modus-themes)
21#+texinfo_dir_desc: Highly accessible themes (WCAG AAA)
22#+texinfo_header: @set MAINTAINERSITE @uref{https://protesilaos.com,maintainer webpage}
23#+texinfo_header: @set MAINTAINER Protesilaos Stavrou
24#+texinfo_header: @set MAINTAINEREMAIL @email{info@protesilaos.com}
25#+texinfo_header: @set MAINTAINERCONTACT @uref{mailto:info@protesilaos.com,contact the maintainer}
10 26
11#+texinfo: @insertcopying 27#+texinfo: @insertcopying
12 28
13This manual, written by Protesilaos Stavrou, describes the customization 29This manual, written by Protesilaos Stavrou, describes the customization
14options for the =modus-operandi= and =modus-vivendi= themes, and provides 30options for the ~modus-operandi~ and ~modus-vivendi~ themes, and provides
15every other piece of information pertinent to them. 31every other piece of information pertinent to them.
16 32
17The documentation furnished herein corresponds to version {{{version-tag}}}, 33The documentation furnished herein corresponds to stable version
18released on {{{release-date}}}. Any reference to a newer feature which does 34{{{stable-version}}}, released on {{{release-date}}}. Any reference to a newer
19not yet form part of the latest tagged commit, is explicitly marked as 35feature which does not yet form part of the latest tagged commit, is
20such. 36explicitly marked as such.
21 37
22* Copying 38# Current development target is {{{development-version}}}. This manual was
23:PROPERTIES: 39# built on {{{export-date}}}.
24:copying: t
25:END:
26 40
27Copyright (C) 2020--2021 Free Software Foundation, Inc. 41#+toc: headlines 8 insert TOC here, with eight headline levels
42
43* COPYING
44:properties:
45:copying: t
46:custom_id: h:b14c3fcb-13dd-4144-9d92-2c58b3ed16d3
47:end:
48
49Copyright (C) 2020-2021 Free Software Foundation, Inc.
28 50
29#+begin_quote 51#+begin_quote
30Permission is granted to copy, distribute and/or modify this 52Permission is granted to copy, distribute and/or modify this
@@ -34,12 +56,10 @@ Foundation; with no Invariant Sections, with no Front-Cover Texts,
34and with no Back-Cover Texts. 56and with no Back-Cover Texts.
35#+end_quote 57#+end_quote
36 58
37#+TOC: headlines 8 insert TOC here, with eight headline levels
38
39* Overview 59* Overview
40:PROPERTIES: 60:properties:
41:CUSTOM_ID: h:f0f3dbcb-602d-40cf-b918-8f929c441baf 61:custom_id: h:f0f3dbcb-602d-40cf-b918-8f929c441baf
42:END: 62:end:
43 63
44The Modus themes are designed for accessible readability. They conform 64The Modus themes are designed for accessible readability. They conform
45with the highest standard for color contrast between any given 65with the highest standard for color contrast between any given
@@ -47,9 +67,9 @@ combination of background and foreground values. This corresponds to
47the WCAG AAA standard, which specifies a minimum rate of distance in 67the WCAG AAA standard, which specifies a minimum rate of distance in
48relative luminance of 7:1. 68relative luminance of 7:1.
49 69
50Modus Operandi (=modus-operandi=) is a light theme, while Modus Vivendi 70Modus Operandi (~modus-operandi~) is a light theme, while Modus Vivendi
51(=modus-vivendi=) is dark. Each theme's color palette is designed to 71(~modus-vivendi~) is dark. Each theme's color palette is designed to meet
52meet the needs of the numerous interfaces that are possible in the Emacs 72the needs of the numerous interfaces that are possible in the Emacs
53computing environment. 73computing environment.
54 74
55The overarching objective of this project is to always offer accessible 75The overarching objective of this project is to always offer accessible
@@ -59,15 +79,16 @@ and stylistic considerations, we will always opt for the former.
59 79
60To ensure that users have a consistently accessible experience, the 80To ensure that users have a consistently accessible experience, the
61themes strive to achieve as close to full face coverage as possible 81themes strive to achieve as close to full face coverage as possible
62(see [[#h:a9c8f29d-7f72-4b54-b74b-ddefe15d6a19][Face coverage]]). 82([[#h:a9c8f29d-7f72-4b54-b74b-ddefe15d6a19][Face coverage]]).
63 83
64Starting with version 0.12.0 and onwards, the themes are built into GNU 84Starting with version 0.12.0 and onwards, the themes are built into GNU
65Emacs (current version is {{{version-tag}}}). 85Emacs.
66 86
67** How do the themes look like 87** How do the themes look like
68:PROPERTIES: 88:properties:
69:CUSTOM_ID: h:69b92089-069c-4ba1-9d94-cc3415fc4f87 89:custom_id: h:69b92089-069c-4ba1-9d94-cc3415fc4f87
70:END: 90:end:
91#+cindex: Screenshots
71 92
72Check the web page with [[https://protesilaos.com/modus-themes-pictures/][the screen shots]]. There are lots of scenarios 93Check the web page with [[https://protesilaos.com/modus-themes-pictures/][the screen shots]]. There are lots of scenarios
73on display that draw attention to details and important aspects in the 94on display that draw attention to details and important aspects in the
@@ -77,596 +98,562 @@ options.
77[[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization options]]. 98[[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization options]].
78 99
79** Learn about the latest changes 100** Learn about the latest changes
80:PROPERTIES: 101:properties:
81:CUSTOM_ID: h:2cc37c36-6c1a-48b2-a010-1050b270ee18 102:custom_id: h:2cc37c36-6c1a-48b2-a010-1050b270ee18
82:END: 103:end:
104#+cindex: Changelog
83 105
84Please refer to the [[https://protesilaos.com/modus-themes-changelog][web page with the change log]]. It is comprehensive 106Please refer to the [[https://protesilaos.com/modus-themes-changelog][web page with the change log]]. It is comprehensive
85and covers everything that goes into every tagged release of the themes. 107and covers everything that goes into every tagged release of the themes.
86 108
87* Installation 109* Installation
88:PROPERTIES: 110:properties:
89:CUSTOM_ID: h:1af85373-7f81-4c35-af25-afcef490c111 111:custom_id: h:1af85373-7f81-4c35-af25-afcef490c111
90:END: 112:end:
91 113
92The Modus themes are distributed with Emacs starting with version 28.1. 114The Modus themes are distributed with Emacs starting with version 28.1.
93On older versions of Emacs, they can be installed using Emacs' package 115On older versions of Emacs, they can be installed using Emacs' package
94manager or manually from their code repository. 116manager or manually from their code repository. There also exist
117packages for distributions of GNU/Linux.
118
119** Install manually from source
120:properties:
121:custom_id: h:da3414b7-1426-46b8-8e76-47b845b76fd0
122:end:
123
124In the following example, we are assuming that your Emacs files are
125stored in =~/.emacs.d= and that you want to place the Modus themes in
126=~/.emacs.d/modus-themes=.
127
1281. Get the source and store it in the desired path by running the
129 following in the command line shell:
130
131: $ git clone https://gitlab.com/protesilaos/modus-themes.git ~/.emacs.d/modus-themes
132
1332. Add that path to your known Elisp libraries' list, by placing this
134 snippet of Emacs Lisp in your init file (e.g. {{{file(init.el)}}}):
135
136#+begin_src emacs-lisp
137(add-to-list 'load-path "~/.emacs.d/modus-themes")
138#+end_src
95 139
96Modus Operandi (light theme) and Modus Vivendi (dark) are normally 140The themes are now ready to be used: [[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]].
97distributed as standalone packages in Emacs-specific archives. There
98also exist packages for GNU/Linux distributions.
99 141
100** Install from the archives 142** Install from the archives
101:PROPERTIES: 143:properties:
102:CUSTOM_ID: h:c4b10085-149f-43e2-bd4d-347f33aee054 144:custom_id: h:c4b10085-149f-43e2-bd4d-347f33aee054
103:END: 145:end:
104 146
105=modus-operandi-theme= and =modus-vivendi-theme= are available from GNU the 147The =modus-themes= package is available from the GNU ELPA archive, which
106ELPA archive, which is configured by default. 148is configured by default.
107 149
108Prior to querying any package archive, make sure to have updated the 150Prior to querying any package archive, make sure to have updated the
109index, with =M-x package-refresh-contents=. Then all you need to do is 151index, with {{{kbd(M-x package-refresh-contents)}}}. Then all you need to do
110type =M-x package-install= and specify the theme of your choice. 152is type {{{kbd(M-x package-install)}}} and specify the ~modus-themes~.
153
154Note that older versions of the themes used to be distributed as
155standalone packages. This practice has been discontinued starting with
156version 1.0.0 of this project.
157
158Once installed, the themes are ready to be used: [[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]].
111 159
112** Install on GNU/Linux 160** Install on GNU/Linux
113:PROPERTIES: 161:properties:
114:CUSTOM_ID: h:da640eb1-95dd-4e86-bb4e-1027b27885f0 162:custom_id: h:da640eb1-95dd-4e86-bb4e-1027b27885f0
115:END: 163:end:
116 164
117The themes are also available from the archives of some GNU/Linux 165The themes are also available from the archives of some distributions of
118distributions. These should correspond to a tagged release rather than 166GNU/Linux. These should correspond to a tagged release rather than
119building directly from the latest Git commit. It all depends on the 167building directly from the latest Git commit. It all depends on the
120distro's packaging policies. 168distro's packaging policies.
121 169
122*** Debian 11 Bullseye 170*** Debian 11 Bullseye
123:PROPERTIES: 171:properties:
124:CUSTOM_ID: h:7e570360-9ee6-4bc5-8c04-9dc11418a3e4 172:custom_id: h:7e570360-9ee6-4bc5-8c04-9dc11418a3e4
125:END: 173:end:
126
127The two themes are distributed as a single package for Debian and its
128derivatives. Currently in the unstable and testing suites and should be
129available in time for Debian 11 Bullseye (next stable).
130 174
131Get them with: 175The themes are part of Debian 11 Bullseye. Get them with:
132 176
133#+begin_src sh 177#+begin_src sh
134sudo apt install elpa-modus-themes 178sudo apt install elpa-modus-themes
135#+end_src 179#+end_src
136 180
181They are now ready to be used: [[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]].
182
137*** GNU Guix 183*** GNU Guix
138:PROPERTIES: 184:properties:
139:CUSTOM_ID: h:a4ca52cd-869f-46a5-9e16-4d9665f5b88e 185:custom_id: h:a4ca52cd-869f-46a5-9e16-4d9665f5b88e
140:END: 186:end:
141 187
142Users of either the Guix System (the distro) or just Guix (the package 188Users of Guix can get the themes with this command:
143manager) can get each theme as a standalone package.
144 189
145#+begin_src sh 190#+begin_src sh
146guix package -i emacs-modus-operandi-theme 191guix package -i emacs-modus-themes
147#+end_src 192#+end_src
148 193
149And/or: 194They are now ready to be used: [[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]].
150
151#+begin_src sh
152guix package -i emacs-modus-vivendi-theme
153#+end_src
154 195
155* Enable and load 196* Enable and load
156:PROPERTIES: 197:properties:
157:CUSTOM_ID: h:3f3c3728-1b34-437d-9d0c-b110f5b161a9 198:custom_id: h:3f3c3728-1b34-437d-9d0c-b110f5b161a9
158:END: 199:end:
159 200#+findex: modus-themes-load-themes
160This section documents how to load the theme of your choice and how to 201#+findex: modus-themes-toggle
161further control its initialization. It also includes some sample code 202#+findex: modus-themes-load-operandi
162snippets that could help you in the task, especially if you intend to 203#+findex: modus-themes-load-vivendi
163use both Modus Operandi and Modus Vivendi. 204#+cindex: Essential configuration
205#+vindex: modus-themes-after-load-theme-hook
206
207Users of the built-in themes can load and automatically enable the theme
208of their preference by adding either form to their init file:
164 209
165** Load automatically 210#+begin_src emacs-lisp
166:PROPERTIES: 211(load-theme 'modus-operandi) ; Light theme
167:CUSTOM_ID: h:1777c247-1b56-46b7-a4ce-54e720b33d06 212(load-theme 'modus-vivendi) ; Dark theme
168:END: 213#+end_src
169 214
170A simple way to load the theme from your Emacs initialization file is to 215This is all one needs.
171include either of the following expressions:
172 216
173#+BEGIN_SRC emacs-lisp 217Users of packaged variants of the themes must add a few more lines to
174(load-theme 'modus-operandi t) ; Light theme 218ensure that everything works as intended. First, one has to require the
175(load-theme 'modus-vivendi t) ; Dark theme 219main library before loading either theme:
176#+END_SRC
177 220
178Make sure to remove any other theme that is being loaded, otherwise you 221#+begin_src emacs-lisp
179might run into unexpected issues. 222(require 'modus-themes)
223#+end_src
180 224
181Note that you can always =M-x disable-theme= and specify an item. The 225Then it is recommended to load the individual theme files with the
182command does exactly what its name suggests. To deactivate all enabled 226helper function ~modus-themes-load-themes~:
183themes at once, in case you have multiple of them enabled, you may
184evaluate the expression:
185 227
186#+begin_src emacs-lisp 228#+begin_src emacs-lisp
187(mapc #'disable-theme custom-enabled-themes) 229;; Load the theme files before enabling a theme (else you get an error).
230(modus-themes-load-themes)
188#+end_src 231#+end_src
189 232
190** Load at a given time or at sunset/sunrise 233Once the libraries that define the themes are enabled, one can activate
191:PROPERTIES: 234a theme with either of the following expressions:
192:CUSTOM_ID: h:4e936e31-e9eb-4b50-8fdd-45d827a03cca
193:END:
194
195It is possible to schedule a time during the day at or after which a
196given theme will be loaded.[fn:: Contributed on Reddit by user =b3n=,
197https://www.reddit.com/r/emacs/comments/gdtqov/weekly_tipstricketc_thread/fq9186h/.]
198 235
199#+begin_src emacs-lisp 236#+begin_src emacs-lisp
200;; Light for the day 237(modus-themes-load-operandi) ; Light theme
201(load-theme 'modus-operandi t t) 238;; OR
202(run-at-time "05:00" (* 60 60 24) 239(modus-themes-load-vivendi) ; Dark theme
203 (lambda ()
204 (enable-theme 'modus-operandi)))
205
206;; Dark for the night
207(load-theme 'modus-vivendi t t)
208(run-at-time "21:00" (* 60 60 24)
209 (lambda ()
210 (enable-theme 'modus-vivendi)))
211#+end_src 240#+end_src
212 241
213A modified version of the above technique is to use the sunrise and 242Changes to the available customization options must always be evaluated
214sunset as references, instead of specifying a fixed hour value.[fn:: 243before loading a theme ([[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization Options]]). This is how a basic
215Contributed directly by André Alexandre Gomes https://gitlab.com/aadcg.] 244setup could look like:
216If you set =calendar-latitude= and =calendar-longitude= (defined in the
217built-in =solar.el= library---read it with =M-x find-library=), you can
218automatically switch between both themes at the appropriate time-of-day.
219Note that /those calendar variables need to be set before loading the
220themes/.
221 245
222#+begin_src emacs-lisp 246#+begin_src emacs-lisp
223;; Define coordinates 247(require 'modus-themes)
224(setq calendar-latitude 35.17
225 calendar-longitude 33.36)
226 248
227;; Light at sunrise 249;; Your customisations here. For example:
228(load-theme 'modus-operandi t t) 250(setq modus-themes-bold-constructs t
229(run-at-time (nth 1 (split-string (sunrise-sunset))) 251 modus-themes-mode-line '3d)
230 (* 60 60 24)
231 (lambda ()
232 (enable-theme 'modus-operandi)))
233 252
234;; Dark at sunset 253;; Load the theme files before enabling a theme (else you get an error).
235(load-theme 'modus-vivendi t t) 254(modus-themes-load-themes)
236(run-at-time (nth 4 (split-string (sunrise-sunset)))
237 (* 60 60 24)
238 (lambda ()
239 (enable-theme 'modus-vivendi)))
240#+end_src
241 255
242For the sake of completeness, the =load-theme= call in these snippets is 256;; Enable the theme of your preference:
243slightly different than the one shown in [[#h:1777c247-1b56-46b7-a4ce-54e720b33d06][Load automatically]], because it 257(modus-themes-load-operandi)
244does not enable the theme directly: the subsequent =enable-theme= does
245that when needed.
246 258
247** Toggle between the themes on demand 259;; Optionally add a key binding for the toggle between the themes:
248:PROPERTIES: 260(define-key global-map (kbd "<f5>") #'modus-themes-toggle)
249:CUSTOM_ID: h:2a0895a6-3281-4e55-8aa1-8a737555821e 261#+end_src
250:END:
251 262
252With both themes available, it is possible to design a simple command to 263[[#h:e979734c-a9e1-4373-9365-0f2cd36107b8][Sample configuration for use-package]].
253switch between them on demand.
254 264
255#+begin_src emacs-lisp 265With those granted, bear in mind a couple of technical points on
256(defun modus-themes-toggle () 266~modus-themes-load-operandi~ and ~modus-themes-load-vivendi~, as well as
257 "Toggle between `modus-operandi' and `modus-vivendi' themes." 267~modus-themes-toggle~ which relies on them:
258 (interactive)
259 (if (eq (car custom-enabled-themes) 'modus-operandi)
260 (progn
261 (disable-theme 'modus-operandi)
262 (load-theme 'modus-vivendi t))
263 (disable-theme 'modus-vivendi)
264 (load-theme 'modus-operandi t)))
265#+end_src
266 268
267You could use =(mapc #'disable-theme custom-enabled-themes)= instead of 2691. Those functions call ~load-theme~. Some users prefer to opt for
268disabling a single target, but you get the idea. 270 ~enable-theme~ instead ([[#h:e68560b3-7fb0-42bc-a151-e015948f8a35][Differences between loading and enabling]]).
269 271
270** Configure options prior to loading 2722. The functions will run the ~modus-themes-after-load-theme-hook~ as
271:PROPERTIES: 273 their final step. This can be employed for bespoke configurations
272:CUSTOM_ID: h:a897b302-8e10-4a26-beab-3caaee1e1193 274 ([[#h:f4651d55-8c07-46aa-b52b-bed1e53463bb][Advanced customization (do-it-yourself)]]). Experienced users may not
273:END: 275 wish to rely on such a hook and the functions that run it: they may
276 prefer a custom solution ([[#h:86f6906b-f090-46cc-9816-1fe8aeb38776][A theme-agnostic hook for theme loading]]).
274 277
275If you plan to use both themes and wish to apply styles consistently 278** Sample configuration for use-package
276(see [[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization Options]]), you could define wrapper functions around 279:properties:
277the standard =load-theme= command. These extend the simple function we 280:custom_id: h:e979734c-a9e1-4373-9365-0f2cd36107b8
278presented in [[#h:2a0895a6-3281-4e55-8aa1-8a737555821e][Toggle between the themes on demand]]. 281:end:
282#+cindex: use-package configuration
279 283
280Here is a comprehensive setup (the values assigned to the variables are 284It is common for Emacs users to rely on ~use-package~ for declaring
281just for the sake of this demonstration):[fn:: The =defmacro= and =dolist= 285package configurations in their setup. We use this as an example:
282method were contributed on Reddit by user =b3n=
283https://www.reddit.com/r/emacs/comments/gqsz8u/weekly_tipstricketc_thread/fsfakhg/.]
284 286
285#+begin_src emacs-lisp 287#+begin_src emacs-lisp
286(defmacro modus-themes-format-sexp (sexp &rest objects) 288(use-package modus-themes
287 `(eval (read (format ,(format "%S" sexp) ,@objects)))) 289 :ensure ; omit this to use the built-in themes
288 290 :init
289(dolist (theme '("operandi" "vivendi")) 291 ;; Add all your customizations prior to loading the themes
290 (modus-themes-format-sexp 292 (setq modus-themes-slanted-constructs t
291 (defun modus-%1$s-theme-load () 293 modus-themes-bold-constructs nil)
292 (setq modus-%1$s-theme-slanted-constructs t 294
293 modus-%1$s-theme-bold-constructs t 295 ;; Load the theme files before enabling a theme (else you get an error).
294 modus-%1$s-theme-fringes 'subtle ; {nil,'subtle,'intense} 296 (modus-themes-load-themes)
295 modus-%1$s-theme-mode-line '3d ; {nil,'3d,'moody} 297 :config
296 modus-%1$s-theme-syntax 'alt-syntax ; {nil,faint,'yellow-comments,'green-strings,'yellow-comments-green-strings,'alt-syntax,'alt-syntax-yellow-comments} 298 ;; Load the theme of your choice:
297 modus-%1$s-theme-intense-hl-line nil 299 (modus-themes-load-operandi) ;; OR (modus-themes-load-vivendi)
298 modus-%1$s-theme-intense-paren-match nil 300 :bind ("<f5>" . modus-themes-toggle))
299 modus-%1$s-theme-links 'faint ; {nil,'faint,'neutral-underline,'faint-neutral-underline,'no-underline}
300 modus-%1$s-theme-no-mixed-fonts nil
301 modus-%1$s-theme-prompts nil ; {nil,'subtle,'intense}
302 modus-%1$s-theme-completions 'moderate ; {nil,'moderate,'opinionated}
303 modus-%1$s-theme-diffs nil ; {nil,'desaturated,'fg-only}
304 modus-%1$s-theme-org-blocks 'grayscale ; {nil,'grayscale,'rainbow}
305 modus-%1$s-theme-headings ; Read further below in the manual for this one
306 '((1 . section)
307 (2 . line)
308 (t . rainbow-line-no-bold))
309 modus-%1$s-theme-variable-pitch-headings nil
310 modus-%1$s-theme-scale-headings t
311 modus-%1$s-theme-scale-1 1.1
312 modus-%1$s-theme-scale-2 1.15
313 modus-%1$s-theme-scale-3 1.21
314 modus-%1$s-theme-scale-4 1.27
315 modus-%1$s-theme-scale-5 1.33)
316 (load-theme 'modus-%1$s t))
317 theme))
318
319(defun modus-themes-toggle ()
320 "Toggle between `modus-operandi' and `modus-vivendi' themes."
321 (interactive)
322 (if (eq (car custom-enabled-themes) 'modus-operandi)
323 (progn
324 (disable-theme 'modus-operandi)
325 (modus-vivendi-theme-load))
326 (disable-theme 'modus-vivendi)
327 (modus-operandi-theme-load)))
328#+end_src 301#+end_src
329 302
330* Customization Options 303[[#h:e68560b3-7fb0-42bc-a151-e015948f8a35][Differences between loading and enabling]].
331:PROPERTIES: 304
332:CUSTOM_ID: h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f 305Note: make sure not to customize the variable ~custom-theme-load-path~
333:END: 306or ~custom-theme-directory~ after the themes' package declaration. That
334 307will lead to failures in loading the files. If either or both of those
335The Modus themes are highly configurable, though they should work well 308variables need to be changed, their values should be defined before the
336without any further tweaks. 309package declaration of the themes.
337 310
338By default, all customization options are set to =nil=. 311** Differences between loading and enabling
339 312:properties:
340All customization options need to be evaluated before loading their 313:custom_id: h:e68560b3-7fb0-42bc-a151-e015948f8a35
341theme (see [[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]]). 314:end:
315#+cindex: load-theme VS enable-theme
316
317The reason we recommend ~load-theme~ instead of the other option of
318~enable-theme~ is that the former does a kind of "reset" on the face
319specs. It quite literally loads (or re-loads) the theme. Whereas the
320latter simply puts an already loaded theme at the top of the list of
321enabled items, re-using whatever state was last loaded.
322
323As such, ~load-theme~ reads all customizations that may happen during
324any given Emacs session: even after the initial setup of a theme.
325Examples are calls to ~custom-set-faces~, as well as new values assigned
326to the options the Modus themes provide ([[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization Options]]).
327
328Our tests show that ~enable-theme~ does not read such variables anew, so
329it might appear to the unsuspecting user that the themes are somehow
330broken whenever they try to assign a new value to a customization option
331or some face.
332
333This "reset" that ~load-theme~ conducts does, however, come at the cost
334of being somewhat slower than ~enable-theme~. Users who have a stable
335setup and who seldom update their variables during a given Emacs
336session, are better off using something like this:
342 337
343** Option for more bold constructs 338#+begin_src emacs-lisp
344:PROPERTIES: 339(require 'modus-themes)
345:ALT_TITLE: Bold constructs 340(load-theme 'modus-operandi t t)
346:DESCRIPTION: Toggle bold constructs in code 341(load-theme 'modus-vivendi t t)
347:CUSTOM_ID: h:b25714f6-0fbe-41f6-89b5-6912d304091e
348:END:
349
350Symbol names:
351
352+ =modus-operandi-theme-bold-constructs=
353+ =modus-vivendi-theme-bold-constructs=
354 342
355Possible values: 343(enable-theme 'modus-operandi) ;; OR (enable-theme 'modus-vivendi)
344#+end_src
356 345
3571. =nil= (default) 346[[#h:e979734c-a9e1-4373-9365-0f2cd36107b8][Sample configuration for use-package]].
3582. =t=
359 347
360Display several constructs in bold weight. This concerns keywords and 348With the above granted, other sections of the manual discuss how to
361other important aspects of code syntax. It also affects certain mode 349configure custom faces, where ~load-theme~ is expected, though
362line indicators and command-line prompts. 350~enable-theme~ could still apply in stable setups:
363 351
364The default is to only use a bold weight when it is required. 352[[#h:1487c631-f4fe-490d-8d58-d72ffa3bd474][Case-by-case face specs using the themes' palette]].
365 353
366Additionally, and while not necessary, to define the precise weight for 354[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]].
367bold constructs, you can change the typographic intensity of the =bold=
368face. The standard is a bold weight. It requires no further
369intervention. Assuming though that your typeface of choice supports a
370"semibold" weight, adding the following snippet to your init file should
371suffice.
372 355
373#+begin_src emacs-lisp 356* Customization Options
374(set-face-attribute 'bold nil :weight 'semibold) 357:properties:
375#+end_src 358:custom_id: h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f
359:end:
376 360
377Note that if you are switching themes, you need to re-evaluate this 361The Modus themes are highly configurable, though they should work well
378expression after the new theme is loaded. 362without any further tweaks. By default, all customization options are
363set to nil.
379 364
380** Option for more slanted constructs 365Remember that all customization options must be evaluated before loading
381:PROPERTIES: 366a theme ([[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]]).
382:ALT_TITLE: Slanted constructs
383:DESCRIPTION: Toggle slanted constructs (italics) in code
384:CUSTOM_ID: h:977c900d-0d6d-4dbb-82d9-c2aae69543d6
385:END:
386 367
387Symbol names: 368** Option for more bold constructs
369:properties:
370:alt_title: Bold constructs
371:description: Toggle bold constructs in code
372:custom_id: h:b25714f6-0fbe-41f6-89b5-6912d304091e
373:end:
374#+vindex: modus-themes-bold-constructs
388 375
389+ =modus-operandi-theme-slanted-constructs= 376Symbol: ~modus-themes-bold-constructs~
390+ =modus-vivendi-theme-slanted-constructs=
391 377
392Possible values: 378Possible values:
393 379
3941. =nil= (default) 3801. =nil= (default)
3952. =t= 3812. =t=
396 382
397Choose to render more faces in slanted text (italics). This typically 383The default is to use a bold typographic weight only when it is
398affects documentation strings and code comments. 384required.
399
400The default is to not use italics unless it is absolutely necessary.
401 385
402** Option for faint code syntax highlighting (deprecated for ~0.14.0~) 386With a non-nil value (=t=) display several syntactic constructs in bold
403:PROPERTIES: 387weight. This concerns keywords and other important aspects of code
404:ALT_TITLE: Faint syntax 388syntax. It also affects certain mode line indicators and command-line
405:DESCRIPTION: Toggle subtle coloration in code (deprecated for 0.14.0) 389prompts.
406:CUSTOM_ID: h:741379fe-7203-4dad-a7f8-ab71f61b43e6
407:END:
408 390
409Symbol names: 391** Option for more slanted constructs
392:properties:
393:alt_title: Slanted constructs
394:description: Toggle slanted constructs (italics) in code
395:custom_id: h:977c900d-0d6d-4dbb-82d9-c2aae69543d6
396:end:
397#+vindex: modus-themes-slanted-constructs
410 398
411+ =modus-operandi-theme-faint-syntax= 399Symbol: ~modus-themes-slanted-constructs~
412+ =modus-vivendi-theme-faint-syntax=
413 400
414Possible values: 401Possible values:
415 402
4161. =nil= (default) 4031. =nil= (default)
4172. =t= 4042. =t=
418 405
419Use less saturated colors in programming modes for highlighting code 406The default is to not use slanted text (italics) unless it is absolutely
420syntax. The default is to use saturated colors. 407necessary.
421 408
422This option essentially affects the font-lock faces, so it may also have 409With a non-nil value (=t=) choose to render more faces in slanted text.
423implications in other places that are hard-wired to rely directly on 410This typically affects documentation strings and code comments.
424them instead of specifying their own faces (which could inherit from
425font-lock if that is the intent). The author is aware of =vc-dir= as a
426case in point.
427 411
428** Option for syntax highlighting 412** Option for syntax highlighting
429:PROPERTIES: 413:properties:
430:ALT_TITLE: Syntax styles 414:alt_title: Syntax styles
431:DESCRIPTION: Choose the overall aesthetic of code syntax 415:description: Choose the overall aesthetic of code syntax
432:CUSTOM_ID: h:c119d7b2-fcd4-4e44-890e-5e25733d5e52 416:custom_id: h:c119d7b2-fcd4-4e44-890e-5e25733d5e52
433:END: 417:end:
434 418#+vindex: modus-themes-syntax
435This option supersedes the "faint syntax" one ahead of version =0.14.0=
436([[#h:741379fe-7203-4dad-a7f8-ab71f61b43e6][Option for faint code syntax highlighting]]).
437 419
438Symbol names: 420Symbol: ~modus-themes-syntax~
439
440+ =modus-operandi-theme-syntax=
441+ =modus-vivendi-theme-syntax=
442 421
443Possible values: 422Possible values:
444 423
4451. =nil= (default) 4241. =nil= (default)
4462. =faint= 4252. ~faint~
4473. =yellow-comments= 4263. ~yellow-comments~
4484. =green-strings= 4274. ~green-strings~
4495. =yellow-comments-green-strings= 4285. ~yellow-comments-green-strings~
4506. =alt-syntax= 4296. ~alt-syntax~
4517. =alt-syntax-yellow-comments= 4307. ~alt-syntax-yellow-comments~
4318. ~faint-yellow-comments~
452 432
453The default style (nil) for code syntax highlighting is a balanced 433The default style (nil) for code syntax highlighting is a balanced
454combination of colors on the cyan-blue-magenta side of the spectrum. 434combination of colors on the cyan-blue-magenta side of the spectrum.
455There is little to no use of greens, yellows, or reds, except when it is 435There is little to no use of greens, yellows, or reds, except when it is
456necessary. 436necessary.
457 437
458Option =faint= is like the default in terms of the choice of palette but 438Option ~faint~ is like the default in terms of the choice of palette but
459applies desaturated color values. 439applies desaturated color values.
460 440
461Option =yellow-comments= applies a yellow tint to comments. The rest of 441Option ~yellow-comments~ adds a yellow tint to comments. The rest of the
462the syntax is the same as the default. 442syntax is the same as the default.
463 443
464Option =green-strings= replaces the blue/cyan/cold color variants in 444Option ~green-strings~ replaces the blue/cyan/cold color variants in
465strings with greener alternatives. The rest of the syntax remains the 445strings with greener alternatives. The rest of the syntax remains the
466same. 446same.
467 447
468Option =yellow-comments-green-strings= combines yellow comments with green 448Option ~yellow-comments-green-strings~ combines yellow comments with green
469strings and the rest of the default syntax highlighting style. 449strings and the rest of the default syntax highlighting style.
470 450
471Option =alt-syntax= expands the color palette and applies new color 451Option ~alt-syntax~ expands the active spectrum by applying color
472combinations. Strings are green. Doc strings are magenta tinted. 452combinations with more contrasting hues between them. Expect to find
473Comments are gray. 453red and green variants in addition to cyan, blue, magenta.
474 454
475Option =alt-syntax-yellow-comments= combines =alt-syntax= with 455Option ~alt-syntax-yellow-comments~ combines ~alt-syntax~ with
476=yellow-comments=. 456~yellow-comments~.
477 457
478** Option for no font mixing 458Option ~faint-yellow-comments~ combines the ~faint~ style with
479:PROPERTIES: 459~yellow-comments~.
480:ALT_TITLE: No mixed fonts
481:DESCRIPTION: Toggle mixing of font families
482:CUSTOM_ID: h:115e6c23-ee35-4a16-8cef-e2fcbb08e28b
483:END:
484 460
485Symbol names: 461** Option for no font mixing
462:properties:
463:alt_title: No mixed fonts
464:description: Toggle mixing of font families
465:custom_id: h:115e6c23-ee35-4a16-8cef-e2fcbb08e28b
466:end:
467#+vindex: modus-themes-no-mixed-fonts
486 468
487+ =modus-operandi-theme-no-mixed-fonts= 469Symbol: ~modus-themes-no-mixed-fonts~
488+ =modus-vivendi-theme-no-mixed-fonts=
489 470
490Possible values: 471Possible values:
491 472
4921. =nil= (default) 4731. =nil= (default)
4932. =t= 4742. =t=
494 475
495By default, the themes configure some spacing-sensitive faces, such as 476By default, the themes configure some spacing-sensitive faces like Org
496Org tables and code blocks, to always inherit from the =fixed-pitch= face. 477tables and code blocks to always inherit from the ~fixed-pitch~ face.
497This is to ensure that those constructs remain monospaced when users opt 478This is to ensure that those constructs remain monospaced even when
498for something like the built-in =M-x variable-pitch-mode=. Otherwise the 479users opt for a mode that remaps typeface families, such as the built-in
499layout would appear broken. To disable this behaviour, set the option 480{{{kbd(M-x variable-pitch-mode)}}}. Otherwise the layout would appear
500to =t=. 481broken, due to how spacing is done. To disable this behaviour, set the
482option to =t=.
501 483
502Users may prefer to use another package for handling mixed typeface 484Users may prefer to use another package for handling mixed typeface
503configurations, rather than letting the theme do it, perhaps because a 485configurations, rather than letting the theme do it, perhaps because a
504purpose-specific package has extra functionality. Two possible options 486purpose-specific package has extra functionality. Two possible options
505are =org-variable-pitch= and =mixed-pitch=. 487are ~org-variable-pitch~ and ~mixed-pitch~.
506
507** Option for no link underline (deprecated for ~0.14.0~)
508:PROPERTIES:
509:ALT_TITLE: Link underline
510:DESCRIPTION: Toggle underlined text in links (deprecated for 0.14.0)
511:CUSTOM_ID: h:a1a639e9-d247-414c-a0ad-08adadcbc6c1
512:END:
513
514Note: deprecated ahead of version =0.14.0= ([[#h:c119d7b2-fcd4-4e44-890e-5e25733d5e52][Option for links]]).
515
516Symbol names:
517
518+ =modus-operandi-theme-no-link-underline=
519+ =modus-vivendi-theme-no-link-underline=
520
521Possible values:
522
5231. =nil= (default)
5242. =t=
525 488
526Remove the underline effect from links, symbolic links, and buttons. 489[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org (and others)]].
527The default is to apply an underline.
528 490
529** Option for links 491** Option for links
530:PROPERTIES: 492:properties:
531:ALT_TITLE: Link styles 493:alt_title: Link styles
532:DESCRIPTION: Choose color intensity or no underline for links 494:description: Choose among several styles, with or without underline
533:CUSTOM_ID: h:c119d7b2-fcd4-4e44-890e-5e25733d5e52 495:custom_id: h:c119d7b2-fcd4-4e44-890e-5e25733d5e52
534:END: 496:end:
535 497#+vindex: modus-themes-links
536This option supersedes the "no link underline" one ahead of version
537=0.14.0= ([[#h:a1a639e9-d247-414c-a0ad-08adadcbc6c1][Option for no link underline]]).
538
539Symbol names:
540 498
541+ =modus-operandi-theme-links= 499Symbol: ~modus-themes-links~
542+ =modus-vivendi-theme-links=
543 500
544Possible values: 501Possible values:
545 502
5461. =nil= (default) 5031. =nil= (default)
5472. =faint= 5042. ~faint~
5483. =neutral-underline= 5053. ~neutral-underline~
5494. =faint-neutral-underline= 5064. ~faint-neutral-underline~
5505. =no-underline= 5075. ~no-underline~
5086. ~underline-only~
5097. ~neutral-underline-only~
551 510
552The default style (nil) for links is to apply an underline and a 511The default style (nil) for links is to apply an underline and a
553saturated color to the affected text. The color of the two is the 512saturated color to the affected text. The color of the two is the same,
554same, which makes the link fairly prominent. 513which makes the link fairly prominent.
555 514
556Option =faint= follows the same approach as the default, but uses less 515Option ~faint~ follows the same approach as the default, but uses less
557intense colors. 516intense colors.
558 517
559Option =neutral-underline= changes the underline's color to a subtle 518Option ~neutral-underline~ changes the underline's color to a subtle gray,
560gray, while retaining the default text color. 519while retaining the default text color.
561 520
562Option =faint-neutral-underline= combines a desaturated text color with a 521Option ~faint-neutral-underline~ combines a desaturated text color with a
563subtle gray underline. 522subtle gray underline.
564 523
565Option =no-underline= removes link underlines altogether, while keeping 524Option ~no-underline~ removes link underlines altogether, while retaining
566their text color the same as the default. 525their original fairly vivid color.
567 526
568** Option for command prompt styles 527Option ~underline-only~ applies a prominent underline while making the
569:PROPERTIES: 528affected text colorless (it uses the same foreground as the theme's
570:ALT_TITLE: Command prompts 529default).
571:DESCRIPTION: Choose among plain, subtle, or intense prompts 530
572:CUSTOM_ID: h:db5a9a7c-2928-4a28-b0f0-6f2b9bd52ba1 531Option ~neutral-underline-only~ makes the text colorless while using a
573:END: 532subtle gray underline below it.
574 533
575Symbol names: 534NOTE: The placement of the underline, i.e. its proximity to the affected
535text, is controlled by the built-in ~x-underline-at-descent-line~,
536~x-use-underline-position-properties~, ~underline-minimum-offset~. Please
537refer to their documentation strings.
576 538
577+ =modus-operandi-theme-prompts= 539** Option for command prompt styles
578+ =modus-vivendi-theme-prompts= 540:properties:
541:alt_title: Command prompts
542:description: Choose among plain, subtle, or intense prompts
543:custom_id: h:db5a9a7c-2928-4a28-b0f0-6f2b9bd52ba1
544:end:
545#+vindex: modus-themes-prompts
546
547Symbol: ~modus-themes-prompts~
579 548
580Possible values: 549Possible values:
581 550
5821. =nil= (default) 5511. =nil= (default)
5832. =subtle= 5522. ~subtle-accented~ (~subtle~ exists for backward compatibility)
5843. =intense= 5533. ~intense-accented~ (~intense~ exists for backward compatibility)
5544. ~subtle-gray~
5555. ~intense-gray~
585 556
586The symbols "subtle" and "intense" will apply a combination of accented 557The default does not use any background for minibuffer and command line
587background and foreground to the minibuffer and other REPL prompts (like 558prompts. It relies exclusively on an accented foreground color.
588=M-x shell= and =M-x eshell=). The difference between the two is that the
589latter has a more pronounced/noticeable effect than the former.
590 559
591The default does not use any background for such prompts, while relying 560Options ~subtle-accented~ and ~intense-accented~ will change both the
592exclusively on an accented foreground color. 561background and the foreground values to use accented color combinations
562that follow the hue of the default styles' foreground (e.g. the default
563minibuffer prompt is cyan text, so these combinations will involved a
564cyan background and an appropriate cyan foreground). The difference
565between the two is that the latter has a more pronounced/noticeable
566effect than the former.
593 567
594** Option for mode line presentation 568Options ~subtle-gray~, ~intense-gray~ are like their accented counterparts,
595:PROPERTIES: 569except they use grayscale values.
596:ALT_TITLE: Mode line
597:DESCRIPTION: Choose among plain, three-dimension, or moody-compliant styles
598:CUSTOM_ID: h:27943af6-d950-42d0-bc23-106e43f50a24
599:END:
600 570
601Symbol names: 571** Option for mode line presentation
572:properties:
573:alt_title: Mode line
574:description: Choose among several styles, with or without borders
575:custom_id: h:27943af6-d950-42d0-bc23-106e43f50a24
576:end:
577#+vindex: modus-themes-mode-line
602 578
603+ =modus-operandi-theme-mode-line= 579Symbol: ~modus-themes-mode-line~
604+ =modus-vivendi-theme-mode-line=
605 580
606Possible values: 581Possible values:
607 582
6081. =nil= (default) 5831. =nil= (default)
6092. =3d= 5842. ~3d~
6103. =moody= 5853. ~moody~
611 5864. ~borderless~
612The default value (=nil=) produces a two-dimensional effect both for the 5875. ~borderless-3d~
613active and inactive modelines. The differences between the two are 5886. ~borderless-moody~
614limited to distinct shades of grayscale values, with the active being 589
615more intense than the inactive. 590The default produces a two-dimensional effect both for the active and
616 591inactive modelines. The differences between the two are limited to
617A =3d= symbol will make the active modeline look like a three-dimensional 592distinct shades of grayscale values, with the active being more intense
593than the inactive.
594
595Option ~3d~ will make the active modeline look like a three-dimensional
618rectangle. Inactive modelines remain 2D, though they are slightly toned 596rectangle. Inactive modelines remain 2D, though they are slightly toned
619down relative to the default. This aesthetic is the same as what you 597down relative to the default. This aesthetic is virtually the same as
620get when you run Emacs without any customizations (=emacs -Q= on the 598what you get when you run Emacs without any customizations (=emacs -Q= on
621command line). 599the command line).
622 600
623While =moody= removes all box effects from the modelines and applies 601While ~moody~ removes all box effects from the modelines and applies
624underline and overline properties instead. It also tones down a bit the 602underline and overline properties instead. It also tones down a bit the
625inactive modelines. This is meant to optimize things for use with the 603inactive modelines. This is meant to optimize things for use with the
626[[https://github.com/tarsius/moody][moody package]] (hereinafter referred to as "Moody"), though it can work 604[[https://github.com/tarsius/moody][moody package]] (hereinafter referred to as "Moody"), though it can work
627fine even without it. 605fine even without it.
628 606
607The ~borderless~ option uses the same colors as the default (nil value),
608but removes the border effect. This is done by making the box property
609use the same color as the background, effectively blending the two and
610creating some padding.
611
612The ~borderless-3d~ and ~borderless-moody~ approximate the ~3d~ and ~moody~
613options respectively, while removing the borders. However, to ensure
614that the inactive modelines remain visible, they apply a slightly more
615prominent background to them than what their counterparts do (same
616inactive background as with the default).
617
629Note that Moody does not expose any faces that the themes could style 618Note that Moody does not expose any faces that the themes could style
630directly. Instead it re-purposes existing ones to render its tabs and 619directly. Instead it re-purposes existing ones to render its tabs and
631ribbons. As such, there may be cases where the contrast ratio falls 620ribbons. As such, there may be cases where the contrast ratio falls
632below the 7:1 target that the themes conform with (WCAG AAA). To hedge 621below the 7:1 target that the themes conform with (WCAG AAA). To hedge
633against this, we configure a fallback foreground for the =moody= option, 622against this, we configure a fallback foreground for the ~moody~ option,
634which will come into effect when the background of the modeline changes 623which will come into effect when the background of the modeline changes
635to something less accessible, such as Moody ribbons (read the doc string 624to something less accessible, such as Moody ribbons (read the doc string
636of =set-face-attribute=, specifically =:distant-foreground=). This fallback 625of ~set-face-attribute~, specifically ~:distant-foreground~). This fallback
637comes into effect when Emacs determines that the background and 626is activated when Emacs determines that the background and foreground of
638foreground of the given construct are too close to each other in terms 627the given construct are too close to each other in terms of color
639of color distance. In effect, users would need to experiment with the 628distance. In effect, users would need to experiment with the variable
640variable =face-near-same-color-threshold= to trigger the fallback color. 629~face-near-same-color-threshold~ to trigger the effect. We find that a
641We find that a value of =45000= would suffice, contrary to the default 630value of =45000= will suffice, contrary to the default =30000=. Do not set
642=30000=. Do not set the value too high, because that would have the 631the value too high, because that would have the adverse effect of always
643adverse effect of always overriding the default color (which has been 632overriding the default color (which has been carefully designed to be
644carefully designed to be highly accessible). 633highly accessible).
645 634
646Furthermore, because Moody expects an underline and overline instead of 635Furthermore, because Moody expects an underline and overline instead of
647a box style, it is recommended you also include this in your setup: 636a box style, it is advised you include this in your setup:
648 637
649#+begin_src emacs-lisp 638#+begin_src emacs-lisp
650(setq x-underline-at-descent-line t) 639(setq x-underline-at-descent-line t)
651#+end_src 640#+end_src
652 641
653** Option for completion framework aesthetics 642** Option for completion framework aesthetics
654:PROPERTIES: 643:properties:
655:ALT_TITLE: Completion UIs 644:alt_title: Completion UIs
656:DESCRIPTION: Choose among standard, moderate, or opinionated looks 645:description: Choose among standard, moderate, or opinionated looks
657:CUSTOM_ID: h:f1c20c02-7b34-4c35-9c65-99170efb2882 646:custom_id: h:f1c20c02-7b34-4c35-9c65-99170efb2882
658:END: 647:end:
659 648#+vindex: modus-themes-completions
660Symbol names:
661 649
662+ =modus-operandi-theme-completions= 650Symbol: ~modus-themes-completions~
663+ =modus-vivendi-theme-completions=
664 651
665Possible values: 652Possible values:
666 653
6671. =nil= (default) 6541. =nil= (default)
6682. =moderate= 6552. ~moderate~
6693. =opinionated= 6563. ~opinionated~
670 657
671This is a special option that has different effects depending on the 658This is a special option that has different effects depending on the
672completion UI. The interfaces can be grouped in two categories, based 659completion UI. The interfaces can be grouped in two categories, based
@@ -679,512 +666,1008 @@ Ivy, and similar.
679 666
680A value of =nil= will respect the metaphors of each completion framework. 667A value of =nil= will respect the metaphors of each completion framework.
681 668
682The symbol =moderate= will apply a combination of background and 669Option ~moderate~ applies a combination of background and foreground that
683foreground that is fairly subtle. For Icomplete and friends this 670is fairly subtle. For Icomplete and friends this constitutes a
684constitutes a departure from their default aesthetics, however the 671departure from their default aesthetics, however the difference is
685difference is small. While Helm et al will appear slightly different 672small. While Helm, Ivy et al appear slightly different than their
686than their original looks, as they are toned down a bit. 673original looks, as they are toned down a bit.
687 674
688The symbol =opinionated= will apply color combinations that refashion the 675Option ~opinionated~ uses color combinations that refashion the completion
689completion UI. For the Icomplete camp this means that intense 676UI. For the Icomplete camp this means that intense background and
690background and foreground combinations are used: in effect their looks 677foreground combinations are used: in effect their looks emulate those of
691emulate those of Ivy and co. in their original style. Whereas the other 678Helm, Ivy and co. in their original style. Whereas the other group of
692group of packages will revert to an even more nuanced aesthetic with 679packages will revert to an even more nuanced aesthetic with some
693some additional changes to the choice of hues. 680additional changes to the choice of hues.
694 681
695To appreciate the scope of this customization option, you should spend 682To appreciate the scope of this customization option, you should spend
696some time with every one of the =nil= (default), =moderate=, and =opinionated= 683some time with every one of the =nil= (default), ~moderate~, and ~opinionated~
697possibilities. 684possibilities.
698 685
699** Option for fringe visibility 686** Option for fringe visibility
700:PROPERTIES: 687:properties:
701:ALT_TITLE: Fringes 688:alt_title: Fringes
702:DESCRIPTION: Choose among plain, subtle, or intense fringe visibility 689:description: Choose among invisible, subtle, or intense fringe styles
703:CUSTOM_ID: h:1983c3fc-74f6-44f3-b917-967c403bebae 690:custom_id: h:1983c3fc-74f6-44f3-b917-967c403bebae
704:END: 691:end:
692#+vindex: modus-themes-fringes
705 693
706Symbol names: 694Symbol: ~modus-themes-fringes~
707
708+ =modus-operandi-theme-fringes=
709+ =modus-vivendi-theme-fringes=
710 695
711Possible values: 696Possible values:
712 697
7131. =nil= (default) 6981. =nil= (default)
7142. =subtle= 6992. ~subtle~
7153. =intense= 7003. ~intense~
716
717The "subtle" symbol will apply a grayscale background that is visible,
718yet close enough to the main background color. While the "intense"
719symbol will use a more noticeable grayscale background.
720 701
721The default is to use the same color as that of the main background, 702The default is to use the same color as that of the main background,
722meaning that the fringes are not obvious though they still occupy the 703meaning that the fringes are not obvious though they still occupy the
723space given to them by =fringe-mode=. 704space given to them by ~fringe-mode~.
724 705
725** Option for line highlighting (hl-line-mode) 706Options ~subtle~ and ~intense~ apply a gray background, making the fringes
726:PROPERTIES: 707visible. The difference between the two is one of degree, as their
727:ALT_TITLE: Line highlighting 708names imply.
728:DESCRIPTION: Toggle intense style for current line highlighting
729:CUSTOM_ID: h:1dba1cfe-d079-4c13-a810-f768e8789177
730:END:
731 709
732Symbol names: 710** Option for language checkers
711:properties:
712:alt_title: Language checkers
713:description: Control the style of language checkers/linters
714:custom_id: h:4b13743a-8ebf-4d2c-a043-cceba10b1eb4
715:end:
716#+vindex: modus-themes-lang-checkers
733 717
734+ =modus-operandi-theme-intense-hl-line= 718Symbol: ~modus-themes-lang-checkers~
735+ =modus-vivendi-theme-intense-hl-line= 719
720Possible values:
721
7221. =nil= (default)
7232. ~subtle-foreground~
7243. ~intense-foreground~
7254. ~straight-underline~
7265. ~subtle-foreground-straight-underline~
7276. ~intense-foreground-straight-underline~
7287. ~colored-background~
729
730Nil (the default) applies a color-coded underline to the affected text,
731while it leaves the original foreground in tact. If the display spec
732where Emacs runs in has support for it (e.g. Emacs GUI), the underline's
733style is that of a wave, otherwise it is a straight line.
734
735Options ~subtle-foreground~ and ~intense-foreground~ follow the same
736color-coding pattern and wavy underline of the default, while extending
737it with a corresponding foreground value for the affected text. The
738difference between the two options is one of degree, as their names
739suggest.
740
741Option ~straight-underline~ is like the default but always applies a
742straight line under the affected text. Same principle for
743~subtle-foreground-straight-underline~ and its counterpart
744~intense-foreground-straight-underline~.
745
746Option ~colored-background~ uses a straight underline, a tinted
747background, and a suitable foreground. All are color-coded. This is
748the most intense combination of face properties.
749
750The present variable affects packages and/or face groups such as those
751of =flyspell=, =flymake=, =flycheck=, ~artbollocks-mode~, and ~writegood-mode~.
752
753NOTE: The placement of the straight underline, though not the wave
754style, is controlled by the built-in ~x-underline-at-descent-line~,
755~x-use-underline-position-properties~, ~underline-minimum-offset~. Please
756refer to their documentation strings.
757
758** Option for line highlighting (hl-line-mode)
759:properties:
760:alt_title: Line highlighting
761:description: Toggle intense style for current line highlighting
762:custom_id: h:1dba1cfe-d079-4c13-a810-f768e8789177
763:end:
764#+vindex: modus-themes-intense-hl-line
765
766Symbol: ~modus-themes-intense-hl-line~
736 767
737Possible values: 768Possible values:
738 769
7391. =nil= (default) 7701. =nil= (default)
7402. =t= 7712. =t=
741 772
742Draw the current line of =hl-line-mode= or its global equivalent in a more 773The default is to use a subtle gray background for ~hl-line-mode~ and its
743prominent background color. This would also affect several packages 774global equivalent.
744that enable =hl-line-mode=, such as =elfeed= and =mu4e=.
745 775
746The default is to use a more subtle gray. 776With a non-nil value (=t=) use a more prominent background color instead.
777
778This affects several packages that enable ~hl-line-mode~, such as =elfeed=
779and =mu4e=.
780
781** Option for line numbers (display-line-numbers-mode)
782:properties:
783:alt_title: Line numbers
784:description: Toggle subtle style for line numbers
785:custom_id: h:8c4a6230-2e43-4aa2-a631-3b7179392e09
786:end:
787#+vindex: modus-themes-subtle-line-numbers
788
789Symbol: ~modus-themes-subtle-line-numbers~
790
791Possible value:
792
7931. =nil= (default)
7942. =t=
795
796The default style for ~display-line-numbers-mode~ and its global variant
797is to apply a subtle gray background to the line numbers. The current
798line has a more pronounced background and foreground combination to
799bring more attention to itself.
800
801Similarly, the faces for ~display-line-numbers-major-tick~ and its
802counterpart ~display-line-numbers-minor-tick~ use appropriate styles that
803involve a bespoke background and foreground combination.
804
805With a non-nil value (=t=), line numbers have no background of their own.
806Instead they retain the primary background of the theme, blending with
807the rest of the buffer. Foreground values for all relevant faces are
808updated to accommodate this aesthetic.
747 809
748** Option for parenthesis matching (show-paren-mode) 810** Option for parenthesis matching (show-paren-mode)
749:PROPERTIES: 811:properties:
750:ALT_TITLE: Matching parentheses 812:alt_title: Matching parentheses
751:DESCRIPTION: Toggle intense style for matching delimiters/parentheses 813:description: Choose between various styles for matching delimiters/parentheses
752:CUSTOM_ID: h:e66a7e4d-a512-4bc7-9f86-fbbb5923bf37 814:custom_id: h:e66a7e4d-a512-4bc7-9f86-fbbb5923bf37
753:END: 815:end:
816#+vindex: modus-themes-paren-match
817
818Symbol: ~modus-themes-paren-match~
819
820Possible values:
821
8221. =nil= (default)
8232. ~subtle-bold~
8243. ~intense~
8254. ~intense-bold~
754 826
755Symbol names: 827Nil means to use a subtle tinted background color for the matching
828delimiters.
756 829
757+ =modus-operandi-theme-intense-paren-match= 830Option ~intense~ applies a saturated background color.
758+ =modus-vivendi-theme-intense-paren-match= 831
832Option ~subtle-bold~ is the same as the default, but also makes use of
833bold typographic weight (inherits the ~bold~ face).
834
835Option ~intense-bold~ is the same as ~intense~, while it also uses a bold
836weight.
837
838This customization variable affects tools such as the built-in
839~show-paren-mode~ and the =smartparens= package.
840
841** Option for active region
842:properties:
843:alt_title: Active region
844:description: Choose between various styles for the active region
845:custom_id: h:60798063-b4ad-45ea-b9a7-ff7b5c0ab74c
846:end:
847#+vindex: modus-themes-region
848
849Symbol: ~modus-themes-region~
759 850
760Possible values: 851Possible values:
761 852
7621. =nil= (default) 8531. =nil= (default)
7632. =t= 8542. ~no-extend~
8553. ~bg-only~
8564. ~bg-only-no-extend~
764 857
765Apply a more intense background to the matching parentheses (or 858Nil means to only use a prominent gray background with a neutral
766delimiters). This affects tools such as the built-in =show-paren-mode=. 859foreground. The foreground overrides all syntax highlighting. The
767The default is to use a subtle warm color for the background of those 860region extends to the edge of the window.
768overlays.
769 861
770** Option for diff buffer looks 862Option ~no-extend~ preserves the default aesthetic but prevents the region
771:PROPERTIES: 863from extending to the edge of the window.
772:ALT_TITLE: Diffs 864
773:DESCRIPTION: Choose among intense, desaturated, or text-only diffs 865Option ~bg-only~ applies a faint tinted background that is distinct from
774:CUSTOM_ID: h:ea7ac54f-5827-49bd-b09f-62424b3b6427 866all others used in the theme, while it does not override any existing
775:END: 867colors. It extends to the edge of the window.
868
869Option ~bg-only-no-extend~ is a combination of the ~bg-only~ and ~no-extend~
870options.
776 871
777Symbol names: 872** Option for diff buffer looks
873:properties:
874:alt_title: Diffs
875:description: Choose among intense, desaturated, or text-only diffs
876:custom_id: h:ea7ac54f-5827-49bd-b09f-62424b3b6427
877:end:
878#+vindex: modus-themes-diffs
778 879
779+ =modus-operandi-theme-diffs= 880Symbol: ~modus-themes-diffs~
780+ =modus-vivendi-theme-diffs=
781 881
782Possible values: 882Possible values:
783 883
7841. =nil= (default) 8841. =nil= (default)
7852. =desaturated= 8852. ~desaturated~
7862. =fg-only= 8863. ~fg-only~
787 8874. ~bg-only~
788By default the themes will apply richly colored backgrounds to the 8885. ~deuteranopia~
789output of diffs, such as those of =diff-mode=, =ediff=, =smerge-mode=, and 889
790=magit=. These are color combinations of an accented background and 890By default the themes apply rich coloration to the output of diffs, such
791foreground so that, for example, added lines have a pronounced green 891as those of ~diff-mode~, ~ediff~, ~smerge-mode~, and Magit. These are
792background with an appropriate shade of green for the affected text. 892color combinations of an accented background and foreground so that, for
793Word-wise or "refined" changes follow this pattern but use different 893example, added lines have a pronounced green background with an
794shades of those colors to remain distinct. 894appropriate shade of green for the affected text. Word-wise or
795 895"refined" changes follow this pattern but use different shades of those
796A =desaturated= value tones down all relevant color values. It still 896colors to remain distinct.
897
898Option ~desaturated~ tones down all relevant color values. It still
797combines an accented background with an appropriate foreground, yet its 899combines an accented background with an appropriate foreground, yet its
798overall impression is very subtle. Refined changes are a bit more 900overall impression is fairly subtle. Refined changes are a bit more
799intense to fulfil their intended function, though still less saturated 901intense to fulfil their intended function, though still less saturated
800than default. 902than default.
801 903
802While =fg-only= will remove all accented backgrounds and instead rely on 904Option ~fg-only~ will remove most accented backgrounds and instead rely
803color-coded text to denote changes. For instance, added lines use an 905on color-coded text to denote changes. For instance, added lines use a
804intense green foreground, while their background is the same as the rest 906green foreground, while their background is the same as the rest of the
805of the buffer. Word-wise highlights still use a background value which 907buffer. Word-wise highlights still use a background value which is,
806is, nonetheless, more subtle than its default equivalent. 908nonetheless, more subtle than its default equivalent.
807 909
808Concerning =magit=, an extra set of tweaks are introduced for the effect 910Option ~bg-only~ applies color-coded backgrounds but does not override
809of highlighting the current diff hunk, so as to remain consistent with 911any syntax highlighting that may be present. This makes it suitable for
810the overall experience of that mode. Expect changes that are consistent 912use with a non-nil value for ~diff-font-lock-syntax~ (which is the
811with the overall intent of the aforementioned. 913default for ~diff-mode~ buffers in Emacs 27 or higher).
914
915Option ~deuteranopia~ optimizes for red-green color deficiency. It
916replaces all instances of green with blue variants. This is to ensure
917that indicators for "removed" and "added" states are not mistaken for
918each other.
919
920Concerning Magit, an extra set of tweaks are introduced for the effect
921of highlighting the current diff hunk, so as to remain aligned with the
922overall experience of that mode. Expect changes that are consistent
923with the overall intent of the aforementioned. Note, however, that the
924~bg-only~ option will not deliver the intended results in Magit diffs
925because no syntax highlighting is used there (last checked with Magit
926version 20201116.1057, though upstream has a plan to eventually support
927such a feature---this entry shall be updated accordingly).
812 928
813** Option for org-mode block styles 929** Option for org-mode block styles
814:PROPERTIES: 930:properties:
815:ALT_TITLE: Org mode blocks 931:alt_title: Org mode blocks
816:DESCRIPTION: Choose among plain, grayscale, or rainbow styles 932:description: Choose among plain, grayscale, or rainbow styles
817:CUSTOM_ID: h:b7e328c0-3034-4db7-9cdf-d5ba12081ca2 933:custom_id: h:b7e328c0-3034-4db7-9cdf-d5ba12081ca2
818:END: 934:end:
819 935#+vindex: modus-themes-org-blocks
820Symbol names:
821 936
822+ =modus-operandi-theme-org-blocks= 937Symbol: ~modus-themes-org-blocks~
823+ =modus-vivendi-theme-org-blocks=
824 938
825Possible values: 939Possible values:
826 940
8271. =nil= (default) 9411. =nil= (default)
8282. =grayscale= 9422. ~grayscale~
8293. =rainbow= 9433. ~rainbow~
830 944
831The default is to use the same background as the rest of the buffer for 945The default is to use the same background as the rest of the buffer for
832the contents of the block. 946the contents of the block.
833 947
834A value of =grayscale= will apply a subtle neutral gray background to the 948Option ~grayscale~ applies a subtle neutral gray background to the block's
835block's contents. It will also extend to the edge of the window the 949contents. It will also extend to the edge of the window the background
836background of the "begin" and "end" block delimiter lines (only relevant 950of the "begin" and "end" block delimiter lines (only relevant for Emacs
837for Emacs versions >= 27 where the 'extend' keyword is recognised by 951versions >= 27 where the 'extend' keyword is part of the face
838=set-face-attribute=). 952specifications).
839 953
840While =rainbow= will instead use an accented background for the contents 954Option ~rainbow~ uses an accented background for the contents of the
841of the block. The exact color will depend on the programming language 955block. The exact color will depend on the programming language and is
842and is controlled by the =org-src-block-faces= variable (refer to the 956controlled by the ~org-src-block-faces~ variable. This is most suitable
843theme's source code for the current association list). This is most 957for users who work on literate programming documents that mix and match
844suitable for users who work on literate programming documents that mix 958several languages.
845and match several languages.
846 959
847Note that the "rainbow" blocks may require you to also reload the 960Note that the "rainbow" blocks may require you to also reload the
848major-mode so that the colors are applied properly: use =M-x org-mode= or 961major-mode so that the colors are applied consistently throughout: use
849=M-x org-mode-restart= to refresh the buffer. Or start typing in each 962{{{kbd(M-x org-mode)}}} or {{{kbd(M-x org-mode-restart)}}} to refresh the buffer.
850code block (inefficient at scale, but it still works). 963Or start typing in each code block (inefficient at scale, but it still
964works).
851 965
852** Option for headings' overall style 966** Option for org-habit graph styles
853:PROPERTIES: 967:properties:
854:ALT_TITLE: Heading styles 968:alt_title: Org agenda habits
855:DESCRIPTION: Choose among several styles, also per heading level 969:description: Choose among standard, simplified, or traffic light styles
856:CUSTOM_ID: h:271eff19-97aa-4090-9415-a6463c2f9ae1 970:custom_id: h:b7e328c0-3034-4db7-9cdf-d5ba12081ca2
857:END: 971:end:
972#+vindex: modus-themes-org-habit
973
974Symbol: ~modus-themes-org-habit~
975
976Possible values:
977
9781. =nil= (default)
9792. ~simplified~
9803. ~traffic-light~
981
982The default is meant to conform with the original aesthetic of
983=org-habit=. It employs all four color codes that correspond to the
984org-habit states---clear, ready, alert, and overdue---while
985distinguishing between their present and future variants. This results
986in a total of eight colors in use: red, yellow, green, blue, in tinted
987and shaded versions. They cover the full set of information provided by
988the =org-habit= consistency graph.
989
990Option ~simplified~ is like the default except that it removes the
991dichotomy between current and future variants by applying uniform
992color-coded values. It applies a total of four colors: red, yellow,
993green, blue. They produce a simplified consistency graph that is more
994legible (or less "busy") than the default. The intent is to shift focus
995towards the distinction between the four states of a habit task, rather
996than each state's present/future outlook.
997
998Option ~traffic-light~ further reduces the available colors to red,
999yellow, and green. As in ~simplified~, present and future variants appear
1000uniformly, but differently from it, the 'clear' state is rendered in a
1001green hue, instead of the original blue. This is meant to capture the
1002use-case where a habit task being "too early" is less important than it
1003being "too late". The difference between ready and clear states is
1004attenuated by painting both of them using shades of green. This option
1005thus highlights the alert and overdue states.
1006
1007** Option for the headings' overall style
1008:properties:
1009:alt_title: Heading styles
1010:description: Choose among several styles, also per heading level
1011:custom_id: h:271eff19-97aa-4090-9415-a6463c2f9ae1
1012:end:
1013#+vindex: modus-themes-headings
858 1014
859This is defined as an alist and, therefore, uses a different approach 1015This is defined as an alist and, therefore, uses a different approach
860than other customization options documented in this manual. 1016than other customization options documented in this manual.
861 1017
862Symbol names: 1018Symbol: ~modus-themes-headings~
863
864+ =modus-operandi-theme-headings=
865+ =modus-vivendi-theme-headings=
866 1019
867Possible values, which can be specified for each heading level (examples 1020Possible values, which can be specified for each heading level (examples
868further below): 1021further below):
869 1022
870+ nil (default fallback option---covers all heading levels) 1023+ nil (default fallback option---covers all heading levels)
871+ =t= (default style for a single heading, when the fallback differs) 1024+ =t= (default style for a single heading, when the fallback differs)
872+ =no-bold= 1025+ ~no-bold~
873+ =line= 1026+ ~line~
874+ =line-no-bold= 1027+ ~line-no-bold~
875+ =rainbow= 1028+ ~rainbow~
876+ =rainbow-line= 1029+ ~rainbow-line~
877+ =rainbow-line-no-bold= 1030+ ~rainbow-line-no-bold~
878+ =highlight= 1031+ ~highlight~
879+ =highlight-no-bold= 1032+ ~highlight-no-bold~
880+ =rainbow-highlight= 1033+ ~rainbow-highlight~
881+ =rainbow-highlight-no-bold= 1034+ ~rainbow-highlight-no-bold~
882+ =section= 1035+ ~section~
883+ =section-no-bold= 1036+ ~section-no-bold~
884+ =rainbow-section= 1037+ ~rainbow-section~
885+ =rainbow-section-no-bold= 1038+ ~rainbow-section-no-bold~
886 1039+ ~no-color~
887To control faces per level from 1-8, use something like this (same for 1040+ ~no-color-no-bold~
888=modus-vivendi-theme-headings=): 1041
1042To control faces per level from 1-8, use something like this:
889 1043
890#+begin_src emacs-lisp 1044#+begin_src emacs-lisp
891(setq modus-operandi-theme-headings 1045(setq modus-themes-headings
892 '((1 . section) 1046 '((1 . section)
893 (2 . line) 1047 (2 . section-no-bold)
894 (3 . highlight) 1048 (3 . rainbow-line)
895 (t . rainbow-no-bold))) 1049 (t . rainbow-line-no-bold)))
896#+end_src 1050#+end_src
897 1051
898The above uses the =section= value for heading levels 1, the =line= for 1052The above uses the ~section~ value for heading levels 1, ~section-no-bold~
899headings 2, =highlight= for 3. All other levels fall back to 1053for headings 2, ~rainbow-line~ for 3. All other levels fall back to
900=rainbow-line-no-bold=. 1054~rainbow-line-no-bold~.
901 1055
902To set a uniform value for all heading levels, use this pattern: 1056To set a uniform value for all heading levels, use this pattern:
903 1057
904#+begin_src emacs-lisp 1058#+begin_src emacs-lisp
905;; A given style for every heading 1059;; A given style for every heading
906(setq modus-operandi-theme-headings 1060(setq modus-themes-headings
907 '((t . rainbow-line-no-bold))) 1061 '((t . section)))
908 1062
909;; Default aesthetic for every heading 1063;; Default aesthetic for every heading
910(setq modus-operandi-theme-headings 1064(setq modus-themes-headings
911 '((t . nil))) 1065 '())
912#+end_src 1066#+end_src
913 1067
914The default style for headings uses a fairly desaturated foreground 1068The default style for headings uses a fairly desaturated foreground
915value in combination with a bold typographic weight. To specify this 1069value in combination with bold typographic weight. To specify this
916style for a given level N (assuming you wish to have another fallback 1070style for a given level N, assuming you wish to have another fallback
917option), just specify the value =t= like this: 1071option, just specify the value =t= like this:
918 1072
919#+begin_src emacs-lisp 1073#+begin_src emacs-lisp
920(setq modus-operandi-theme-headings 1074(setq modus-themes-headings
921 '((1 . t) 1075 '((1 . t)
922 (2 . line) 1076 (2 . line)
923 (t . rainbow-line-no-bold))) 1077 (t . rainbow-line-no-bold)))
924#+end_src 1078#+end_src
925 1079
926A description of all other possible styles: 1080A description of all other possible styles beyond the default:
927 1081
928+ =no-bold= retains the default text color while removing the typographic 1082+ ~no-bold~ retains the default text color while removing the bold
929 weight. 1083 typographic weight.
930 1084
931+ =line= is the same as the default plus an overline over the heading. 1085+ ~line~ is the same as the default plus an overline across the
1086 heading's length.
932 1087
933+ =line-no-bold= is the same as =line= without bold weight. 1088+ ~line-no-bold~ is the same as ~line~ without bold weight.
934 1089
935+ =rainbow= uses a more colorful foreground in combination with bold 1090+ ~rainbow~ uses a more colorful foreground in combination with bold
936 weight. 1091 typographic weight.
937 1092
938+ =rainbow-line= is the same as =rainbow= plus an overline. 1093+ ~rainbow-line~ is the same as ~rainbow~ plus an overline.
939 1094
940+ =rainbow-line-no-bold= is the same as =rainbow-line= without the bold 1095+ ~rainbow-line-no-bold~ is the same as ~rainbow-line~ without the bold
941 weight. 1096 weight.
942 1097
943+ =highlight= retains the default style of a fairly desaturated foreground 1098+ ~highlight~ retains the default style of a fairly desaturated
944 combined with a bold weight and adds to it a subtle accented 1099 foreground combined with a bold weight and adds to it a subtle
945 background. 1100 accented background.
946 1101
947+ =highlight-no-bold= is the same as =highlight= without a bold weight. 1102+ ~highlight-no-bold~ is the same as ~highlight~ without a bold weight.
948 1103
949+ =rainbow-highlight= is the same as =highlight= but with a more colorful 1104+ ~rainbow-highlight~ is the same as ~highlight~ but with a more
950 foreground. 1105 colorful foreground.
951 1106
952+ =rainbow-highlight-no-bold= is the same as =rainbow-highlight= without a 1107+ ~rainbow-highlight-no-bold~ is the same as ~rainbow-highlight~ without
953 bold weight. 1108 a bold weight.
954 1109
955+ =section= retains the default looks and adds to them both an overline 1110+ ~section~ retains the default looks and adds to them both an overline
956 and a slightly accented background. It is, in effect, a combination 1111 and a slightly accented background. It is, in effect, a combination
957 of the =line= and =highlight= values. 1112 of the ~line~ and ~highlight~ values.
958 1113
959+ =section-no-bold= is the same as =section= without a bold weight. 1114+ ~section-no-bold~ is the same as ~section~ without a bold weight.
960 1115
961+ =rainbow-section= is the same as =section= but with a more colorful 1116+ ~rainbow-section~ is the same as ~section~ but with a more colorful
962 foreground. 1117 foreground.
963 1118
964+ =rainbow-section-no-bold= is the same as =rainbow-section= without a bold 1119+ ~rainbow-section-no-bold~ is the same as ~rainbow-section~ without a
965 weight." 1120 bold weight.
1121
1122+ ~no-color~ does not apply any color to the heading, meaning that it
1123 uses the foreground of the ~default~ face. It still renders the text
1124 with a bold typographic weight.
966 1125
967** Option for scaled headings 1126+ ~no-color-no-bold~ is like ~no-color~ but without the bold weight.
968:PROPERTIES:
969:ALT_TITLE: Scaled headings
970:DESCRIPTION: Toggle scaling of headings
971:CUSTOM_ID: h:075eb022-37a6-41a4-a040-cc189f6bfa1f
972:END:
973 1127
974Symbol names: 1128** Option for scaled headings
1129:properties:
1130:alt_title: Scaled headings
1131:description: Toggle scaling of headings
1132:custom_id: h:075eb022-37a6-41a4-a040-cc189f6bfa1f
1133:end:
1134#+vindex: modus-themes-scale-headings
975 1135
976+ =modus-operandi-theme-scale-headings= 1136Symbol: ~modus-themes-scale-headings~
977+ =modus-vivendi-theme-scale-headings=
978 1137
979Possible values: 1138Possible values:
980 1139
9811. =nil= (default) 11401. =nil= (default)
9822. =t= 11412. =t=
983 1142
984Make headings larger in height relative to the main text. This is 1143The default is to use the same size for headings and paragraph text.
985noticeable in modes like Org. The default is to use the same size for 1144
986headings and body copy. 1145With a non-nil value (=t=) make headings larger in height relative to the
1146main text. This is noticeable in modes like Org, Markdown, and Info.
987 1147
988*** Control the scale of headings 1148*** Control the scale of headings
989:PROPERTIES: 1149:properties:
990:ALT_TITLE: Scaled heading sizes 1150:alt_title: Scaled heading sizes
991:DESCRIPTION: Specify rate of increase for scaled headings 1151:description: Specify rate of increase for scaled headings
992:CUSTOM_ID: h:6868baa1-beba-45ed-baa5-5fd68322ccb3 1152:custom_id: h:6868baa1-beba-45ed-baa5-5fd68322ccb3
993:END: 1153:end:
994 1154
995In addition to toggles for enabling scaled headings, users can also 1155In addition to the toggle for enabling scaled headings, users can also
996specify a number of their own. 1156specify a number of their own.
997 1157
998+ If it is a floating point, say, =1.5=, it is interpreted as a multiple 1158+ If it is a floating point, say, =1.5=, it is interpreted as a multiple
999 of the base font size. This is the recommended method. 1159 of the base font size. This is the recommended method, because it
1000 1160 will always adapt to changes in the base font size, such as while
1001+ If it is an integer, it is read as an absolute font height. The 1161 using the ~text-scale-adjust~ command.
1002 number is basically the point size multiplied by ten. So if you want 1162
1003 it to be =18pt= you must pass =180=. Please understand that setting an 1163+ If it is an integer, it is read as an absolute font height that is
1004 absolute value is discouraged, as it will break the layout when you 1164 1/10 of the typographic point size. Thus a value of =18pt= must be
1005 try to change font sizes with the built-in =text-scale-adjust= command 1165 expressed as =180=. Setting an absolute value is discouraged, as it
1006 (see [[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations]]). 1166 will break the layout in cases where the base font size must change,
1167 such as with the ~text-scale-adjust~ command ([[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations]]).
1168 While we discourage using absolute values, we still provide for this
1169 option for users who do not need to perform text-scaling operations or
1170 who are content with whatever discrepancies in height.
1007 1171
1008Below are the variables in their default values, using the floating 1172Below are the variables in their default values, using the floating
1009point paradigm. The numbers are very conservative, but you are free to 1173point paradigm. The numbers are very conservative, but one is free to
1010change them to your liking, such as =1.2=, =1.4=, =1.6=, =1.8=, =2.0=---or use a 1174change them to their liking, such as =1.2=, =1.4=, =1.6=, =1.8=, =2.0=---or use a
1011resource for finding a consistent scale: 1175resource for finding a consistent scale:
1012 1176
1013#+begin_src emacs-lisp 1177#+begin_src emacs-lisp
1014(setq modus-operandi-theme-scale-1 1.05 1178(setq modus-themes-scale-1 1.05
1015 modus-operandi-theme-scale-2 1.1 1179 modus-themes-scale-2 1.1
1016 modus-operandi-theme-scale-3 1.15 1180 modus-themes-scale-3 1.15
1017 modus-operandi-theme-scale-4 1.2 1181 modus-themes-scale-4 1.2
1018 modus-operandi-theme-scale-5 1.3) 1182 modus-themes-scale-5 1.3)
1019
1020(setq modus-vivendi-theme-scale-1 1.05
1021 modus-vivendi-theme-scale-2 1.1
1022 modus-vivendi-theme-scale-3 1.15
1023 modus-vivendi-theme-scale-4 1.2
1024 modus-vivendi-theme-scale-5 1.3)
1025#+end_src 1183#+end_src
1026 1184
1185As for the application of that scale, the variables that range from
1186~modus-themes-scale-1~ up to ~modus-themes-scale-4~ apply to regular
1187headings within the context of the given major mode. The former is the
1188smallest, while the latter is the largest. "Regular headings" are those
1189that have a standard syntax for their scale, such as Org mode's eight
1190levels of asterisks or Markdown's six columns.
1191
1192Whereas ~modus-themes-scale-5~ is applied to special headings that do not
1193conform with the aforementioned syntax, yet which are expected to be
1194larger than the largest value on that implied scale. Put concretely,
1195Org's =#+title= meta datum is not part of the eight levels of headings in
1196an Org file, yet is supposed to signify the primary header. Similarly,
1197the Org Agenda's structure headings are not part of a recognisable scale
1198and so they also get ~modus-themes-scale-5~.
1199
1200Users who wish to maintain scaled headings for the normal syntax while
1201preventing special headings from standing out, can assign a value of =1.0=
1202to ~modus-themes-scale-5~ to make it the same as body text (or whatever
1203value would render it indistinguishable from the desired point of
1204reference).
1205
1027Note that in earlier versions of Org, scaling would only increase the 1206Note that in earlier versions of Org, scaling would only increase the
1028size of the heading, but not of keywords that were added to it, like 1207size of the heading, but not of keywords that were added to it, like
1029"TODO". The issue has been fixed upstream: 1208"TODO". The issue has been fixed upstream:
1030<https://protesilaos.com/codelog/2020-09-24-org-headings-adapt/>. 1209<https://protesilaos.com/codelog/2020-09-24-org-headings-adapt/>.
1031 1210
1032** Option for variable-pitch font in headings 1211** Option for variable-pitch font in UI elements
1033:PROPERTIES: 1212:properties:
1034:ALT_TITLE: Headings' font 1213:alt_title: UI typeface
1035:DESCRIPTION: Toggle proportionately spaced fonts in headings 1214:description: Toggle the use of variable-pitch across the User Interface
1036:CUSTOM_ID: h:97caca76-fa13-456c-aef1-a2aa165ea274 1215:custom_id: h:16cf666c-5e65-424c-a855-7ea8a4a1fcac
1037:END: 1216:end:
1217#+vindex: modus-themes-variable-pitch-ui
1218
1219Symbol: ~modus-themes-variable-pitch-ui~
1220
1221Possible values:
1222
12231. =nil= (default)
12242. =t=
1225
1226This option concerns User Interface elements that are under the direct
1227control of Emacs. In particular: the mode line, header line, tab bar,
1228and tab line.
1229
1230The default is to use the same font as the rest of Emacs, which usually
1231is a monospaced family.
1038 1232
1039Symbol names: 1233With a non-nil value (=t=) apply a proportionately spaced typeface. This
1234is done by assigning the ~variable-pitch~ face to the relevant items.
1040 1235
1041+ =modus-operandi-theme-variable-pitch-headings= 1236[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]].
1042+ =modus-vivendi-theme-variable-pitch-headings= 1237
1238** Option for variable-pitch font in headings
1239:properties:
1240:alt_title: Headings' typeface
1241:description: Toggle the use of variable-pitch in headings
1242:custom_id: h:97caca76-fa13-456c-aef1-a2aa165ea274
1243:end:
1244#+vindex: modus-themes-variable-pitch-headings
1245
1246Symbol: ~modus-themes-variable-pitch-headings~
1043 1247
1044Possible values: 1248Possible values:
1045 1249
10461. =nil= (default) 12501. =nil= (default)
10472. =t= 12512. =t=
1048 1252
1049Choose to apply a proportionately spaced, else "variable-pitch", 1253The default is to use the main font family, which typically is
1050typeface to headings (such as in Org mode). The default is to use the 1254monospaced.
1051main font family.
1052 1255
1053[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org (and others)]]. 1256With a non-nil value (=t=) apply a proportionately spaced typeface, else
1257"variable-pitch", to headings (such as in Org mode).
1258
1259[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]].
1054 1260
1055* Advanced customization (do-it-yourself) 1261* Advanced customization (do-it-yourself)
1056:PROPERTIES: 1262:properties:
1057:INDEX: cp 1263:custom_id: h:f4651d55-8c07-46aa-b52b-bed1e53463bb
1058:CUSTOM_ID: h:f4651d55-8c07-46aa-b52b-bed1e53463bb 1264:end:
1059:END:
1060 1265
1061Unlike the predefined customization options which follow a 1266Unlike the predefined customization options which follow a clear pattern
1062straightforward pattern of allowing the user to quickly specify their 1267of allowing the user to quickly specify their preference, the themes
1063preference, the themes also provide a more flexible, albeit difficult, 1268also provide a more flexible, albeit difficult, mechanism to control
1064mechanism to control things with precision (see [[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization Options]]). 1269things with precision ([[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization Options]]).
1065 1270
1066This section is of interest only to users who are prepared to maintain 1271This section is of interest only to users who are prepared to maintain
1067their own local tweaks and who are willing to deal with any possible 1272their own local tweaks and who are willing to deal with any possible
1068incompatibilities between versioned releases of the themes. As such, 1273incompatibilities between versioned releases of the themes. As such,
1069they are labelled as "do-it-yourself" or "DIY". 1274they are labelled as "do-it-yourself" or "DIY".
1070 1275
1071** Full access to the themes' palette 1276** Per-theme customization settings (DIY)
1072:PROPERTIES: 1277:properties:
1073:ALT_TITLE: Tweak colors (DIY) 1278:custom_id: h:a897b302-8e10-4a26-beab-3caaee1e1193
1074:DESCRIPTION: Declare your own palette overrides 1279:end:
1075:CUSTOM_ID: h:1487c631-f4fe-490d-8d58-d72ffa3bd474 1280
1076:END: 1281If you prefer to maintain different customization options between the
1282two themes, it is best you write your own functions that first set those
1283options and then load the relevant theme. The following code does
1284exactly that by simply differentiating the two themes on the choice of
1285bold constructs in code syntax (enabled for one, disabled for the
1286other).
1287
1288#+begin_src emacs-lisp
1289(defun my-demo-modus-operandi ()
1290 (interactive)
1291 (setq modus-themes-bold-constructs t) ; ENABLE bold
1292 (modus-themes-load-operandi))
1293
1294(defun my-demo-modus-vivendi ()
1295 (interactive)
1296 (setq modus-themes-bold-constructs nil) ; DISABLE bold
1297 (modus-themes-load-vivendi))
1298
1299(defun my-demo-modus-themes-toggle ()
1300 (if (eq (car custom-enabled-themes) 'modus-operandi)
1301 (my-demo-modus-vivendi)
1302 (my-demo-modus-operandi)))
1303#+end_src
1304
1305Then assign ~my-demo-modus-themes-toggle~ to a key instead of the
1306equivalent the themes provide.
1307
1308For a more elaborate design, it is better to inspect the source code of
1309~modus-themes-toggle~ and relevant functions.
1310
1311** Case-by-case face specs using the themes' palette (DIY)
1312:properties:
1313:custom_id: h:1487c631-f4fe-490d-8d58-d72ffa3bd474
1314:end:
1315#+findex: modus-themes-color
1316#+findex: modus-themes-color-alts
1317#+cindex: Extracting individual colors
1318
1319This section is about tweaking individual faces. If you plan to do
1320things at scale, consult the next section: [[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Set multiple faces]].
1321
1322We already covered in previous sections how to toggle between the themes
1323and how to configure options prior to loading. We also explained that
1324some of the functions made available to users will fire up a hook that
1325can be used to pass tweaks in the post-theme-load phase.
1326
1327Now assume you wish to change a single face, say, the ~cursor~. And you
1328would like to get the standard "blue" color value of the active Modus
1329theme, whether it is Modus Operandi or Modus Vivendi. To do that, you
1330can use the ~modus-themes-color~ function. It accepts a symbol that is
1331associated with a color in ~modus-themes-operandi-colors~ and
1332~modus-themes-vivendi-colors~. Like this:
1333
1334#+begin_src emacs-lisp
1335(modus-themes-color 'blue)
1336#+end_src
1337
1338The function always extracts the color value of the active Modus theme.
1339
1340#+begin_src emacs-lisp
1341(progn
1342 (load-theme 'modus-operandi t)
1343 (modus-themes-color 'blue)) ; "#0031a9" for `modus-operandi'
1344
1345(progn
1346 (load-theme 'modus-vivendi t)
1347 (modus-themes-color 'blue)) ; "#2fafff" for `modus-vivendi'
1348#+end_src
1349
1350Do {{{kbd(C-h v)}}} on the aforementioned variables to check all the available
1351symbols that can be passed to this function.
1352
1353With that granted, let us expand the example to actually change the
1354~cursor~ face's background property. We employ the built-in function of
1355~set-face-attribute~:
1356
1357#+begin_src emacs-lisp
1358(set-face-attribute 'cursor nil :background (modus-themes-color 'blue))
1359#+end_src
1360
1361If you evaluate this form, your cursor will become blue. But if you
1362change themes, such as with ~modus-themes-toggle~, your edits will be
1363lost, because the newly loaded theme will override the =:background=
1364attribute you had assigned to that face.
1077 1365
1078The variables are: 1366For such changes to persist, we need to make them after loading the
1367theme. So we rely on ~modus-themes-after-load-theme-hook~, which gets
1368called from ~modus-themes-load-operandi~, ~modus-themes-load-vivendi~, as
1369well as the command ~modus-themes-toggle~. Here is a sample function that
1370tweaks two faces and then gets added to the hook:
1079 1371
1080+ =modus-operandi-theme-override-colors-alist= 1372#+begin_src emacs-lisp
1081+ =modus-vivendi-theme-override-colors-alist= 1373(defun my-modus-themes-custom-faces ()
1374 (set-face-attribute 'cursor nil :background (modus-themes-color 'blue))
1375 (set-face-attribute 'font-lock-type-face nil :foreground (modus-themes-color 'magenta-alt)))
1376
1377(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces)
1378#+end_src
1082 1379
1083Users can specify an association list that maps the names of color 1380[[#h:86f6906b-f090-46cc-9816-1fe8aeb38776][A theme-agnostic hook for theme loading]].
1084variables to hexadecimal RGB values (in the form of =#RRGGBB=). This
1085means that it is possible to override the entire palette or subsets
1086thereof (see the source code for the actual names and values).
1087 1381
1088Example: 1382Using this principle, it is possible to override the styles of faces
1383without having to find color values for each case.
1384
1385Another application is to control the precise weight for bold
1386constructs. This is particularly useful if your typeface has several
1387variants such as "heavy", "extrabold", "semibold". All you have to do
1388is edit the ~bold~ face. For example:
1089 1389
1090#+begin_src emacs-lisp 1390#+begin_src emacs-lisp
1091;; Redefine the values of those three variables for the given theme 1391(set-face-attribute 'bold nil :weight 'semibold)
1092(setq modus-vivendi-theme-override-colors-alist
1093 '(("magenta" . "#ffaabb")
1094 ("magenta-alt" . "#ee88ff")
1095 ("magenta-alt-other" . "#bbaaff")))
1096#+end_src 1392#+end_src
1097 1393
1098If you want to be creative, you can define a minor mode that refashions 1394Remember to use the custom function and hook combo we demonstrated
1099the themes on demand. The following is a minor mode that gets activated 1395above. Because the themes do not hard-wire a specific weight, this
1100on demand. We combine it with the function to switch between Modus 1396simple form is enough to change the weight of all bold constructs
1101Operandi and Modus Vivendi (see [[#h:2a0895a6-3281-4e55-8aa1-8a737555821e][Toggle between the themes on demand]] for 1397throughout the interface.
1102a basic command, and/or [[*Configure options prior to loading][Configure options prior to loading]] for a more 1398
1103comprehensive setup). 1399Finally, there are cases where you want to tweak colors though wish to
1400apply different ones to each theme, say, a blue hue for Modus Operandi
1401and a shade of red for Modus Vivendi. To this end, we provide
1402~modus-themes-color-alts~ as a convenience function to save you from the
1403trouble of writing separate wrappers for each theme. It still returns a
1404single value by querying either of ~modus-themes-operandi-colors~ and
1405~modus-themes-vivendi-colors~, only here you pass the two keys you want,
1406first for ~modus-operandi~ then ~modus-vivendi~.
1407
1408Take the previous example with the ~cursor~ face:
1104 1409
1105#+begin_src emacs-lisp 1410#+begin_src emacs-lisp
1106(define-minor-mode modus-themes-alt-mode 1411;; Blue for `modus-operandi' and red for `modus-vivendi'
1107 "Override Modus themes' palette variables with custom values. 1412(set-face-attribute 'cursor nil :background (modus-themes-color-alts 'blue 'red))
1413#+end_src
1108 1414
1109This is intended as a proof-of-concept. It is, nonetheless, a 1415** Face specs at scale using the themes' palette (DIY)
1110perfectly accessible alternative, conforming with the design 1416:properties:
1111principles of the Modus themes. It still is not as good as the 1417:custom_id: h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae
1112default colors." 1418:end:
1419#+findex: modus-themes-with-colors
1420#+cindex: Extracting colors en masse
1421
1422The examples here are for large scale operations. For simple, one-off
1423tweaks, you may prefer the approach documented in the previous section
1424([[#h:1487c631-f4fe-490d-8d58-d72ffa3bd474][Case-by-case face specs using the themes' palette]]).
1425
1426The ~modus-themes-with-colors~ macro lets you retrieve multiple color
1427values by employing the backquote/backtick and comma notation. The
1428values are stored in the alists ~modus-themes-operandi-colors~ and
1429~modus-themes-vivendi-colors~, while the macro always queries that of the
1430active Modus theme.
1431
1432Here is an abstract example that just returns a list of color values
1433while ~modus-operandi~ is enabled:
1434
1435#+begin_src emacs-lisp
1436(modus-themes-with-colors
1437 (list fg-main
1438 blue-faint
1439 magenta
1440 magenta-alt-other
1441 cyan-alt-other
1442 fg-special-cold
1443 blue-alt
1444 magenta-faint
1445 cyan
1446 fg-main
1447 green-faint
1448 red-alt-faint
1449 blue-alt-faint
1450 fg-special-warm
1451 cyan-alt
1452 blue))
1453;; =>
1454;; ("#000000" "#002f88" "#721045" "#5317ac"
1455;; "#005a5f" "#093060" "#2544bb" "#752f50"
1456;; "#00538b" "#000000" "#104410" "#702f00"
1457;; "#003f78" "#5d3026" "#30517f" "#0031a9")
1458#+end_src
1459
1460Getting a list of colors may have its applications, though what you are
1461most likely interested in is how to use those variables to configure
1462several faces at once. To do so we can rely on the built-in
1463~custom-set-faces~ function, which sets face specifications for the
1464special =user= theme. That "theme" gets applied on top of regular themes
1465like ~modus-operandi~ and ~modus-vivendi~.
1466
1467This is how it works:
1468
1469#+begin_src emacs-lisp
1470(modus-themes-with-colors
1471 (custom-set-faces
1472 `(cursor ((,class :background ,blue)))
1473 `(mode-line ((,class :background ,yellow-nuanced-bg
1474 :foreground ,yellow-nuanced-fg)))
1475 `(mode-line-inactive ((,class :background ,blue-nuanced-bg
1476 :foreground ,blue-nuanced-fg)))))
1477#+end_src
1478
1479The above snippet will immediately refashion the faces it names once it
1480is evaluated. However, if you switch between the Modus themes, say,
1481from ~modus-operandi~ to ~modus-vivendi~, the colors will not get updated to
1482match those of the new theme. To make things work across the themes, we
1483need to employ the same technique we discussed in the previous section,
1484namely, to pass our changes at the post-theme-load phase via a hook.
1485
1486The themes provide the ~modus-themes-after-load-theme-hook~, which gets
1487called from ~modus-themes-load-operandi~, ~modus-themes-load-vivendi~, as
1488well as the command ~modus-themes-toggle~. With this knowledge, you can
1489wrap the macro in a function and then assign that function to the hook.
1490Thus:
1491
1492#+begin_src emacs-lisp
1493(defun my-modus-themes-custom-faces ()
1494 (modus-themes-with-colors
1495 (custom-set-faces
1496 `(cursor ((,class :background ,blue)))
1497 `(mode-line ((,class :background ,yellow-nuanced-bg
1498 :foreground ,yellow-nuanced-fg)))
1499 `(mode-line-inactive ((,class :background ,blue-nuanced-bg
1500 :foreground ,blue-nuanced-fg))))))
1501
1502(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces)
1503#+end_src
1504
1505[[#h:86f6906b-f090-46cc-9816-1fe8aeb38776][A theme-agnostic hook for theme loading]].
1506
1507To discover the faces defined by all loaded libraries, you may do
1508{{{kbd(M-x list-faces-display)}}}. Be warned that when you =:inherit= a face
1509you are introducing an implicit dependency, so try to avoid doing so for
1510libraries other than the built-in {{{file(faces.el)}}} (or at least understand
1511that things may break if you inherit from a yet-to-be-loaded face).
1512
1513Also bear in mind that these examples are meant to work with the Modus
1514themes. If you are cycling between multiple themes you may encounter
1515unforeseen issues, such as the colors of the Modus themes being applied
1516to a non-Modus item.
1517
1518Finally, note that you can still use other functions where those make
1519sense. For example, the ~modus-themes-color-alts~ that was discussed in
1520the previous section. Adapt the above example like this:
1521
1522#+begin_src emacs-lisp
1523...
1524(modus-themes-with-colors
1525 (custom-set-faces
1526 `(cursor ((,class :background ,(modus-themes-color-alts 'blue 'green))))
1527 ...))
1528#+end_src
1529
1530** Override colors (DIY)
1531:properties:
1532:custom_id: h:307d95dd-8dbd-4ece-a543-10ae86f155a6
1533:end:
1534#+vindex: modus-themes-operandi-color-overrides
1535#+vindex: modus-themes-vivendi-color-overrides
1536#+cindex: Change a theme's colors
1537
1538The themes provide a mechanism for overriding their color values. This
1539is controlled by the variables ~modus-themes-operandi-color-overrides~ and
1540~modus-themes-vivendi-color-overrides~, which are alists that should
1541mirror a subset of the associations in ~modus-themes-operandi-colors~ and
1542~modus-themes-vivendi-colors~ respectively. As with all customisations,
1543overriding must be done before loading the affected theme.
1544
1545Let us approach the present topic one step at a time. Here is a
1546simplified excerpt of the default palette for Modus Operandi with some
1547basic background values that apply to buffers and the mode line
1548(remember to inspect the actual value to find out all the associations
1549that can be overridden):
1550
1551#+begin_src emacs-lisp
1552(defconst modus-themes-colors-operandi
1553 '((bg-main . "#ffffff")
1554 (bg-dim . "#f8f8f8")
1555 (bg-alt . "#f0f0f0")
1556 (bg-active . "#d7d7d7")
1557 (bg-inactive . "#efefef")))
1558#+end_src
1559
1560As one can tell, we bind a key to a hexadecimal RGB color value. Now
1561say we wish to override those specific values and have our changes
1562propagate to all faces that use those keys. We could write something
1563like this, which adds a subtle ochre tint:
1564
1565#+begin_src emacs-lisp
1566(setq modus-themes-operandi-color-overrides
1567 '((bg-main . "#fefcf4")
1568 (bg-dim . "#faf6ef")
1569 (bg-alt . "#f7efe5")
1570 (bg-active . "#e8dfd1")
1571 (bg-inactive . "#f6ece5")))
1572#+end_src
1573
1574Once this is evaluated, any subsequent loading of ~modus-operandi~ will
1575use those values instead of the defaults. No further intervention is
1576required.
1577
1578To reset the changes, we apply this and reload the theme:
1579
1580#+begin_src emacs-lisp
1581(setq modus-themes-operandi-color-overrides nil)
1582#+end_src
1583
1584Users who wish to leverage such a mechanism can opt to implement it
1585on-demand by means of a global minor mode. The following snippet covers
1586both themes and expands to some more assosiations in the palette:
1587
1588#+begin_src emacs-lisp
1589(define-minor-mode my-modus-themes-tinted
1590 "Tweak some Modus themes colors."
1113 :init-value nil 1591 :init-value nil
1114 :global t 1592 :global t
1115 (if modus-themes-alt-mode 1593 (if my-modus-themes-tinted
1116 (setq modus-operandi-theme-override-colors-alist 1594 (setq modus-themes-operandi-color-overrides
1117 '(("bg-main" . "#fefcf4") 1595 '((bg-main . "#fefcf4")
1118 ("bg-dim" . "#faf6ef") 1596 (bg-dim . "#faf6ef")
1119 ("bg-alt" . "#f7efe5") 1597 (bg-alt . "#f7efe5")
1120 ("bg-hl-line" . "#f4f0e3") 1598 (bg-hl-line . "#f4f0e3")
1121 ("bg-active" . "#e8dfd1") 1599 (bg-active . "#e8dfd1")
1122 ("bg-inactive" . "#f6ece5") 1600 (bg-inactive . "#f6ece5")
1123 ("bg-region" . "#c6bab1") 1601 (bg-region . "#c6bab1")
1124 ("bg-header" . "#ede3e0") 1602 (bg-header . "#ede3e0")
1125 ("bg-tab-bar" . "#dcd3d3") 1603 (bg-tab-bar . "#dcd3d3")
1126 ("bg-tab-active" . "#fdf6eb") 1604 (bg-tab-active . "#fdf6eb")
1127 ("bg-tab-inactive" . "#c8bab8") 1605 (bg-tab-inactive . "#c8bab8")
1128 ("fg-unfocused" . "#55556f")) 1606 (fg-unfocused . "#55556f"))
1129 modus-vivendi-theme-override-colors-alist 1607 modus-themes-vivendi-color-overrides
1130 '(("bg-main" . "#100b17") 1608 '((bg-main . "#100b17")
1131 ("bg-dim" . "#161129") 1609 (bg-dim . "#161129")
1132 ("bg-alt" . "#181732") 1610 (bg-alt . "#181732")
1133 ("bg-hl-line" . "#191628") 1611 (bg-hl-line . "#191628")
1134 ("bg-active" . "#282e46") 1612 (bg-active . "#282e46")
1135 ("bg-inactive" . "#1a1e39") 1613 (bg-inactive . "#1a1e39")
1136 ("bg-region" . "#393a53") 1614 (bg-region . "#393a53")
1137 ("bg-header" . "#202037") 1615 (bg-header . "#202037")
1138 ("bg-tab-bar" . "#262b41") 1616 (bg-tab-bar . "#262b41")
1139 ("bg-tab-active" . "#120f18") 1617 (bg-tab-active . "#120f18")
1140 ("bg-tab-inactive" . "#3a3a5a") 1618 (bg-tab-inactive . "#3a3a5a")
1141 ("fg-unfocused" . "#9a9aab"))) 1619 (fg-unfocused . "#9a9aab")))
1142 (setq modus-operandi-theme-override-colors-alist nil 1620 (setq modus-themes-operandi-color-overrides nil
1143 modus-vivendi-theme-override-colors-alist nil))) 1621 modus-themes-vivendi-color-overrides nil)))
1144
1145(defun modus-themes-toggle (&optional arg)
1146 "Toggle between `modus-operandi' and `modus-vivendi' themes.
1147
1148With optional \\[universal-argument] prefix, enable
1149`modus-themes-alt-mode' for the loaded theme."
1150 (interactive "P")
1151 (if arg
1152 (modus-themes-alt-mode 1)
1153 (modus-themes-alt-mode -1))
1154 (if (eq (car custom-enabled-themes) 'modus-operandi)
1155 (progn
1156 (disable-theme 'modus-operandi)
1157 (load-theme 'modus-vivendi t))
1158 (disable-theme 'modus-vivendi)
1159 (load-theme 'modus-operandi t)))
1160#+end_src 1622#+end_src
1161 1623
1162** Font configurations for Org (and others) 1624With this in place, one can invoke {{{kbd(M-x my-modus-themes-tinted)}}} and
1163:PROPERTIES: 1625then load the Modus theme of their choice. The new palette subset will
1164:ALT_TITLE: Font configs (DIY) 1626come into effect: subtle ochre tints for Modus Operandi and night sky
1165:DESCRIPTION: Optimise for mixed typeface buffers 1627shades for Modus Vivendi. Switching between the two themes, such as
1166:CUSTOM_ID: h:defcf4fc-8fa8-4c29-b12e-7119582cc929 1628with {{{kbd(M-x modus-themes-toggle)}}} will also use the overrides.
1167:END: 1629
1630Given that this is a user-level customisation, one is free to implement
1631whatever color values they desire, even if the possible combinations
1632fall below the minimum 7:1 contrast ratio that governs the design of the
1633themes (the WCAG AAA legibility standard). Preferences aside, it is
1634advised to inspect the source code of ~modus-themes-operandi-colors~ and
1635~modus-themes-vivendi-colors~ to read the inline commentary: it explains
1636what the intended use of each palette subset is.
1168 1637
1169The themes are designed to cope well with mixed font settings ([[#h:115e6c23-ee35-4a16-8cef-e2fcbb08e28b][Option 1638Furthermore, users may benefit from the ~modus-themes-contrast~ function
1170for no font mixing]]). Currently this applies to =org-mode= and 1639that we provide: [[#h:02e25930-e71a-493d-828a-8907fc80f874][test color combinations]]. It measures the contrast
1171=markdown-mode=. 1640ratio between two color values, so it can help in overriding the palette
1641(or a subset thereof) without making the end result inaccessible.
1642
1643** Font configurations for Org and others (DIY)
1644:properties:
1645:custom_id: h:defcf4fc-8fa8-4c29-b12e-7119582cc929
1646:end:
1647#+cindex: Font configurations
1648
1649The themes are designed to cope well with mixed font configurations.
1650
1651[[#h:115e6c23-ee35-4a16-8cef-e2fcbb08e28b][Option for no font mixing]].
1652
1653This mostly concerns ~org-mode~ and ~markdown-mode~, though expect to find
1654it elsewhere like in ~Info-mode~.
1172 1655
1173In practice it means that the user can safely opt for a more 1656In practice it means that the user can safely opt for a more
1174prose-friendly proportionately spaced typeface as their default, while 1657prose-friendly proportionately spaced typeface as their default, while
1175letting spacing-sensitive elements like tables and inline code always 1658letting spacing-sensitive elements like tables and inline code always
1176use a monospaced font, by inheriting from the =fixed-pitch= face. 1659use a monospaced font, by inheriting from the ~fixed-pitch~ face.
1177 1660
1178Users can try the built-in =M-x variable-pitch-mode= to see the effect in 1661Users can try the built-in {{{kbd(M-x variable-pitch-mode)}}} to see the
1179action. 1662effect in action.
1180 1663
1181To make everything use your desired font families, you need to configure 1664To make everything use your desired font families, you need to configure
1182the =variable-pitch= (proportional spacing) and =fixed-pitch= (monospaced) 1665the ~variable-pitch~ (proportional spacing) and ~fixed-pitch~ (monospaced)
1183faces respectively. It may also be convenient to set your main typeface 1666faces respectively. It may also be convenient to set your main typeface
1184by configuring the =default= face the same way. 1667by configuring the ~default~ face the same way.
1185 1668
1186Put something like this in your initialization file (make sure to read 1669Put something like this in your initialization file (also consider
1187the documentation of =set-face-attribute=, with =M-x describe-function=): 1670reading the doc string of ~set-face-attribute~):
1188 1671
1189#+begin_src emacs-lisp 1672#+begin_src emacs-lisp
1190;; Main typeface 1673;; Main typeface
@@ -1199,50 +1682,35 @@ the documentation of =set-face-attribute=, with =M-x describe-function=):
1199 1682
1200Note the differences in the =:height= property. The =default= face must 1683Note the differences in the =:height= property. The =default= face must
1201specify an absolute value, which is the point size × 10. So if you want 1684specify an absolute value, which is the point size × 10. So if you want
1202to use a font at point size =11=, you set the height at =110=.[fn:: =:height= 1685to use a font at point size =11=, you set the height to =110=.[fn:: =:height=
1203values do not need to be rounded to multiples of ten: the likes of =115= 1686values do not need to be rounded to multiples of ten: the likes of =115=
1204are perfectly valid—some typefaces will change to account for those 1687are perfectly valid—some typefaces will change to account for those
1205finer increments.] Whereas every other face must have a value that is 1688finer increments.] Whereas every other face must have a value that is
1206relative to the default, represented as a floating point (if you use an 1689relative to the default, represented as a floating point (if you use an
1207integer, say, =15= then that means an absolute height). This is of 1690integer, then that means an absolute height). This is of paramount
1208paramount importance: it ensures that all fonts can scale gracefully 1691importance: it ensures that all fonts can scale gracefully when using
1209when using something like the =text-scale-adjust= command which only 1692something like the ~text-scale-adjust~ command which only operates on the
1210operates on the base font size (i.e. the =default= face's absolute 1693base font size (i.e. the ~default~ face's absolute height).
1211height). 1694
1212 1695** Custom Org user faces (DIY)
1213An alternative syntax for the =default= face, is to pass all typeface 1696:properties:
1214parameters directly to a =font= property.[fn:: Has the benefit of 1697:custom_id: h:89f0678d-c5c3-4a57-a526-668b2bb2d7ad
1215accepting =fontconfig= parameters (GNU/Linux), such as ="DejaVu Sans 1698:end:
1216Mono-11:hintstyle=hintslight:autohint=false"=. 1699#+cindex: Org extra faces
1217https://www.freedesktop.org/software/fontconfig/fontconfig-user.html] 1700
1218Note that here we use a standard point size: 1701Users of ~org-mode~ have the option to configure various keywords and
1219
1220#+begin_src emacs-lisp
1221(set-face-attribute 'default nil :font "DejaVu Sans Mono-11")
1222#+end_src
1223
1224Again, remember to only ever specify an absolute height for the =default=.
1225
1226** Org user faces (DIY)
1227:PROPERTIES:
1228:DESCRIPTION: Extend styles for org-mode keywords and priorities
1229:CUSTOM_ID: h:89f0678d-c5c3-4a57-a526-668b2bb2d7ad
1230:END:
1231
1232Users of =org-mode= have the option to configure various keywords and
1233priority cookies to better match their workflow. User options are 1702priority cookies to better match their workflow. User options are
1234=org-todo-keyword-faces= and =org-priority-faces=. 1703~org-todo-keyword-faces~ and ~org-priority-faces~.
1235 1704
1236As those are meant to be custom faces, it would be futile to have the 1705As those are meant to be custom faces, it is futile to have the themes
1237themes try to guess what each user would want to use, which keywords to 1706guess what each user wants to use, which keywords to target, and so on.
1238target, and so on. Instead, we can provide guidelines on how to 1707Instead, we can provide guidelines on how to customize things to one's
1239customize things to one's liking with the intent of retaining the 1708liking with the intent of retaining the overall aesthetic of the themes.
1240overall aesthetics of the theme.
1241 1709
1242Please bear in mind that the end result of those is not controlled by 1710Please bear in mind that the end result of those is not controlled by
1243the active theme but by how Org maps faces to its constructs. Editing 1711the active Modus theme but by how Org maps faces to its constructs.
1244those while =org-mode= is active requires =M-x org-mode-restart= for changes 1712Editing those while ~org-mode~ is active requires re-initialization of the
1245to take effect. 1713mode with {{{kbd(M-x org-mode-restart)}}} for changes to take effect.
1246 1714
1247Let us assume you wish to visually differentiate your keywords. You 1715Let us assume you wish to visually differentiate your keywords. You
1248have something like this: 1716have something like this:
@@ -1257,7 +1725,7 @@ have something like this:
1257 1725
1258You could then use a variant of the following to inherit from a face 1726You could then use a variant of the following to inherit from a face
1259that uses the styles you want and also to preserve the properties 1727that uses the styles you want and also to preserve the properties
1260applied by the =org-todo= face: 1728applied by the ~org-todo~ face:
1261 1729
1262#+begin_src emacs-lisp 1730#+begin_src emacs-lisp
1263(setq org-todo-keyword-faces 1731(setq org-todo-keyword-faces
@@ -1267,10 +1735,10 @@ applied by the =org-todo= face:
1267#+end_src 1735#+end_src
1268 1736
1269This will refashion the keywords you specify, while letting the other 1737This will refashion the keywords you specify, while letting the other
1270items in =org-todo-keywords= use their original styles (which are defined 1738items in ~org-todo-keywords~ use their original styles (which are defined
1271in the =org-todo= and =org-done= faces). 1739in the ~org-todo~ and ~org-done~ faces).
1272 1740
1273If you want back the defaults, try specifying just the =org-todo= face: 1741If you want back the defaults, try specifying just the ~org-todo~ face:
1274 1742
1275#+begin_src emacs-lisp 1743#+begin_src emacs-lisp
1276(setq org-todo-keyword-faces 1744(setq org-todo-keyword-faces
@@ -1282,7 +1750,7 @@ If you want back the defaults, try specifying just the =org-todo= face:
1282When you inherit from multiple faces, you need to quote the list as 1750When you inherit from multiple faces, you need to quote the list as
1283shown further above. The order is important: the last item is applied 1751shown further above. The order is important: the last item is applied
1284over the previous ones. If you do not want to blend multiple faces, you 1752over the previous ones. If you do not want to blend multiple faces, you
1285do not need a quoted list. A pattern of =keyword . face= would suffice. 1753do not need a quoted list. A pattern of =keyword . face= will suffice.
1286 1754
1287Both approaches can be used simultaneously, as illustrated in this 1755Both approaches can be used simultaneously, as illustrated in this
1288configuration of the priority cookies: 1756configuration of the priority cookies:
@@ -1295,29 +1763,182 @@ configuration of the priority cookies:
1295#+end_src 1763#+end_src
1296 1764
1297To find all the faces that are loaded in your current Emacs session, use 1765To find all the faces that are loaded in your current Emacs session, use
1298=M-x list-faces-display=. Also try =M-x describe-variable= and then specify 1766{{{kbd(M-x list-faces-display)}}}. Try {{{kbd(M-x describe-variable)}}} as well and
1299the name of each of those Org variables demonstrated above. Their 1767then specify the name of each of those Org variables demonstrated above.
1300documentation strings will offer you further guidance. 1768Their documentation strings will offer you further guidance.
1769
1770Recall that the themes let you retrieve a color from their palette. Do
1771it if you plan to control face attributes.
1772
1773[[#h:1487c631-f4fe-490d-8d58-d72ffa3bd474][Custom face specs using the themes' palette]].
1774
1775[[#h:02e25930-e71a-493d-828a-8907fc80f874][Check color combinations]].
1776
1777** Measure color contrast (DIY)
1778:properties:
1779:custom_id: h:02e25930-e71a-493d-828a-8907fc80f874
1780:end:
1781#+findex: modus-themes-contrast
1782#+findex: modus-themes-wcag-formula
1783#+cindex: Color contrast
1784
1785The themes provide the functions ~modus-themes-wcag-formula~ and
1786~modus-themes-contrast~. The former is a direct implementation of the
1787WCAG formula: <https://www.w3.org/TR/WCAG20-TECHS/G18.html>. It
1788calculates the relative luminance of a color value that is expressed in
1789hexadecimal RGB notation. While the latter function is just a
1790convenient wrapper for comparing the relative luminance between two
1791colors.
1792
1793In practice, one needs to work only with ~modus-themes-contrast~. It
1794accepts two color values and returns their contrast ratio. Values range
1795from 1 to 21 (lowest to highest). The themes are designed to always be
1796equal or higher than 7 for each combination of background and foreground
1797that they use (this is the WCAG AAA standard---the most demanding of its
1798kind).
1799
1800A couple of examples (rounded numbers):
1301 1801
1302Furthermore, consider reading the "Notes for aspiring Emacs theme 1802#+begin_src emacs-lisp
1303developers", published on 2020-08-28 by me (Protesilaos Stavrou): 1803;; Pure white with pure green
1304https://protesilaos.com/codelog/2020-08-28-notes-emacs-theme-devs/. 1804(modus-themes-contrast "#ffffff" "#00ff00")
1805;; => 1.37
1806;; That is an outright inaccessible combo
1807
1808;; Pure black with pure green
1809(modus-themes-contrast "#000000" "#00ff00")
1810;; => 15.3
1811;; That is is a highly accessible combo
1812#+end_src
1813
1814It does not matter which color value comes first. The ratio is always
1815the same.
1816
1817If one does not wish to read all the decimal points, it is possible to
1818try something like this:
1819
1820#+begin_src emacs-lisp
1821(format "%0.2f" (modus-themes-contrast "#000000" "#00ff00"))
1822#+end_src
1823
1824While it is fine to perform such calculations on a case-by-case basis,
1825it is preferable to implement formulas and tables for more demanding
1826tasks. Such instruments are provided by ~org-mode~ or ~orgtbl-mode~, both
1827of which are built into Emacs. Below is such a table that derives the
1828contrast ratio of all colors in the first column (pure red, green, blue)
1829relative to the color specified in the first row of the second column
1830(pure white) and rounds the results:
1831
1832#+begin_example
1833| | #ffffff |
1834|---------+---------|
1835| #ff0000 | 4.00 |
1836| #00ff00 | 1.37 |
1837| #0000ff | 8.59 |
1838#+tblfm: $2='(modus-themes-contrast $1 @1$2);%0.2f
1839#+end_example
1840
1841To measure color contrast one needs to start from a known value. This
1842typically is the background. The Modus themes define an expanded
1843palette in large part because certain colors are only meant to be used
1844in combination with some others. Consult the source code for the
1845minutia and relevant commentary.
1846
1847Such knowledge may prove valuable while attempting to override some of
1848the themes' colors: [[#h:307d95dd-8dbd-4ece-a543-10ae86f155a6][Override colors]].
1849
1850** Load theme depending on time of day
1851:properties:
1852:custom_id: h:1d1ef4b4-8600-4a09-993c-6de3af0ddd26
1853:end:
1854
1855While we do provide ~modus-themes-toggle~ to manually switch between the
1856themes, users may also set up their system to perform such a task
1857automatically at sunrise and sunset.
1858
1859This can be accomplished by specifying the coordinates of one's location
1860using the built-in {{{file(solar.el)}}} and then configuring the =circadian=
1861package:
1862
1863#+begin_src emacs-lisp
1864(use-package solar ; built-in
1865 :config
1866 (setq calendar-latitude 35.17
1867 calendar-longitude 33.36))
1868
1869(use-package circadian ; you need to install this
1870 :ensure
1871 :after solar
1872 (setq circadian-themes '((:sunrise . modus-operandi)
1873 (:sunset . modus-vivendi)))
1874 (circadian-setup))
1875#+end_src
1876
1877** A theme-agnostic hook for theme loading (DIY)
1878:properties:
1879:custom_id: h:86f6906b-f090-46cc-9816-1fe8aeb38776
1880:end:
1881
1882The themes are designed with the intent to be useful to Emacs users of
1883varying skill levels, from beginners to experts. This means that we try
1884to make things easier by not expecting anyone reading this document to
1885be proficient in Emacs Lisp or programming in general.
1886
1887Such a case is with the use of the ~modus-themes-after-load-theme-hook~,
1888which runs after ~modus-themes-toggle~, ~modus-themes-load-operandi~, or
1889~modus-themes-load-vivendi~ is evaluated. We recommend using that hook
1890for advanced customizations, because (1) we know for sure that it is
1891available once the themes are loaded, and (2) anyone consulting this
1892manual, especially the sections on enabling and loading the themes, will
1893be in a good position to benefit from that hook.
1894
1895Advanced users who have a need to switch between the Modus themes and
1896other items will find that such a hook does not meet their requirements:
1897it only works with the Modus themes and only with the aforementioned
1898functions.
1899
1900A theme-agnostic setup can be configured thus:
1901
1902#+begin_src emacs-lisp
1903(defvar after-enable-theme-hook nil
1904 "Normal hook run after enabling a theme.")
1905
1906(defun run-after-enable-theme-hook (&rest _args)
1907 "Run `after-enable-theme-hook'."
1908 (run-hooks 'after-enable-theme-hook))
1909
1910(advice-add 'enable-theme :after #'run-after-enable-theme-hook)
1911#+end_src
1912
1913This creates the ~after-enable-theme-hook~ and makes it run after each
1914call to ~enable-theme~, which means that it will work for all themes and
1915also has the benefit that it does not depend on functions such as
1916~modus-themes-toggle~ and the others mentioned above. ~enable-theme~ is
1917called internally by ~load-theme~, so the hook works everywhere.
1918
1919Now this specific piece of Elisp may be simple for experienced users,
1920but it is not easy to read for newcomers, including the author of the
1921Modus themes for the first several months of their time as an Emacs
1922user. Hence our hesitation to recommend it as part of the standard
1923setup of the Modus themes (it is generally a good idea to understand
1924what the implications are of advising a function).
1305 1925
1306* Face coverage 1926* Face coverage
1307:PROPERTIES: 1927:properties:
1308:CUSTOM_ID: h:a9c8f29d-7f72-4b54-b74b-ddefe15d6a19 1928:custom_id: h:a9c8f29d-7f72-4b54-b74b-ddefe15d6a19
1309:END: 1929:end:
1310 1930
1311Modus Operandi and Modus Vivendi try to provide as close to full face 1931The Modus themes try to provide as close to full face coverage as
1312coverage as possible. This is necessary to ensure a consistently 1932possible. This is necessary to ensure a consistently accessible reading
1313accessible reading experience across all possible interfaces. 1933experience across all available interfaces.
1314 1934
1315** Full support for packages or face groups 1935** Full support for packages or face groups
1316:PROPERTIES: 1936:properties:
1317:ALT_TITLE: Supported packages 1937:alt_title: Supported packages
1318:DESCRIPTION: Full list of covered face groups 1938:description: Full list of covered face groups
1319:CUSTOM_ID: h:60ed4275-60d6-49f8-9287-9a64e54bea0e 1939:custom_id: h:60ed4275-60d6-49f8-9287-9a64e54bea0e
1320:END: 1940:end:
1941#+cindex: Explicitly supported packages
1321 1942
1322This list will always be updated to reflect the current state of the 1943This list will always be updated to reflect the current state of the
1323project. The idea is to offer an overview of the known status of all 1944project. The idea is to offer an overview of the known status of all
@@ -1337,16 +1958,18 @@ have lots of extensions, so the "full support" may not be 100% true…
1337+ auto-dim-other-buffers 1958+ auto-dim-other-buffers
1338+ avy 1959+ avy
1339+ awesome-tray 1960+ awesome-tray
1961+ bbdb
1340+ binder 1962+ binder
1341+ bm 1963+ bm
1342+ bongo 1964+ bongo
1343+ boon 1965+ boon
1344+ breakpoint (provided by the built-in =gdb-mi.el= library) 1966+ breakpoint (provided by the built-in {{{file(gdb-mi.el)}}} library)
1345+ buffer-expose 1967+ buffer-expose
1346+ calendar and diary 1968+ calendar and diary
1347+ calfw 1969+ calfw
1348+ centaur-tabs 1970+ centaur-tabs
1349+ change-log and log-view (such as =vc-print-log= and =vc-print-root-log=) 1971+ cfrs
1972+ change-log and log-view (such as ~vc-print-log~, ~vc-print-root-log~)
1350+ cider 1973+ cider
1351+ circe 1974+ circe
1352+ color-rg 1975+ color-rg
@@ -1355,6 +1978,7 @@ have lots of extensions, so the "full support" may not be 100% true…
1355+ company-posframe 1978+ company-posframe
1356+ compilation-mode 1979+ compilation-mode
1357+ completions 1980+ completions
1981+ consult
1358+ counsel* 1982+ counsel*
1359+ counsel-css 1983+ counsel-css
1360+ counsel-notmuch 1984+ counsel-notmuch
@@ -1363,7 +1987,7 @@ have lots of extensions, so the "full support" may not be 100% true…
1363+ cperl-mode 1987+ cperl-mode
1364+ csv-mode 1988+ csv-mode
1365+ ctrlf 1989+ ctrlf
1366+ custom (=M-x customize=) 1990+ custom (what you get with {{{kbd(M-x customize)}}})
1367+ dap-mode 1991+ dap-mode
1368+ dashboard (emacs-dashboard) 1992+ dashboard (emacs-dashboard)
1369+ deadgrep 1993+ deadgrep
@@ -1381,8 +2005,11 @@ have lots of extensions, so the "full support" may not be 100% true…
1381+ dired-git-info 2005+ dired-git-info
1382+ dired-narrow 2006+ dired-narrow
1383+ dired-subtree 2007+ dired-subtree
2008+ diredc
1384+ diredfl 2009+ diredfl
2010+ diredp (dired+)
1385+ disk-usage 2011+ disk-usage
2012+ display-fill-column-indicator-mode
1386+ doom-modeline 2013+ doom-modeline
1387+ dynamic-ruler 2014+ dynamic-ruler
1388+ easy-jekyll 2015+ easy-jekyll
@@ -1408,8 +2035,10 @@ have lots of extensions, so the "full support" may not be 100% true…
1408+ eshell-syntax-highlighting 2035+ eshell-syntax-highlighting
1409+ evil* (evil-mode) 2036+ evil* (evil-mode)
1410+ evil-goggles 2037+ evil-goggles
2038+ evil-snipe
1411+ evil-visual-mark-mode 2039+ evil-visual-mark-mode
1412+ eww 2040+ eww
2041+ exwm
1413+ eyebrowse 2042+ eyebrowse
1414+ fancy-dabbrev 2043+ fancy-dabbrev
1415+ flycheck 2044+ flycheck
@@ -1443,7 +2072,7 @@ have lots of extensions, so the "full support" may not be 100% true…
1443+ helpful 2072+ helpful
1444+ highlight-blocks 2073+ highlight-blocks
1445+ highlight-defined 2074+ highlight-defined
1446+ highlight-escape-sequences (=hes-mode=) 2075+ highlight-escape-sequences (~hes-mode~)
1447+ highlight-indentation 2076+ highlight-indentation
1448+ highlight-numbers 2077+ highlight-numbers
1449+ highlight-symbol 2078+ highlight-symbol
@@ -1468,6 +2097,7 @@ have lots of extensions, so the "full support" may not be 100% true…
1468+ interaction-log 2097+ interaction-log
1469+ ioccur 2098+ ioccur
1470+ isearch, occur, etc. 2099+ isearch, occur, etc.
2100+ isl (isearch-light)
1471+ ivy* 2101+ ivy*
1472+ ivy-posframe 2102+ ivy-posframe
1473+ jira (org-jira) 2103+ jira (org-jira)
@@ -1477,19 +2107,22 @@ have lots of extensions, so the "full support" may not be 100% true…
1477+ jupyter 2107+ jupyter
1478+ kaocha-runner 2108+ kaocha-runner
1479+ keycast 2109+ keycast
1480+ line numbers (=display-line-numbers-mode= and global variant) 2110+ line numbers (~display-line-numbers-mode~ and global variant)
1481+ lsp-mode 2111+ lsp-mode
1482+ lsp-ui 2112+ lsp-ui
2113+ macrostep
1483+ magit 2114+ magit
1484+ magit-imerge 2115+ magit-imerge
1485+ make-mode 2116+ make-mode
1486+ man 2117+ man
2118+ marginalia
1487+ markdown-mode 2119+ markdown-mode
1488+ markup-faces (=adoc-mode=) 2120+ markup-faces (~adoc-mode~)
1489+ mentor 2121+ mentor
1490+ messages 2122+ messages
1491+ minibuffer-line 2123+ minibuffer-line
1492+ minimap 2124+ minimap
2125+ mmm-mode
1493+ modeline 2126+ modeline
1494+ mood-line 2127+ mood-line
1495+ moody 2128+ moody
@@ -1512,11 +2145,12 @@ have lots of extensions, so the "full support" may not be 100% true…
1512+ org-roam 2145+ org-roam
1513+ org-superstar 2146+ org-superstar
1514+ org-table-sticky-header 2147+ org-table-sticky-header
2148+ org-tree-slide
1515+ org-treescope 2149+ org-treescope
1516+ origami 2150+ origami
1517+ outline-mode 2151+ outline-mode
1518+ outline-minor-faces 2152+ outline-minor-faces
1519+ package (=M-x list-packages=) 2153+ package (what you get with {{{kbd(M-x list-packages)}}})
1520+ page-break-lines 2154+ page-break-lines
1521+ paradox 2155+ paradox
1522+ paren-face 2156+ paren-face
@@ -1532,23 +2166,28 @@ have lots of extensions, so the "full support" may not be 100% true…
1532+ popup 2166+ popup
1533+ powerline 2167+ powerline
1534+ powerline-evil 2168+ powerline-evil
2169+ prism ([[#h:a94272e0-99da-4149-9e80-11a7e67a2cf2][Note for prism.el]])
1535+ proced 2170+ proced
1536+ prodigy 2171+ prodigy
2172+ quick-peek
1537+ racket-mode 2173+ racket-mode
1538+ rainbow-blocks 2174+ rainbow-blocks
1539+ rainbow-identifiers 2175+ rainbow-identifiers
1540+ rainbow-delimiters 2176+ rainbow-delimiters
1541+ rcirc 2177+ rcirc
1542+ regexp-builder (also known as =re-builder=) 2178+ recursion-indicator
2179+ regexp-builder (also known as ~re-builder~)
1543+ rg (rg.el) 2180+ rg (rg.el)
1544+ ripgrep 2181+ ripgrep
1545+ rmail 2182+ rmail
1546+ ruler-mode 2183+ ruler-mode
1547+ sallet 2184+ sallet
1548+ selectrum 2185+ selectrum
2186+ selectrum-prescient
1549+ semantic 2187+ semantic
1550+ sesman 2188+ sesman
1551+ shell-script-mode 2189+ shell-script-mode
2190+ shortdoc
1552+ show-paren-mode 2191+ show-paren-mode
1553+ shr 2192+ shr
1554+ side-notes 2193+ side-notes
@@ -1557,9 +2196,11 @@ have lots of extensions, so the "full support" may not be 100% true…
1557+ smart-mode-line 2196+ smart-mode-line
1558+ smartparens 2197+ smartparens
1559+ smerge 2198+ smerge
2199+ solaire
1560+ spaceline 2200+ spaceline
1561+ speedbar 2201+ speedbar
1562+ spell-fu 2202+ spell-fu
2203+ spray
1563+ stripes 2204+ stripes
1564+ suggest 2205+ suggest
1565+ switch-window 2206+ switch-window
@@ -1570,6 +2211,7 @@ have lots of extensions, so the "full support" may not be 100% true…
1570+ syslog-mode 2211+ syslog-mode
1571+ table (built-in table.el) 2212+ table (built-in table.el)
1572+ telephone-line 2213+ telephone-line
2214+ terraform-mode
1573+ term 2215+ term
1574+ tomatinho 2216+ tomatinho
1575+ transient (pop-up windows such as Magit's) 2217+ transient (pop-up windows such as Magit's)
@@ -1580,7 +2222,7 @@ have lots of extensions, so the "full support" may not be 100% true…
1580+ typescript 2222+ typescript
1581+ undo-tree 2223+ undo-tree
1582+ vc (built-in mode line status for version control) 2224+ vc (built-in mode line status for version control)
1583+ vc-annotate (=C-x v g=) 2225+ vc-annotate (the out put of {{{kbd(C-x v g)}}})
1584+ vdiff 2226+ vdiff
1585+ vimish-fold 2227+ vimish-fold
1586+ visible-mark 2228+ visible-mark
@@ -1608,67 +2250,234 @@ Plus many other miscellaneous faces that are provided by the upstream
1608GNU Emacs distribution. 2250GNU Emacs distribution.
1609 2251
1610** Indirectly covered packages 2252** Indirectly covered packages
1611:PROPERTIES: 2253:properties:
1612:CUSTOM_ID: h:2cb359c7-3a84-4262-bab3-dcdc1d0034d7 2254:custom_id: h:2cb359c7-3a84-4262-bab3-dcdc1d0034d7
1613:END: 2255:end:
2256#+cindex: Implicitly supported packages
1614 2257
1615These do not require any extra styles because they are configured to 2258These do not require any extra styles because they are configured to
1616inherit from some basic faces. Please confirm. 2259inherit from some basic faces. Please confirm.
1617 2260
1618+ edit-indirect 2261+ edit-indirect
1619+ evil-owl 2262+ evil-owl
2263+ fortran-mode
2264+ goggles
1620+ i3wm-config-mode 2265+ i3wm-config-mode
1621+ perl-mode 2266+ perl-mode
1622+ php-mode 2267+ php-mode
1623+ rjsx-mode 2268+ rjsx-mode
1624+ swift-mode 2269+ swift-mode
1625 2270+ tab-bar-echo-area
1626** Will NOT be supported
1627:PROPERTIES:
1628:CUSTOM_ID: h:6c6e8d94-6782-47fc-9eef-ad78671e9eea
1629:END:
1630
1631I have thus far identified a single package that does fit into the
1632overarching objective of this project: [[https://github.com/hlissner/emacs-solaire-mode][solaire]]. It basically tries to
1633cast a less intense background on the main file-visiting buffers, so
1634that secondary elements like sidebars can have the default (pure
1635white/black) background.
1636
1637I will only cover this package if it ever supports the inverse effect:
1638less intense colors (but still accessible) for ancillary interfaces
1639and the intended styles for the content you are actually working on.
1640 2271
1641* Notes for individual packages 2272* Notes for individual packages
1642:PROPERTIES: 2273:properties:
1643:CUSTOM_ID: h:4c4d901a-84d7-4f20-bd99-0808c2b06eba 2274:custom_id: h:4c4d901a-84d7-4f20-bd99-0808c2b06eba
1644:END: 2275:end:
1645 2276
1646This section covers information that may be of interest to users of 2277This section covers information that may be of interest to users of
1647individual packages. 2278individual packages.
1648 2279
2280** Note for display-fill-column-indicator-mode
2281:properties:
2282:custom_id: h:2a602816-bc1b-45bf-9675-4cbbd7bf6cab
2283:end:
2284
2285While designing the style for ~display-fill-column-indicator-mode~, we
2286stayed close to the mode's defaults: to apply a subtle foreground color
2287to the ~fill-column-indicator~ face, which blends well with the rest of
2288theme and is consistent with the role of that mode. This is to not
2289upset the expectations of users.
2290
2291Nevertheless, ~display-fill-column-indicator-mode~ has some known
2292limitations pertaining to its choice of using typographic characters to
2293draw its indicator. What should be a continuous vertical line might
2294appear as a series of dashes in certain contexts or under specific
2295conditions: a non-default value for ~line-spacing~, scaled and/or
2296variable-pitch headings have been observed to cause this effect.
2297
2298Given that we cannot control such factors, it may be better for affected
2299users to deviate from the default style of the ~fill-column-indicator~
2300face. Instead of setting a foreground color, one could use a background
2301and have the foreground be indistinguishable from it. For example:
2302
2303#+begin_src emacs-lisp
2304(modus-themes-with-colors
2305 (custom-set-faces
2306 `(fill-column-indicator ((,class :background ,bg-inactive
2307 :foreground ,bg-inactive)))))
2308#+end_src
2309
2310[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]].
2311
2312** Note for mmm-mode.el background colors
2313:properties:
2314:custom_id: h:99cf0d6c-e478-4e26-9932-3bf3427d13f6
2315:end:
2316
2317The faces used by {{{file(mmm-mode.el)}}} are expected to have a colorful
2318background, while they should not touch any foreground value. The idea
2319is that they must not interfere with existing fontification. Those
2320background colors need to be distinct from each other, such as an
2321unambiguous red juxtaposed with a clear blue.
2322
2323While this design may be internally consistent with the raison d'être of
2324that library, it inevitably produces inaccessible color combinations.
2325
2326There are two competing goals at play:
2327
23281. Legibility of the text, understood as the contrast ratio between the
2329 background and the foreground.
2330
23312. Semantic precision of each face which entails faithfulness to
2332 color-coding of the underlying background.
2333
2334As the Modus themes are designed with the express purpose of conforming
2335with the first point, we have to forgo the apparent color-coding of the
2336background elements. Instead we use subtle colors that do not undermine
2337the legibility of the affected text while they still offer a sense of
2338added context.
2339
2340Users who might prefer to fall below the minimum 7:1 contrast ratio in
2341relative luminance (the accessibility target we conform with), can opt
2342to configure the relevant faces on their own.
2343
2344[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]].
2345
2346This example uses more vivid background colors, though it comes at the
2347very high cost of degraded legibility.
2348
2349#+begin_src emacs-lisp
2350(modus-themes-with-colors
2351 (custom-set-faces
2352 `(mmm-cleanup-submode-face ((,class :background ,yellow-refine-bg)))
2353 `(mmm-code-submode-face ((,class :background ,bg-active)))
2354 `(mmm-comment-submode-face ((,class :background ,blue-refine-bg)))
2355 `(mmm-declaration-submode-face ((,class :background ,cyan-refine-bg)))
2356 `(mmm-default-submode-face ((,class :background ,bg-alt)))
2357 `(mmm-init-submode-face ((,class :background ,magenta-refine-bg)))
2358 `(mmm-output-submode-face ((,class :background ,red-refine-bg)))
2359 `(mmm-special-submode-face ((,class :background ,green-refine-bg)))))
2360#+end_src
2361
2362** Note for prism.el
2363:properties:
2364:alt_title: Note for prism
2365:custom_id: h:a94272e0-99da-4149-9e80-11a7e67a2cf2
2366:end:
2367
2368This package by Adam Porter, aka "alphapapa" or "github-alphapapa",
2369implements an alternative to the typical coloration of code. Instead of
2370highlighting the syntactic constructs, it applies color to different
2371levels of depth in the code structure.
2372
2373As {{{file(prism.el)}}} offers a broad range of customisations, we cannot
2374style it directly at the theme level: that would run contrary to the
2375spirit of the package. Instead, we may offer preset color schemes.
2376Those should offer a starting point for users to adapt to their needs.
2377
2378In the following code snippets, we employ the ~modus-themes-with-colors~
2379macro: [[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]].
2380
2381These are the minimum recommended settings with 16 colors:
2382
2383#+begin_src emacs-lisp
2384(setq prism-num-faces 16)
2385
2386(prism-set-colors
2387 :desaturations '(0) ; do not change---may lower the contrast ratio
2388 :lightens '(0) ; same
2389 :colors (modus-themes-with-colors
2390 (list fg-main
2391 magenta
2392 cyan-alt-other
2393 magenta-alt-other
2394 blue
2395 magenta-alt
2396 cyan-alt
2397 red-alt-other
2398 green
2399 fg-main
2400 cyan
2401 yellow
2402 blue-alt
2403 red-alt
2404 green-alt-other
2405 fg-special-warm)))
2406#+end_src
2407
2408With 8 colors:
2409
2410#+begin_src emacs-lisp
2411(setq prism-num-faces 8)
2412
2413(prism-set-colors
2414 :desaturations '(0) ; do not change---may lower the contrast ratio
2415 :lightens '(0) ; same
2416 :colors (modus-themes-with-colors
2417 (list fg-special-cold
2418 magenta
2419 magenta-alt-other
2420 cyan-alt-other
2421 fg-main
2422 blue-alt
2423 red-alt-other
2424 cyan)))
2425#+end_src
2426
2427And this is with 4 colors, which produces results that are the closest
2428to the themes' default aesthetic:
2429
2430#+begin_src emacs-lisp
2431(setq prism-num-faces 4)
2432
2433(prism-set-colors
2434 :desaturations '(0) ; do not change---may lower the contrast ratio
2435 :lightens '(0) ; same
2436 :colors (modus-themes-with-colors
2437 (list fg-main
2438 cyan-alt-other
2439 magenta-alt-other
2440 magenta)))
2441#+end_src
2442
2443If you need to apply desaturation and lightening, you can use what the
2444{{{file(prism.el)}}} documentation recommends, like this (adapting to the
2445examples with the 4, 8, 16 colors):
2446
2447#+begin_src emacs-lisp
2448(prism-set-colors
2449 :desaturations (cl-loop for i from 0 below 16 collect (* i 2.5))
2450 :lightens (cl-loop for i from 0 below 16 collect (* i 2.5))
2451 :colors (modus-themes-with-colors
2452 (list fg-main
2453 cyan-alt-other
2454 magenta-alt-other
2455 magenta)))
2456#+end_src
2457
1649** Note on company-mode overlay pop-up 2458** Note on company-mode overlay pop-up
1650:PROPERTIES: 2459:properties:
1651:CUSTOM_ID: h:20cef8c4-d11f-4053-8b2c-2872925780b1 2460:custom_id: h:20cef8c4-d11f-4053-8b2c-2872925780b1
1652:END: 2461:end:
1653 2462
1654By default, the =company-mode= pop-up that lists completion candidates is 2463By default, the ~company-mode~ pop-up that lists completion candidates is
1655drawn using an overlay. This creates alignment issues every time it is 2464drawn using an overlay. This creates alignment issues every time it is
1656placed above a piece of text that has a different height than the 2465placed above a piece of text that has a different height than the
1657default. 2466default.
1658 2467
1659The solution recommended by the project's maintainer is to use an 2468The solution recommended by the project's maintainer is to use an
1660alternative front-end for drawing the pop-up which uses child frames 2469alternative front-end for drawing the pop-up which draws child frames
1661instead of overlays.[fn:: 2470instead of overlays.[fn::
1662https://github.com/company-mode/company-mode/issues/1010][fn:: 2471https://github.com/company-mode/company-mode/issues/1010][fn::
1663https://github.com/tumashu/company-posframe/] 2472https://github.com/tumashu/company-posframe/]
1664 2473
1665** Note for ERC escaped color sequences 2474** Note for ERC escaped color sequences
1666:PROPERTIES: 2475:properties:
1667:CUSTOM_ID: h:98bdf319-1e32-4469-8a01-771200fba65c 2476:custom_id: h:98bdf319-1e32-4469-8a01-771200fba65c
1668:END: 2477:end:
1669 2478
1670The built-in IRC client =erc= has the ability to colorise any text using 2479The built-in IRC client ~erc~ has the ability to colorise any text using
1671escape sequences that start with =^C= (inserted with =C-q C-c=) and are 2480escape sequences that start with =^C= (inserted with {{{kbd(C-q C-c)}}}) and are
1672followed by a number for the foreground and background.[fn:: This page 2481followed by a number for the foreground and background.[fn:: This page
1673explains the basics, though it is not specific to Emacs: 2482explains the basics, though it is not specific to Emacs:
1674https://www.mirc.com/colors.html] Possible numbers are 0-15, with the 2483https://www.mirc.com/colors.html] Possible numbers are 0-15, with the
@@ -1681,13 +2490,13 @@ separated by a comma. Like this =^C1,6=. The minimum setup is this:
1681 erc-interpret-mirc-color t) 2490 erc-interpret-mirc-color t)
1682#+end_src 2491#+end_src
1683 2492
1684As this allows users to make arbitrary combinations, it is impossible to 2493As this allows users the chance to make arbitrary combinations, it is
1685guarantee a consistently high contrast ratio. All we can we do is 2494impossible to guarantee a consistently high contrast ratio. All we can
1686provide guidance on the combinations that satisfy the accessibility 2495we do is provide guidance on the combinations that satisfy the
1687standard of the themes: 2496accessibility standard of the themes:
1688 2497
1689+ Modus Operandi :: Use foreground color 1 for all backgrounds from 2498+ Modus Operandi :: Use foreground color 1 for all backgrounds from
1690 2-15. Like so: =C-q C-c1,N= where =N= is the background. 2499 2-15. Like so: {{{kbd(C-q C-c1,N)}}} where =N= is the background.
1691 2500
1692+ Modus Vivendi :: Use foreground color 0 for all backgrounds from 2501+ Modus Vivendi :: Use foreground color 0 for all backgrounds from
1693 2-13. Use foreground =1= for backgrounds 14, 15. 2502 2-13. Use foreground =1= for backgrounds 14, 15.
@@ -1696,35 +2505,38 @@ Colors 0 and 1 are white and black respectively. So combine them
1696together, if you must. 2505together, if you must.
1697 2506
1698** Note for powerline or spaceline 2507** Note for powerline or spaceline
1699:PROPERTIES: 2508:properties:
1700:CUSTOM_ID: h:9130a8ba-d8e3-41be-a58b-3cb1eb7b6d17 2509:custom_id: h:9130a8ba-d8e3-41be-a58b-3cb1eb7b6d17
1701:END: 2510:end:
1702 2511
1703Both Powerline and Spaceline package users will likely need to use the 2512Both Powerline and Spaceline package users will likely need to use the
1704command =powerline-reset= whenever they make changes to their themes 2513command ~powerline-reset~ whenever they make changes to their themes
1705and/or modeline setup. 2514and/or modeline setup.
1706 2515
1707** Note on shr colors 2516** Note on SHR colors
1708:PROPERTIES: 2517:properties:
1709:CUSTOM_ID: h:4cc767dc-ffef-4c5c-9f10-82eb7b8921bf 2518:custom_id: h:4cc767dc-ffef-4c5c-9f10-82eb7b8921bf
1710:END: 2519:end:
1711 2520
1712Emacs' HTML rendering mechanism (=shr=) may need explicit configuration to 2521Emacs' HTML rendering library ({{{file(shr.el)}}}) may need explicit
1713respect the theme's colors instead of whatever specifications the 2522configuration to respect the theme's colors instead of whatever
1714webpage provides. Consult =C-h v shr-use-colors=. 2523specifications the webpage provides.
2524
2525Consult {{{kbd(C-h v shr-use-colors)}}}.
1715 2526
1716** Note for Helm grep 2527** Note for Helm grep
1717:PROPERTIES: 2528:properties:
1718:CUSTOM_ID: h:d28879a2-8e4b-4525-986e-14c0f873d229 2529:custom_id: h:d28879a2-8e4b-4525-986e-14c0f873d229
1719:END: 2530:end:
1720 2531
1721There is one face from the Helm package that is meant to highlight the 2532There is one face from the Helm package that is meant to highlight the
1722matches of a grep or grep-like command (=ag= or =ripgrep=). It is 2533matches of a grep or grep-like command (=ag= or =ripgrep=). It is
1723=helm-grep-match=. However, this face can only apply when the user does 2534~helm-grep-match~. However, this face can only apply when the user does
1724not pass =--color=always= as a command-line option for their command. 2535not pass =--color=always= as a command-line option for their command.
1725 2536
1726Here is the docstring for that face, which is defined in the 2537Here is the docstring for that face, which is defined in the
1727=helm-grep.el= library (view a library with =M-x find-library=). 2538{{{file(helm-grep.el)}}} library (you can always visit the source code with
2539{{{kbd(M-x find-library)}}}).
1728 2540
1729#+begin_quote 2541#+begin_quote
1730Face used to highlight grep matches. Have no effect when grep backend 2542Face used to highlight grep matches. Have no effect when grep backend
@@ -1734,23 +2546,23 @@ use "--color="
1734The user must either remove =--color= from the flags passed to the grep 2546The user must either remove =--color= from the flags passed to the grep
1735function, or explicitly use =--color=never= (or equivalent). Helm 2547function, or explicitly use =--color=never= (or equivalent). Helm
1736provides user-facing customization options for controlling the grep 2548provides user-facing customization options for controlling the grep
1737function's parameters, such as =helm-grep-default-command= and 2549function's parameters, such as ~helm-grep-default-command~ and
1738=helm-grep-git-grep-command=. 2550~helm-grep-git-grep-command~.
1739 2551
1740When =--color=always= is in effect, the grep output will use red text in 2552When =--color=always= is in effect, the grep output will use red text in
1741bold letter forms to present the matching part in the list of 2553bold letter forms to present the matching part in the list of
1742candidates. That style still meets the contrast ratio target of >= 7:1 2554candidates. That style still meets the contrast ratio target of >= 7:1
1743(accessibility standard WCAG AAA), because it draws the reference to 2555(accessibility standard WCAG AAA), because it draws the reference to
1744ANSI color number 1 (red) from the already-supported array of 2556ANSI color number 1 (red) from the already-supported array of
1745=ansi-color-names-vector=. 2557~ansi-color-names-vector~.
1746 2558
1747** Note on vc-annotate-background-mode 2559** Note on vc-annotate-background-mode
1748:PROPERTIES: 2560:properties:
1749:CUSTOM_ID: h:5095cbd1-e17a-419c-93e8-951c186362a3 2561:custom_id: h:5095cbd1-e17a-419c-93e8-951c186362a3
1750:END: 2562:end:
1751 2563
1752Due to the unique way =vc-annotate= (=C-x v g=) applies colors, support for 2564Due to the unique way ~vc-annotate~ ({{{kbd(C-x v g)}}}) applies colors, support
1753its background mode (=vc-annotate-background-mode=) is disabled at the 2565for its background mode (~vc-annotate-background-mode~) is disabled at the
1754theme level. 2566theme level.
1755 2567
1756Normally, such a drastic measure should not belong in a theme: assuming 2568Normally, such a drastic measure should not belong in a theme: assuming
@@ -1760,35 +2572,87 @@ while still supporting a useful built-in tool.
1760 2572
1761If there actually is a way to avoid such a course of action, without 2573If there actually is a way to avoid such a course of action, without
1762prejudice to the accessibility standard of this project, then please 2574prejudice to the accessibility standard of this project, then please
1763report as much or send patches (see [[#h:9c3cd842-14b7-44d7-84b2-a5c8bc3fc3b1][Contributing]]). 2575report as much or send patches ([[#h:9c3cd842-14b7-44d7-84b2-a5c8bc3fc3b1][Contributing]]).
2576
2577** Note on pdf-tools link hints
2578:properties:
2579:custom_id: h:2659d13e-b1a5-416c-9a89-7c3ce3a76574
2580:end:
2581
2582Hints are drawn by [[https://imagemagick.org/][ImageMagick]], not Emacs, i.e., ImageMagick doesn't
2583know about the hint face unless you tell ImageMagick about it. By
2584default, only the foreground and background color attributes are
2585passed. The below snippet adds to those the various font attributes. As
2586it queries various faces, specifically ~pdf-links-read-link~ and the faces
2587it inherits, it needs to be added to your initialization file after
2588you've customized any faces.
2589
2590#+begin_src emacs-lisp
2591(use-package pdf-links
2592 :config
2593 (let ((spec
2594 (apply #'append
2595 (mapcar
2596 (lambda (name)
2597 (list name
2598 (face-attribute 'pdf-links-read-link
2599 name nil 'default)))
2600 '(:family :width :weight :slant)))))
2601 (setq pdf-links-read-link-convert-commands
2602 `("-density" "96"
2603 "-family" ,(plist-get spec :family)
2604 "-stretch" ,(let* ((width (plist-get spec :width))
2605 (name (symbol-name width)))
2606 (replace-regexp-in-string "-" ""
2607 (capitalize name)))
2608 "-weight" ,(pcase (plist-get spec :weight)
2609 ('ultra-light "Thin")
2610 ('extra-light "ExtraLight")
2611 ('light "Light")
2612 ('semi-bold "SemiBold")
2613 ('bold "Bold")
2614 ('extra-bold "ExtraBold")
2615 ('ultra-bold "Black")
2616 (_weight "Normal"))
2617 "-style" ,(pcase (plist-get spec :slant)
2618 ('italic "Italic")
2619 ('oblique "Oblique")
2620 (_slant "Normal"))
2621 "-pointsize" "%P"
2622 "-undercolor" "%f"
2623 "-fill" "%b"
2624 "-draw" "text %X,%Y '%c'"))))
2625#+end_src
1764 2626
1765* Contributing 2627* Contributing
1766:PROPERTIES: 2628:properties:
1767:CUSTOM_ID: h:9c3cd842-14b7-44d7-84b2-a5c8bc3fc3b1 2629:custom_id: h:9c3cd842-14b7-44d7-84b2-a5c8bc3fc3b1
1768:END: 2630:end:
1769 2631
1770This section documents the canonical sources of the themes and the ways 2632This section documents the canonical sources of the themes and the ways
1771in which you can contribute to their ongoing development. 2633in which you can contribute to their ongoing development.
1772 2634
1773** Sources of the themes 2635** Sources of the themes
1774:PROPERTIES: 2636:properties:
1775:CUSTOM_ID: h:89504f1c-c9a1-4bd9-ab39-78fd0eddb47c 2637:custom_id: h:89504f1c-c9a1-4bd9-ab39-78fd0eddb47c
1776:END: 2638:end:
2639#+cindex: Sources of the themes
1777 2640
1778The =modus-operandi= and =modus-vivendi= themes are built into Emacs. 2641The ~modus-operandi~ and ~modus-vivendi~ themes are built into Emacs.
1779Currently they are in the project's =master= branch, which is tracking the 2642Currently they are in Emacs' git main branch (trunk), which is tracking
1780next development release target. 2643the next development release target.
1781 2644
1782The source code of the themes is [[https://gitlab.com/protesilaos/modus-themes/][available on Gitlab]], for the time 2645The source code of the themes is [[https://gitlab.com/protesilaos/modus-themes/][available on Gitlab]], for the time
1783being. A [[https://github.com/protesilaos/modus-themes/][mirror on Github]] is also on offer. 2646being. A [[https://github.com/protesilaos/modus-themes/][mirror on Github]] is also on offer.
1784 2647
1785An HTML version of this manual is available as an extension to the 2648An HTML version of this manual is provided as an extension of the
1786[[https://protesilaos.com/modus-themes/][author's personal website]] (does not rely on any non-free code). 2649[[https://protesilaos.com/modus-themes/][author's personal website]] (does not rely on any non-free code).
1787 2650
1788** Issues you can help with 2651** Issues you can help with
1789:PROPERTIES: 2652:properties:
1790:CUSTOM_ID: h:6536c8d5-3f98-43ab-a787-b94120e735e8 2653:custom_id: h:6536c8d5-3f98-43ab-a787-b94120e735e8
1791:END: 2654:end:
2655#+cindex: Contributing
1792 2656
1793A few tasks you can help with: 2657A few tasks you can help with:
1794 2658
@@ -1802,8 +2666,8 @@ A few tasks you can help with:
1802 2666
1803[[#h:111773e2-f26f-4b68-8c4f-9794ca6b9633][Patches require copyright assignment to the FSF]]. 2667[[#h:111773e2-f26f-4b68-8c4f-9794ca6b9633][Patches require copyright assignment to the FSF]].
1804 2668
1805It would be great if your feedback also includes some screenshots, GIFs, 2669It is preferable that your feedback includes some screenshots, GIFs, or
1806or short videos, as well as further instructions to reproduce a given 2670short videos, as well as further instructions to reproduce a given
1807setup. Though this is not a requirement. 2671setup. Though this is not a requirement.
1808 2672
1809Whatever you do, bear in mind the overarching objective of the Modus 2673Whatever you do, bear in mind the overarching objective of the Modus
@@ -1813,11 +2677,9 @@ between aesthetics and accessibility, it shall always be made in the
1813interest of the latter. 2677interest of the latter.
1814 2678
1815** Patches require copyright assignment to the FSF 2679** Patches require copyright assignment to the FSF
1816:PROPERTIES: 2680:properties:
1817:ALT_TITLE: Merge requests 2681:custom_id: h:111773e2-f26f-4b68-8c4f-9794ca6b9633
1818:DESCRIPTION: Legal considerations for code patches 2682:end:
1819:CUSTOM_ID: h:111773e2-f26f-4b68-8c4f-9794ca6b9633
1820:END:
1821 2683
1822Code contributions are most welcome. For any major edit (more than 15 2684Code contributions are most welcome. For any major edit (more than 15
1823lines, or so, in aggregate per person), you need to make a copyright 2685lines, or so, in aggregate per person), you need to make a copyright
@@ -1875,48 +2737,58 @@ your changes? Do you attend a school which might make such a claim?]
1875[Which files have you changed so far, and which new files have you written 2737[Which files have you changed so far, and which new files have you written
1876so far?] 2738so far?]
1877 2739
1878Changed a couple of themes that are part of the Emacs source code:
1879
1880./etc/themes/modus-operandi-theme.el
1881./etc/themes/modus-vivendi-theme.el
1882#+end_example 2740#+end_example
1883 2741
1884* Acknowledgements 2742* Acknowledgements
1885:PROPERTIES: 2743:properties:
1886:CUSTOM_ID: h:95c3da23-217f-404e-b5f3-56c75760ebcf 2744:custom_id: h:95c3da23-217f-404e-b5f3-56c75760ebcf
1887:END: 2745:end:
2746#+cindex: Contributors
1888 2747
1889The Modus themes are a collective effort. Every contribution counts. 2748The Modus themes are a collective effort. Every bit of work matters.
1890 2749
1891+ Author/maintainer :: Protesilaos Stavrou. 2750+ Author/maintainer :: Protesilaos Stavrou.
1892 2751
1893+ Contributions to code or documentation :: Anders Johansson, Basil 2752+ Contributions to code or documentation :: Anders Johansson, Basil
1894 L. Contovounesios, Eli Zaretskii, Madhavan Krishnan, Markus Beppler, 2753 L.{{{space()}}} Contovounesios, Carlo Zancanaro, Eli Zaretskii, Kostadin
1895 Matthew Stevenson, Shreyas Ragavan, Stefan Kangas, Vincent Murphy. 2754 Ninev, Madhavan Krishnan, Markus Beppler, Matthew Stevenson, Nicolas
1896 2755 De Jaeghere, Shreyas Ragavan, Stefan Kangas, Vincent Murphy, Xinglu
1897+ Ideas and user feedback :: Aaron Jensen, Adam Spiers, Alex Griffin, 2756 Chen.
1898 Alex Peitsinis, Alexey Shmalko, Anders Johansson, André Alexandre 2757
1899 Gomes, Arif Rezai, Basil L. Contovounesios, Damien Cassou, Dario 2758+ Ideas and user feedback :: Aaron Jensen, Adam Spiers, Adrian Manea,
1900 Gjorgjevski, David Edmondson, Davor Rotim, Divan Santana, Gerry 2759 Alex Griffin, Alex Peitsinis, Alexey Shmalko, Alok Singh, Anders
1901 Agbobada, Gianluca Recchia, Ilja Kocken, Iris Garcia, Len Trigg, 2760 Johansson, André Alexandre Gomes, Arif Rezai, Basil L.{{{space()}}}
1902 Manuel Uberti, Mark Burton, Markus Beppler, Michael Goldenberg, Murilo 2761 Contovounesios, Burgess Chang, Christian Tietze, Christopher Dimech,
1903 Pereira, Nicolas De Jaeghere, Paul Poloskov, Pierre Téchoueyres, Roman 2762 Damien Cassou, Daniel Mendler, Dario Gjorgjevski, David Edmondson,
1904 Rudakov, Ryan Phillips, Shreyas Ragavan, Simon Pugnet, Tassilo Horn, 2763 Davor Rotim, Divan Santana, Gerry Agbobada, Gianluca Recchia, Gustavo
1905 Thibaut Verron, Trey Merkley, Togan Muftuoglu, Uri Sharf, Utkarsh 2764 Barros, Hörmetjan Yiltiz, Ilja Kocken, Iris Garcia, Jeremy Friesen,
1906 Singh, Vincent Foley. As well as users: Ben, Eugene, Fourchaux, 2765 John Haman, Joshua O'Connor, Kevin Fleming, Kostadin Ninev, Len Trigg,
1907 Fredrik, Moesasji, Nick, TheBlob42, bepolymathe, dinko, doolio, 2766 Manuel Uberti, Mark Burton, Markus Beppler, Michael Goldenberg, Morgan
1908 jixiuf, okamsn, tycho garen. 2767 Smith, Murilo Pereira, Nicolas De Jaeghere, Paul Poloskov, Pete
1909 2768 Kazmier, Peter Wu, Philip K., Pierre Téchoueyres, Roman Rudakov, Ryan
1910+ Packaging :: Dhavan Vaidya (Debian), Stefan Kangas (core Emacs), 2769 Phillips, Sam Kleinman, Shreyas Ragavan, Simon Pugnet, Tassilo Horn,
1911 Stefan Monnier (GNU Elpa). 2770 Thibaut Verron, Trey Merkley, Togan Muftuoglu, Toon Claes, Uri Sharf,
2771 Utkarsh Singh, Vincent Foley. As well as users: Ben, CsBigDataHub1,
2772 Emacs Contrib, Eugene, Fourchaux, Fredrik, Moesasji, Nick, TheBlob42,
2773 bepolymathe, doolio, fleimgruber, iSeeU, jixiuf, okamsn.
2774
2775+ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii, Glenn
2776 Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core Emacs),
2777 Stefan Monnier (GNU Elpa), André Alexandre Gomes, Dimakakos Dimos,
2778 Morgan Smith, Nicolas Goaziou (Guix), Dhavan Vaidya (Debian).
1912 2779
1913+ Inspiration for certain features :: Bozhidar Batsov (zenburn-theme), 2780+ Inspiration for certain features :: Bozhidar Batsov (zenburn-theme),
1914 Fabrice Niessen (leuven-theme). 2781 Fabrice Niessen (leuven-theme).
1915 2782
2783Special thanks, in no particular order, to Manuel Uberti and Omar
2784Antolín Camarena for their long time contributions and insightful
2785commentary.
2786
1916* Meta 2787* Meta
1917:PROPERTIES: 2788:properties:
1918:CUSTOM_ID: h:13752581-4378-478c-af17-165b6e76bc1b 2789:custom_id: h:13752581-4378-478c-af17-165b6e76bc1b
1919:END: 2790:end:
2791#+cindex: Development notes
1920 2792
1921If you are curious about the principles that govern the development of 2793If you are curious about the principles that govern the development of
1922this project read the essay [[https://protesilaos.com/codelog/2020-03-17-design-modus-themes-emacs/][On the design of the Modus themes]] 2794this project read the essay [[https://protesilaos.com/codelog/2020-03-17-design-modus-themes-emacs/][On the design of the Modus themes]]
@@ -1931,32 +2803,501 @@ of this sort):
1931+ [[https://protesilaos.com/codelog/2020-07-04-modus-themes-faint-colours/][Modus themes: new "faint syntax" option]] (2020-07-04) 2803+ [[https://protesilaos.com/codelog/2020-07-04-modus-themes-faint-colours/][Modus themes: new "faint syntax" option]] (2020-07-04)
1932+ [[https://protesilaos.com/codelog/2020-07-08-modus-themes-nuanced-colours/][Modus themes: major review of "nuanced" colours]] (2020-07-08) 2804+ [[https://protesilaos.com/codelog/2020-07-08-modus-themes-nuanced-colours/][Modus themes: major review of "nuanced" colours]] (2020-07-08)
1933+ [[https://protesilaos.com/codelog/2020-09-14-modus-themes-review-blues/][Modus themes: review of blue colours]] (2020-09-14) 2805+ [[https://protesilaos.com/codelog/2020-09-14-modus-themes-review-blues/][Modus themes: review of blue colours]] (2020-09-14)
2806+ [[https://protesilaos.com/codelog/2020-12-27-modus-themes-review-rainbow-delimiters/][Modus themes: review rainbow-delimiters faces]] (2020-12-27)
2807+ [[https://protesilaos.com/codelog/2021-01-11-modus-themes-review-select-faint-colours/][Modus themes: review of select "faint" colours]] (2021-01-11)
2808+ [[https://protesilaos.com/codelog/2021-02-25-modus-themes-diffs-deuteranopia/][The Modus themes now cover deuteranopia in diffs]] (2021-02-25)
1934 2809
1935And here are the canonical sources for this project's documentation: 2810And here are the canonical sources of this project's documentation:
1936 2811
1937+ Manual :: <https://protesilaos.com/modus-themes> 2812+ Manual :: <https://protesilaos.com/modus-themes>
1938+ Change Log :: <https://protesilaos.com/modus-themes-changelog> 2813+ Change Log :: <https://protesilaos.com/modus-themes-changelog>
1939+ Screenshots :: <https://protesilaos.com/modus-themes-pictures> 2814+ Screenshots :: <https://protesilaos.com/modus-themes-pictures>
1940 2815
1941* External projects (ports)
1942:PROPERTIES:
1943:CUSTOM_ID: h:21adb7c8-2208-41e8-803c-052e42e2c05d
1944:END:
1945
1946The present section documents projects that extend the scope of the
1947Modus themes. The following list will be updated whenever relevant
1948information is brought to my attention. If you already have or intend
1949to produce such a port, feel welcome [[https://protesilaos.com/contact][to contact me]].
1950
1951+ Modus exporter :: This is [[https://github.com/polaris64/modus-exporter][an Elisp library written by Simon Pugnet]].
1952 Licensed under the terms of the GNU General Public License. It is
1953 meant to capture the color values of the active Modus theme (Operandi
1954 or Vivendi) and output it as a valid theme for some other application.
1955
1956* GNU Free Documentation License 2816* GNU Free Documentation License
1957:PROPERTIES: 2817:properties:
1958:APPENDIX: t 2818:appendix: t
1959:CUSTOM_ID: h:3077c3d2-7f90-4228-8f0a-73124f4026f6 2819:custom_id: h:3077c3d2-7f90-4228-8f0a-73124f4026f6
1960:END: 2820:end:
1961 2821
1962#+texinfo: @include doclicense.texi 2822#+texinfo: @include doclicense.texi
2823
2824#+begin_export html
2825
2826 GNU Free Documentation License
2827 Version 1.3, 3 November 2008
2828
2829
2830 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
2831 <https://fsf.org/>
2832 Everyone is permitted to copy and distribute verbatim copies
2833 of this license document, but changing it is not allowed.
2834
28350. PREAMBLE
2836
2837The purpose of this License is to make a manual, textbook, or other
2838functional and useful document "free" in the sense of freedom: to
2839assure everyone the effective freedom to copy and redistribute it,
2840with or without modifying it, either commercially or noncommercially.
2841Secondarily, this License preserves for the author and publisher a way
2842to get credit for their work, while not being considered responsible
2843for modifications made by others.
2844
2845This License is a kind of "copyleft", which means that derivative
2846works of the document must themselves be free in the same sense. It
2847complements the GNU General Public License, which is a copyleft
2848license designed for free software.
2849
2850We have designed this License in order to use it for manuals for free
2851software, because free software needs free documentation: a free
2852program should come with manuals providing the same freedoms that the
2853software does. But this License is not limited to software manuals;
2854it can be used for any textual work, regardless of subject matter or
2855whether it is published as a printed book. We recommend this License
2856principally for works whose purpose is instruction or reference.
2857
2858
28591. APPLICABILITY AND DEFINITIONS
2860
2861This License applies to any manual or other work, in any medium, that
2862contains a notice placed by the copyright holder saying it can be
2863distributed under the terms of this License. Such a notice grants a
2864world-wide, royalty-free license, unlimited in duration, to use that
2865work under the conditions stated herein. The "Document", below,
2866refers to any such manual or work. Any member of the public is a
2867licensee, and is addressed as "you". You accept the license if you
2868copy, modify or distribute the work in a way requiring permission
2869under copyright law.
2870
2871A "Modified Version" of the Document means any work containing the
2872Document or a portion of it, either copied verbatim, or with
2873modifications and/or translated into another language.
2874
2875A "Secondary Section" is a named appendix or a front-matter section of
2876the Document that deals exclusively with the relationship of the
2877publishers or authors of the Document to the Document's overall
2878subject (or to related matters) and contains nothing that could fall
2879directly within that overall subject. (Thus, if the Document is in
2880part a textbook of mathematics, a Secondary Section may not explain
2881any mathematics.) The relationship could be a matter of historical
2882connection with the subject or with related matters, or of legal,
2883commercial, philosophical, ethical or political position regarding
2884them.
2885
2886The "Invariant Sections" are certain Secondary Sections whose titles
2887are designated, as being those of Invariant Sections, in the notice
2888that says that the Document is released under this License. If a
2889section does not fit the above definition of Secondary then it is not
2890allowed to be designated as Invariant. The Document may contain zero
2891Invariant Sections. If the Document does not identify any Invariant
2892Sections then there are none.
2893
2894The "Cover Texts" are certain short passages of text that are listed,
2895as Front-Cover Texts or Back-Cover Texts, in the notice that says that
2896the Document is released under this License. A Front-Cover Text may
2897be at most 5 words, and a Back-Cover Text may be at most 25 words.
2898
2899A "Transparent" copy of the Document means a machine-readable copy,
2900represented in a format whose specification is available to the
2901general public, that is suitable for revising the document
2902straightforwardly with generic text editors or (for images composed of
2903pixels) generic paint programs or (for drawings) some widely available
2904drawing editor, and that is suitable for input to text formatters or
2905for automatic translation to a variety of formats suitable for input
2906to text formatters. A copy made in an otherwise Transparent file
2907format whose markup, or absence of markup, has been arranged to thwart
2908or discourage subsequent modification by readers is not Transparent.
2909An image format is not Transparent if used for any substantial amount
2910of text. A copy that is not "Transparent" is called "Opaque".
2911
2912Examples of suitable formats for Transparent copies include plain
2913ASCII without markup, Texinfo input format, LaTeX input format, SGML
2914or XML using a publicly available DTD, and standard-conforming simple
2915HTML, PostScript or PDF designed for human modification. Examples of
2916transparent image formats include PNG, XCF and JPG. Opaque formats
2917include proprietary formats that can be read and edited only by
2918proprietary word processors, SGML or XML for which the DTD and/or
2919processing tools are not generally available, and the
2920machine-generated HTML, PostScript or PDF produced by some word
2921processors for output purposes only.
2922
2923The "Title Page" means, for a printed book, the title page itself,
2924plus such following pages as are needed to hold, legibly, the material
2925this License requires to appear in the title page. For works in
2926formats which do not have any title page as such, "Title Page" means
2927the text near the most prominent appearance of the work's title,
2928preceding the beginning of the body of the text.
2929
2930The "publisher" means any person or entity that distributes copies of
2931the Document to the public.
2932
2933A section "Entitled XYZ" means a named subunit of the Document whose
2934title either is precisely XYZ or contains XYZ in parentheses following
2935text that translates XYZ in another language. (Here XYZ stands for a
2936specific section name mentioned below, such as "Acknowledgements",
2937"Dedications", "Endorsements", or "History".) To "Preserve the Title"
2938of such a section when you modify the Document means that it remains a
2939section "Entitled XYZ" according to this definition.
2940
2941The Document may include Warranty Disclaimers next to the notice which
2942states that this License applies to the Document. These Warranty
2943Disclaimers are considered to be included by reference in this
2944License, but only as regards disclaiming warranties: any other
2945implication that these Warranty Disclaimers may have is void and has
2946no effect on the meaning of this License.
2947
29482. VERBATIM COPYING
2949
2950You may copy and distribute the Document in any medium, either
2951commercially or noncommercially, provided that this License, the
2952copyright notices, and the license notice saying this License applies
2953to the Document are reproduced in all copies, and that you add no
2954other conditions whatsoever to those of this License. You may not use
2955technical measures to obstruct or control the reading or further
2956copying of the copies you make or distribute. However, you may accept
2957compensation in exchange for copies. If you distribute a large enough
2958number of copies you must also follow the conditions in section 3.
2959
2960You may also lend copies, under the same conditions stated above, and
2961you may publicly display copies.
2962
2963
29643. COPYING IN QUANTITY
2965
2966If you publish printed copies (or copies in media that commonly have
2967printed covers) of the Document, numbering more than 100, and the
2968Document's license notice requires Cover Texts, you must enclose the
2969copies in covers that carry, clearly and legibly, all these Cover
2970Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
2971the back cover. Both covers must also clearly and legibly identify
2972you as the publisher of these copies. The front cover must present
2973the full title with all words of the title equally prominent and
2974visible. You may add other material on the covers in addition.
2975Copying with changes limited to the covers, as long as they preserve
2976the title of the Document and satisfy these conditions, can be treated
2977as verbatim copying in other respects.
2978
2979If the required texts for either cover are too voluminous to fit
2980legibly, you should put the first ones listed (as many as fit
2981reasonably) on the actual cover, and continue the rest onto adjacent
2982pages.
2983
2984If you publish or distribute Opaque copies of the Document numbering
2985more than 100, you must either include a machine-readable Transparent
2986copy along with each Opaque copy, or state in or with each Opaque copy
2987a computer-network location from which the general network-using
2988public has access to download using public-standard network protocols
2989a complete Transparent copy of the Document, free of added material.
2990If you use the latter option, you must take reasonably prudent steps,
2991when you begin distribution of Opaque copies in quantity, to ensure
2992that this Transparent copy will remain thus accessible at the stated
2993location until at least one year after the last time you distribute an
2994Opaque copy (directly or through your agents or retailers) of that
2995edition to the public.
2996
2997It is requested, but not required, that you contact the authors of the
2998Document well before redistributing any large number of copies, to
2999give them a chance to provide you with an updated version of the
3000Document.
3001
3002
30034. MODIFICATIONS
3004
3005You may copy and distribute a Modified Version of the Document under
3006the conditions of sections 2 and 3 above, provided that you release
3007the Modified Version under precisely this License, with the Modified
3008Version filling the role of the Document, thus licensing distribution
3009and modification of the Modified Version to whoever possesses a copy
3010of it. In addition, you must do these things in the Modified Version:
3011
3012A. Use in the Title Page (and on the covers, if any) a title distinct
3013 from that of the Document, and from those of previous versions
3014 (which should, if there were any, be listed in the History section
3015 of the Document). You may use the same title as a previous version
3016 if the original publisher of that version gives permission.
3017B. List on the Title Page, as authors, one or more persons or entities
3018 responsible for authorship of the modifications in the Modified
3019 Version, together with at least five of the principal authors of the
3020 Document (all of its principal authors, if it has fewer than five),
3021 unless they release you from this requirement.
3022C. State on the Title page the name of the publisher of the
3023 Modified Version, as the publisher.
3024D. Preserve all the copyright notices of the Document.
3025E. Add an appropriate copyright notice for your modifications
3026 adjacent to the other copyright notices.
3027F. Include, immediately after the copyright notices, a license notice
3028 giving the public permission to use the Modified Version under the
3029 terms of this License, in the form shown in the Addendum below.
3030G. Preserve in that license notice the full lists of Invariant Sections
3031 and required Cover Texts given in the Document's license notice.
3032H. Include an unaltered copy of this License.
3033I. Preserve the section Entitled "History", Preserve its Title, and add
3034 to it an item stating at least the title, year, new authors, and
3035 publisher of the Modified Version as given on the Title Page. If
3036 there is no section Entitled "History" in the Document, create one
3037 stating the title, year, authors, and publisher of the Document as
3038 given on its Title Page, then add an item describing the Modified
3039 Version as stated in the previous sentence.
3040J. Preserve the network location, if any, given in the Document for
3041 public access to a Transparent copy of the Document, and likewise
3042 the network locations given in the Document for previous versions
3043 it was based on. These may be placed in the "History" section.
3044 You may omit a network location for a work that was published at
3045 least four years before the Document itself, or if the original
3046 publisher of the version it refers to gives permission.
3047K. For any section Entitled "Acknowledgements" or "Dedications",
3048 Preserve the Title of the section, and preserve in the section all
3049 the substance and tone of each of the contributor acknowledgements
3050 and/or dedications given therein.
3051L. Preserve all the Invariant Sections of the Document,
3052 unaltered in their text and in their titles. Section numbers
3053 or the equivalent are not considered part of the section titles.
3054M. Delete any section Entitled "Endorsements". Such a section
3055 may not be included in the Modified Version.
3056N. Do not retitle any existing section to be Entitled "Endorsements"
3057 or to conflict in title with any Invariant Section.
3058O. Preserve any Warranty Disclaimers.
3059
3060If the Modified Version includes new front-matter sections or
3061appendices that qualify as Secondary Sections and contain no material
3062copied from the Document, you may at your option designate some or all
3063of these sections as invariant. To do this, add their titles to the
3064list of Invariant Sections in the Modified Version's license notice.
3065These titles must be distinct from any other section titles.
3066
3067You may add a section Entitled "Endorsements", provided it contains
3068nothing but endorsements of your Modified Version by various
3069parties--for example, statements of peer review or that the text has
3070been approved by an organization as the authoritative definition of a
3071standard.
3072
3073You may add a passage of up to five words as a Front-Cover Text, and a
3074passage of up to 25 words as a Back-Cover Text, to the end of the list
3075of Cover Texts in the Modified Version. Only one passage of
3076Front-Cover Text and one of Back-Cover Text may be added by (or
3077through arrangements made by) any one entity. If the Document already
3078includes a cover text for the same cover, previously added by you or
3079by arrangement made by the same entity you are acting on behalf of,
3080you may not add another; but you may replace the old one, on explicit
3081permission from the previous publisher that added the old one.
3082
3083The author(s) and publisher(s) of the Document do not by this License
3084give permission to use their names for publicity for or to assert or
3085imply endorsement of any Modified Version.
3086
3087
30885. COMBINING DOCUMENTS
3089
3090You may combine the Document with other documents released under this
3091License, under the terms defined in section 4 above for modified
3092versions, provided that you include in the combination all of the
3093Invariant Sections of all of the original documents, unmodified, and
3094list them all as Invariant Sections of your combined work in its
3095license notice, and that you preserve all their Warranty Disclaimers.
3096
3097The combined work need only contain one copy of this License, and
3098multiple identical Invariant Sections may be replaced with a single
3099copy. If there are multiple Invariant Sections with the same name but
3100different contents, make the title of each such section unique by
3101adding at the end of it, in parentheses, the name of the original
3102author or publisher of that section if known, or else a unique number.
3103Make the same adjustment to the section titles in the list of
3104Invariant Sections in the license notice of the combined work.
3105
3106In the combination, you must combine any sections Entitled "History"
3107in the various original documents, forming one section Entitled
3108"History"; likewise combine any sections Entitled "Acknowledgements",
3109and any sections Entitled "Dedications". You must delete all sections
3110Entitled "Endorsements".
3111
3112
31136. COLLECTIONS OF DOCUMENTS
3114
3115You may make a collection consisting of the Document and other
3116documents released under this License, and replace the individual
3117copies of this License in the various documents with a single copy
3118that is included in the collection, provided that you follow the rules
3119of this License for verbatim copying of each of the documents in all
3120other respects.
3121
3122You may extract a single document from such a collection, and
3123distribute it individually under this License, provided you insert a
3124copy of this License into the extracted document, and follow this
3125License in all other respects regarding verbatim copying of that
3126document.
3127
3128
31297. AGGREGATION WITH INDEPENDENT WORKS
3130
3131A compilation of the Document or its derivatives with other separate
3132and independent documents or works, in or on a volume of a storage or
3133distribution medium, is called an "aggregate" if the copyright
3134resulting from the compilation is not used to limit the legal rights
3135of the compilation's users beyond what the individual works permit.
3136When the Document is included in an aggregate, this License does not
3137apply to the other works in the aggregate which are not themselves
3138derivative works of the Document.
3139
3140If the Cover Text requirement of section 3 is applicable to these
3141copies of the Document, then if the Document is less than one half of
3142the entire aggregate, the Document's Cover Texts may be placed on
3143covers that bracket the Document within the aggregate, or the
3144electronic equivalent of covers if the Document is in electronic form.
3145Otherwise they must appear on printed covers that bracket the whole
3146aggregate.
3147
3148
31498. TRANSLATION
3150
3151Translation is considered a kind of modification, so you may
3152distribute translations of the Document under the terms of section 4.
3153Replacing Invariant Sections with translations requires special
3154permission from their copyright holders, but you may include
3155translations of some or all Invariant Sections in addition to the
3156original versions of these Invariant Sections. You may include a
3157translation of this License, and all the license notices in the
3158Document, and any Warranty Disclaimers, provided that you also include
3159the original English version of this License and the original versions
3160of those notices and disclaimers. In case of a disagreement between
3161the translation and the original version of this License or a notice
3162or disclaimer, the original version will prevail.
3163
3164If a section in the Document is Entitled "Acknowledgements",
3165"Dedications", or "History", the requirement (section 4) to Preserve
3166its Title (section 1) will typically require changing the actual
3167title.
3168
3169
31709. TERMINATION
3171
3172You may not copy, modify, sublicense, or distribute the Document
3173except as expressly provided under this License. Any attempt
3174otherwise to copy, modify, sublicense, or distribute it is void, and
3175will automatically terminate your rights under this License.
3176
3177However, if you cease all violation of this License, then your license
3178from a particular copyright holder is reinstated (a) provisionally,
3179unless and until the copyright holder explicitly and finally
3180terminates your license, and (b) permanently, if the copyright holder
3181fails to notify you of the violation by some reasonable means prior to
318260 days after the cessation.
3183
3184Moreover, your license from a particular copyright holder is
3185reinstated permanently if the copyright holder notifies you of the
3186violation by some reasonable means, this is the first time you have
3187received notice of violation of this License (for any work) from that
3188copyright holder, and you cure the violation prior to 30 days after
3189your receipt of the notice.
3190
3191Termination of your rights under this section does not terminate the
3192licenses of parties who have received copies or rights from you under
3193this License. If your rights have been terminated and not permanently
3194reinstated, receipt of a copy of some or all of the same material does
3195not give you any rights to use it.
3196
3197
319810. FUTURE REVISIONS OF THIS LICENSE
3199
3200The Free Software Foundation may publish new, revised versions of the
3201GNU Free Documentation License from time to time. Such new versions
3202will be similar in spirit to the present version, but may differ in
3203detail to address new problems or concerns. See
3204https://www.gnu.org/licenses/.
3205
3206Each version of the License is given a distinguishing version number.
3207If the Document specifies that a particular numbered version of this
3208License "or any later version" applies to it, you have the option of
3209following the terms and conditions either of that specified version or
3210of any later version that has been published (not as a draft) by the
3211Free Software Foundation. If the Document does not specify a version
3212number of this License, you may choose any version ever published (not
3213as a draft) by the Free Software Foundation. If the Document
3214specifies that a proxy can decide which future versions of this
3215License can be used, that proxy's public statement of acceptance of a
3216version permanently authorizes you to choose that version for the
3217Document.
3218
321911. RELICENSING
3220
3221"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
3222World Wide Web server that publishes copyrightable works and also
3223provides prominent facilities for anybody to edit those works. A
3224public wiki that anybody can edit is an example of such a server. A
3225"Massive Multiauthor Collaboration" (or "MMC") contained in the site
3226means any set of copyrightable works thus published on the MMC site.
3227
3228"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
3229license published by Creative Commons Corporation, a not-for-profit
3230corporation with a principal place of business in San Francisco,
3231California, as well as future copyleft versions of that license
3232published by that same organization.
3233
3234"Incorporate" means to publish or republish a Document, in whole or in
3235part, as part of another Document.
3236
3237An MMC is "eligible for relicensing" if it is licensed under this
3238License, and if all works that were first published under this License
3239somewhere other than this MMC, and subsequently incorporated in whole or
3240in part into the MMC, (1) had no cover texts or invariant sections, and
3241(2) were thus incorporated prior to November 1, 2008.
3242
3243The operator of an MMC Site may republish an MMC contained in the site
3244under CC-BY-SA on the same site at any time before August 1, 2009,
3245provided the MMC is eligible for relicensing.
3246
3247
3248ADDENDUM: How to use this License for your documents
3249
3250To use this License in a document you have written, include a copy of
3251the License in the document and put the following copyright and
3252license notices just after the title page:
3253
3254 Copyright (c) YEAR YOUR NAME.
3255 Permission is granted to copy, distribute and/or modify this document
3256 under the terms of the GNU Free Documentation License, Version 1.3
3257 or any later version published by the Free Software Foundation;
3258 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
3259 A copy of the license is included in the section entitled "GNU
3260 Free Documentation License".
3261
3262If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
3263replace the "with...Texts." line with this:
3264
3265 with the Invariant Sections being LIST THEIR TITLES, with the
3266 Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
3267
3268If you have Invariant Sections without Cover Texts, or some other
3269combination of the three, merge those two alternatives to suit the
3270situation.
3271
3272If your document contains nontrivial examples of program code, we
3273recommend releasing these examples in parallel under your choice of
3274free software license, such as the GNU General Public License,
3275to permit their use in free software.
3276#+end_export
3277
3278#+html: <!--
3279
3280* Indices
3281:properties:
3282:custom_id: h:55104b26-8e94-46cf-9975-43ea00316489
3283:end:
3284
3285** Function index
3286:properties:
3287:index: fn
3288:custom_id: h:6bec5005-529c-4521-ae05-3d990baffb5b
3289:end:
3290
3291** Variable index
3292:properties:
3293:index: vr
3294:custom_id: h:16ad8df6-b015-40a9-9259-03d4f7a23ee4
3295:end:
3296
3297** Concept index
3298:properties:
3299:index: cp
3300:custom_id: h:6aa7a656-884b-4c39-b759-087e412eec13
3301:end:
3302
3303#+html: -->