aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorProtesilaos Stavrou2022-02-23 09:42:40 +0200
committerProtesilaos Stavrou2022-02-23 15:00:09 +0200
commitb68217fe044c68c0ca73e43a3c1dee7fb73a9284 (patch)
tree006eb53d8f85408a11de5d8f5a9539fa7dcb009e /doc/misc
parent76fcfe1eb1b6b8086cb58966801d2509fd55d9f9 (diff)
downloademacs-b68217fe044c68c0ca73e43a3c1dee7fb73a9284.tar.gz
emacs-b68217fe044c68c0ca73e43a3c1dee7fb73a9284.zip
Update modus-themes to version 2.2.0
* doc/misc/modus-themes.org (Enable and load) (Differences between loading and enabling): Clarify wording. (Customization Options): Update sample configuration. (Option for completion framework aesthetics): Refactor 'modus-themes-completions' to accept an alist value instead of a symbol. (Override colors): Elaborate on the example. (Toggle themes without reloading them): Document sample command that uses 'enable-theme' instead of 'load-theme'. (Acknowledgements): Update names of contributors to ideas. * etc/themes/modus-themes.el (modus-themes-operandi-colors) (modus-themes-vivendi-colors): Tweak the palette's completion-related background colors. (modus-themes-completion-standard-first-match) (modus-themes-completion-standard-selected) (modus-themes-completion-extra-selected): Deprecate faces and replace them with 'modus-themes-completion-selection'. (modus-themes-completion-key-binding): Rename it to 'modus-themes-key-binding'. (modus-themes-mode-line): Remove faulty default value. (modus-themes-completions): Refactor it to accept an alist value. (modus-themes-box-buttons): Fix typo. (modus-themes--standard-completions, modus-themes--extra-completions) (modus-themes--extra-completions-line): Remove outdated private functions. (modus-themes--completion): Add new private function. (modus-themes-faces): Update faces. * etc/themes/modus-operandi-theme.el: * etc/themes/modus-vivendi-theme.el: Bump file's version. For a detailed change log, read: <https://protesilaos.com/codelog/2022-02-23-modus-themes-2-2-0/>.
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/modus-themes.org265
1 files changed, 189 insertions, 76 deletions
diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org
index a3bc4684135..70f1e8bd1de 100644
--- a/doc/misc/modus-themes.org
+++ b/doc/misc/modus-themes.org
@@ -5,9 +5,9 @@
5#+options: ':t toc:nil author:t email:t num:t 5#+options: ':t toc:nil author:t email:t num:t
6#+startup: content 6#+startup: content
7 7
8#+macro: stable-version 2.1.0 8#+macro: stable-version 2.2.0
9#+macro: release-date 2022-02-17 9#+macro: release-date 2022-02-23
10#+macro: development-version 2.2.0-dev 10#+macro: development-version 2.3.0-dev
11#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@ 11#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
12#+macro: space @@texinfo:@: @@ 12#+macro: space @@texinfo:@: @@
13#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@ 13#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
@@ -260,9 +260,9 @@ a theme with either of the following expressions:
260Changes to the available customization options must always be evaluated 260Changes to the available customization options must always be evaluated
261before loading a theme ([[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization Options]]). An exception to this 261before loading a theme ([[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization Options]]). An exception to this
262norm is when using the various Custom interfaces or with commands like 262norm is when using the various Custom interfaces or with commands like
263{{{kbd(M-x customize-set-variable)}}}, which automatically reload the theme by 263{{{kbd(M-x customize-set-variable)}}}, which can automatically reload
264default ([[#h:9001527a-4e2c-43e0-98e8-3ef72d770639][Option for inhibiting theme reload]]). This is how a basic setup 264the theme ([[#h:9001527a-4e2c-43e0-98e8-3ef72d770639][Option for inhibiting theme reload]]). This is how a basic
265could look like: 265setup could look like:
266 266
267#+begin_src emacs-lisp 267#+begin_src emacs-lisp
268(require 'modus-themes) 268(require 'modus-themes)
@@ -372,9 +372,9 @@ it might appear to the unsuspecting user that the themes are somehow
372broken whenever they try to assign a new value to a customization option 372broken whenever they try to assign a new value to a customization option
373or some face. 373or some face.
374 374
375This "reset" that ~load-theme~ conducts does, however, come at the cost 375This "reset" that ~load-theme~ brings about does, however, come at the
376of being somewhat slower than ~enable-theme~. Users who have a stable 376cost of being somewhat slower than ~enable-theme~. Users who have a
377setup and who seldom update their variables during a given Emacs 377stable setup and who seldom update their variables during a given Emacs
378session, are better off using something like this: 378session, are better off using something like this:
379 379
380#+begin_src emacs-lisp 380#+begin_src emacs-lisp
@@ -385,6 +385,8 @@ session, are better off using something like this:
385(enable-theme 'modus-operandi) ;; OR (enable-theme 'modus-vivendi) 385(enable-theme 'modus-operandi) ;; OR (enable-theme 'modus-vivendi)
386#+end_src 386#+end_src
387 387
388[[#h:b40aca50-a3b2-4c43-be58-2c26fcd14237][Toggle themes without reloading them]].
389
388[[#h:e979734c-a9e1-4373-9365-0f2cd36107b8][Sample configuration with and without use-package]]. 390[[#h:e979734c-a9e1-4373-9365-0f2cd36107b8][Sample configuration with and without use-package]].
389 391
390With the above granted, other sections of the manual discuss how to 392With the above granted, other sections of the manual discuss how to
@@ -472,7 +474,22 @@ this manual.
472 ;; symbols: `background', `bold', `gray', `intense', `italic' 474 ;; symbols: `background', `bold', `gray', `intense', `italic'
473 modus-themes-prompts '(intense bold) 475 modus-themes-prompts '(intense bold)
474 476
475 modus-themes-completions 'moderate ; {nil,'moderate,'opinionated,'super-opinionated} 477 ;; The `modus-themes-completions' is an alist that reads three
478 ;; keys: `matches', `selection', `popup'. Each accepts a nil
479 ;; value (or empty list) or a list of properties that can include
480 ;; any of the following (for WEIGHT read further below):
481 ;;
482 ;; `key' - `background', `intense', `underline', `italic', WEIGHT
483 ;; `selection' - `accented', `intense', `underline', `italic', WEIGHT
484 ;; `popup' - same as `selected'
485 ;; `t' - applies to any key not explicitly referenced (check docs)
486 ;;
487 ;; WEIGHT is a symbol such as `semibold', `light', or anything
488 ;; covered in `modus-themes-weights'. Bold is used in the absence
489 ;; of an explicit WEIGHT.
490 modus-themes-completions '((matches . (extrabold))
491 (selection . (semibold accented))
492 (popup . (accented intense)))
476 493
477 modus-themes-mail-citations nil ; {nil,'intense,'faint,'monochrome} 494 modus-themes-mail-citations nil ; {nil,'intense,'faint,'monochrome}
478 495
@@ -1058,53 +1075,103 @@ Centaur tabs package.
1058** Option for completion framework aesthetics 1075** Option for completion framework aesthetics
1059:properties: 1076:properties:
1060:alt_title: Completion UIs 1077:alt_title: Completion UIs
1061:description: Choose among standard, moderate, or opinionated looks 1078:description: Choose among several styles for completion UIs
1062:custom_id: h:f1c20c02-7b34-4c35-9c65-99170efb2882 1079:custom_id: h:f1c20c02-7b34-4c35-9c65-99170efb2882
1063:end: 1080:end:
1064#+vindex: modus-themes-completions 1081#+vindex: modus-themes-completions
1065 1082
1066Brief: Set the overall style of completion framework interfaces. 1083Brief: Set the overall style of completion framework interfaces.
1067 1084
1068Symbol: ~modus-themes-completions~ (=choice= type) 1085Symbol: ~modus-themes-completions~ (=alist= type properties)
1069 1086
1070Possible values: 1087This affects Company, Corfu, Flx, Helm, Icomplete/Fido, Ido, Ivy, Mct,
1088Orderless, Selectrum, Vertico. The value is an alist that takes the
1089form of a =(key . properties)= combination. Here is a sample, followed
1090by a description of the particularities:
1071 1091
10721. ~nil~ (default) 1092#+begin_src emacs-lisp
10732. ~moderate~ 1093(setq modus-themes-completions
10743. ~opinionated~ 1094 '((matches . (extrabold background intense))
10754. ~super-opinionated~ 1095 (selection . (semibold accented intense))
1076 1096 (popup . (accented))))
1077This is a special option that has different effects depending on the 1097#+end_src
1078completion UI. The interfaces can be grouped in two categories, based 1098
1079on their default aesthetics: (i) those that only or mostly use 1099The ~matches~ key refers to the highlighted characters that correspond
1080foreground colors for their interaction model, and (ii) those that 1100to the user's input. By default (nil or an empty list), they have a
1081combine background and foreground values for some of their metaphors. 1101bold weight and a colored foreground. The list of properties may
1082The former category encompasses Icomplete, Ido, Selectrum, Vertico, Mct, 1102include any of the following symbols regardless of the order they may
1083as well as pattern matching styles like Orderless and Flx. The latter 1103appear in:
1084covers Helm and Ivy. 1104
1085 1105- ~background~ to add a background color;
1086A value of nil (the default) will simply respect the metaphors of each 1106
1087completion framework. 1107- ~intense~ to increase the overall coloration (also amplifies
1088 1108 the ~background~, if present);
1089Option ~moderate~ applies a combination of background and foreground that 1109
1090is fairly subtle. For Icomplete and friends this constitutes a 1110- ~underline~ to draw a line below the characters;
1091departure from their default aesthetics, however the difference is 1111
1092small. While Helm and Ivy appear slightly different than their original 1112- ~italic~ to use a slanted font (italic or oblique forms);
1093looks, as they are toned down a bit. 1113
1094 1114- The symbol of a font weight attribute such as ~light~, ~semibold~, et
1095Option ~opinionated~ uses color combinations that refashion the completion 1115 cetera. Valid symbols are defined in the ~modus-themes-weights~
1096UI. For the Icomplete camp this means that intense background and 1116 variable. The absence of a weight means that bold will be used.
1097foreground combinations are used: in effect their looks approximate 1117
1098those of Helm and Ivy in their original style. Whereas the other group 1118The ~selection~ key applies to the current line or currently matched
1099of packages will revert to an even more nuanced aesthetic with some 1119candidate, depending on the specifics of the User Interface. By default
1100additional changes to the choice of hues. 1120(nil or an empty list), it has a subtle gray background and a bold
1101 1121weight. The list of properties it accepts is as follows (order is not
1102Option ~super-opinionated~ is like the ~opinionated~ though it has a more 1122significant):
1103pronounced effect, especially on the color of the current 1123
1104line/candidate. 1124- ~accented~ to make the background colorful instead of gray;
1105 1125
1106To appreciate the scope of this customization option, you should spend 1126- ~intense~ to increase the overall coloration;
1107some time with every one of those presets. 1127
1128- ~underline~ to draw a line below the characters;
1129
1130- ~italic~ to use a slanted font (italic or oblique forms);
1131
1132- The symbol of a font weight attribute such as ~light~, ~semibold~, et
1133 cetera. Valid symbols are defined in the ~modus-themes-weights~
1134 variable. The absence of a weight means that bold will be used.
1135
1136The ~popup~ key takes the same values as ~selection~.
1137
1138Apart from specfying each key separately, a fallback list is accepted.
1139This is only useful when the desired aesthetic is the same across all
1140keys that are not explicitly referenced. For example, this:
1141
1142#+begin_src emacs-lisp
1143(setq modus-themes-completions
1144 '((t . (extrabold intense))))
1145#+end_src
1146
1147Is the same as:
1148
1149#+begin_src emacs-lisp
1150(setq modus-themes-completions
1151 '((matches . (extrabold intense))
1152 (selection . (extrabold intense))
1153 (popup . (extrabold intense))))
1154#+end_src
1155
1156In the case of the fallback, any property that does not apply to the
1157corresponding key is simply ignored (~matches~ does not have ~accented~,
1158~selection~ and ~popup~ do not have ~background~).
1159
1160A concise expression of those associations can be written as follows,
1161where the ~car~ is always the key and the ~cdr~ is the list of
1162properties (whatever order they may appear in):
1163
1164#+begin_src emacs-lisp
1165(setq modus-themes-completions
1166 '((matches extrabold background intense)
1167 (selection semibold accented intense)
1168 (popup accented)))
1169#+end_src
1170
1171[[#h:2793a224-2109-4f61-a106-721c57c01375][Configure bold and italic faces]].
1172
1173Also refer to the Orderless documentation for its intersection with
1174Company (if you choose to use those in tandem).
1108 1175
1109** Option for mail citations 1176** Option for mail citations
1110:properties: 1177:properties:
@@ -2551,8 +2618,7 @@ both themes and expands to some more assosiations in the palette:
2551 (bg-header . "#ede3e0") 2618 (bg-header . "#ede3e0")
2552 (bg-tab-bar . "#dcd3d3") 2619 (bg-tab-bar . "#dcd3d3")
2553 (bg-tab-active . "#fdf6eb") 2620 (bg-tab-active . "#fdf6eb")
2554 (bg-tab-inactive . "#c8bab8") 2621 (bg-tab-inactive . "#c8bab8"))
2555 (fg-unfocused . "#55556f"))
2556 modus-themes-vivendi-color-overrides 2622 modus-themes-vivendi-color-overrides
2557 '((bg-main . "#100b17") 2623 '((bg-main . "#100b17")
2558 (bg-dim . "#161129") 2624 (bg-dim . "#161129")
@@ -2564,17 +2630,34 @@ both themes and expands to some more assosiations in the palette:
2564 (bg-header . "#202037") 2630 (bg-header . "#202037")
2565 (bg-tab-bar . "#262b41") 2631 (bg-tab-bar . "#262b41")
2566 (bg-tab-active . "#120f18") 2632 (bg-tab-active . "#120f18")
2567 (bg-tab-inactive . "#3a3a5a") 2633 (bg-tab-inactive . "#3a3a5a")))
2568 (fg-unfocused . "#9a9aab")))
2569 (setq modus-themes-operandi-color-overrides nil 2634 (setq modus-themes-operandi-color-overrides nil
2570 modus-themes-vivendi-color-overrides nil))) 2635 modus-themes-vivendi-color-overrides nil)))
2571#+end_src 2636#+end_src
2572 2637
2573With this in place, one can invoke {{{kbd(M-x my-modus-themes-tinted)}}} and 2638A more neutral style for ~modus-themes-operandi-color-overrides~ can
2574then load the Modus theme of their choice. The new palette subset will 2639look like this:
2575come into effect: subtle ochre tints for Modus Operandi and night sky 2640
2576shades for Modus Vivendi. Switching between the two themes, such as 2641#+begin_src emacs-lisp
2577with {{{kbd(M-x modus-themes-toggle)}}} will also use the overrides. 2642'((bg-main . "#f7f7f7")
2643 (bg-dim . "#f2f2f2")
2644 (bg-alt . "#e8e8e8")
2645 (bg-hl-line . "#eaeaef")
2646 (bg-active . "#e0e0e0")
2647 (bg-inactive . "#e6e6e6")
2648 (bg-region . "#b5b5b5")
2649 (bg-header . "#e4e4e4")
2650 (bg-tab-bar . "#d1d1d4")
2651 (bg-tab-active . "#f5f5f5")
2652 (bg-tab-inactive . "#c0c0c0"))
2653#+end_src
2654
2655With those in place, one can use {{{kbd(M-x my-modus-themes-tinted)}}}
2656and then load the Modus theme of their choice. The new palette subset
2657will come into effect: subtle ochre tints (or shades of gray) for Modus
2658Operandi and night sky blue shades for Modus Vivendi. Switching between
2659the two themes, such as with {{{kbd(M-x modus-themes-toggle)}}} will
2660also use the overrides.
2578 2661
2579Given that this is a user-level customisation, one is free to implement 2662Given that this is a user-level customisation, one is free to implement
2580whatever color values they desire, even if the possible combinations 2663whatever color values they desire, even if the possible combinations
@@ -3465,6 +3548,35 @@ to be specified as well:
3465(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces) 3548(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces)
3466#+end_src 3549#+end_src
3467 3550
3551** Toggle themes without reloading them
3552:properties:
3553:custom_id: h:b40aca50-a3b2-4c43-be58-2c26fcd14237
3554:end:
3555#+cindex: Switch themes without load-theme
3556
3557Users who have a stable setup and who only ever need to toggle between
3558the themes without triggering a full reload, are better off defining
3559their own command which calls ~enable-theme~ instead of ~load-theme~:
3560
3561#+begin_src emacs-lisp
3562(defun my-modus-themes-toggle ()
3563 "Toggle between `modus-operandi' and `modus-vivendi' themes.
3564This uses `enable-theme' instead of the standard method of
3565`load-theme'. The technicalities are covered in the Modus themes
3566manual."
3567 (interactive)
3568 (pcase (modus-themes--current-theme)
3569 ('modus-operandi (progn (enable-theme 'modus-vivendi)
3570 (disable-theme 'modus-operandi)))
3571 ('modus-vivendi (progn (enable-theme 'modus-operandi)
3572 (disable-theme 'modus-vivendi)))
3573 (_ (error "No Modus theme is loaded; evaluate `modus-themes-load-themes' first"))))
3574#+end_src
3575
3576[[#h:e68560b3-7fb0-42bc-a151-e015948f8a35][Differences between loading and enabling]].
3577
3578Recall that ~modus-themes-toggle~ uses ~load-theme~.
3579
3468** A theme-agnostic hook for theme loading 3580** A theme-agnostic hook for theme loading
3469:properties: 3581:properties:
3470:custom_id: h:86f6906b-f090-46cc-9816-1fe8aeb38776 3582:custom_id: h:86f6906b-f090-46cc-9816-1fe8aeb38776
@@ -5173,25 +5285,26 @@ The Modus themes are a collective effort. Every bit of work matters.
5173+ Ideas and user feedback :: Aaron Jensen, Adam Porter, Adam Spiers, 5285+ Ideas and user feedback :: Aaron Jensen, Adam Porter, Adam Spiers,
5174 Adrian Manea, Alex Griffin, Alex Koen, Alex Peitsinis, Alexey Shmalko, 5286 Adrian Manea, Alex Griffin, Alex Koen, Alex Peitsinis, Alexey Shmalko,
5175 Alok Singh, Anders Johansson, André Alexandre Gomes, Arif Rezai, Basil 5287 Alok Singh, Anders Johansson, André Alexandre Gomes, Arif Rezai, Basil
5176 L.{{{space()}}} Contovounesios, Burgess Chang, Christian Tietze, Christopher 5288 L.{{{space()}}} Contovounesios, Burgess Chang, Christian Tietze,
5177 Dimech, Damien Cassou, Daniel Mendler, Dario Gjorgjevski, David 5289 Christopher Dimech, Damien Cassou, Daniel Mendler, Dario Gjorgjevski,
5178 Edmondson, Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele Michele 5290 David Edmondson, Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele
5179 Alberto Monterosso, Farasha Euker, Feng Shu, Gautier Ponsinet, Gerry 5291 Michele Alberto Monterosso, Farasha Euker, Feng Shu, Gautier Ponsinet,
5180 Agbobada, Gianluca Recchia, Guilherme Semente, Gustavo Barros, 5292 Gerry Agbobada, Gianluca Recchia, Guilherme Semente, Gustavo Barros,
5181 Hörmetjan Yiltiz, Ilja Kocken, Iris Garcia, Jeremy Friesen, Jerry 5293 Hörmetjan Yiltiz, Ilja Kocken, Iris Garcia, Jeremy Friesen, Jerry
5182 Zhang, Johannes Grødem, John Haman, Joshua O'Connor, Kevin Fleming, 5294 Zhang, Johannes Grødem, John Haman, Joshua O'Connor, Kenta Usami,
5183 Kévin Le Gouguec, Kostadin Ninev, Len Trigg, Magne Hov, Manuel Uberti, 5295 Kevin Fleming, Kévin Le Gouguec, Kostadin Ninev, Len Trigg, Magne Hov,
5184 Mark Bestley, Mark Burton, Markus Beppler, Mauro Aranda, Michael 5296 Manuel Uberti, Mark Bestley, Mark Burton, Markus Beppler, Mauro
5185 Goldenberg, Morgan Smith, Murilo Pereira, Nicky van Foreest, Nicolas 5297 Aranda, Michael Goldenberg, Morgan Smith, Murilo Pereira, Nicky van
5186 De Jaeghere, Paul Poloskov, Pengji Zhang, Pete Kazmier, Peter Wu, 5298 Foreest, Nicolas De Jaeghere, Paul Poloskov, Pengji Zhang, Pete
5187 Philip Kaludercic, Pierre Téchoueyres, Roman Rudakov, Ryan Phillips, 5299 Kazmier, Peter Wu, Philip Kaludercic, Pierre Téchoueyres, Roman
5188 Rudolf Adamkovič, Sam Kleinman, Samuel Culpepper, Saša Janiška, 5300 Rudakov, Ryan Phillips, Rudolf Adamkovič, Sam Kleinman, Samuel
5189 Shreyas Ragavan, Simon Pugnet, Tassilo Horn, Thibaut Verron, Thomas 5301 Culpepper, Saša Janiška, Shreyas Ragavan, Simon Pugnet, Tassilo Horn,
5190 Heartman, Togan Muftuoglu, Trey Merkley, Tomasz Hołubowicz, Toon 5302 Thibaut Verron, Thomas Heartman, Togan Muftuoglu, Trey Merkley, Tomasz
5191 Claes, Uri Sharf, Utkarsh Singh, Vincent Foley. As well as users: 5303 Hołubowicz, Toon Claes, Uri Sharf, Utkarsh Singh, Vincent Foley. As
5192 Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux, Fredrik, 5304 well as users: Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux,
5193 Moesasji, Nick, TheBlob42, Trey, bepolymathe, bit9tream, derek-upham, 5305 Fredrik, Moesasji, Nick, TheBlob42, Trey, bepolymathe, bit9tream,
5194 doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn, pRot0ta1p. 5306 derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn,
5307 pRot0ta1p.
5195 5308
5196+ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii, Glenn 5309+ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii, Glenn
5197 Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core Emacs), 5310 Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core Emacs),