aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorProtesilaos Stavrou2024-10-27 18:04:31 +0200
committerProtesilaos Stavrou2024-10-27 18:04:31 +0200
commit9e40d3f2a1c2b5388a4eab72dbe506a21816f69b (patch)
tree06ac7c7cdc6731500cbbf68ab7fae9f41e1e31ae
parentaeaeccbe3219c655b091fa3867c87b02b6289a1b (diff)
downloademacs-9e40d3f2a1c2b5388a4eab72dbe506a21816f69b.tar.gz
emacs-9e40d3f2a1c2b5388a4eab72dbe506a21816f69b.zip
Update modus-themes to their version 4.6.0
* doc/misc/modus-themes.org (Differences between loading and enabling) (Option for which themes to toggle) (Option for which themes to rotate, DIY Palette override presets) (DIY Add padding to the mode line) (DIY Remap face with local value): Fix typos. (DIY Add support for solaire-mode): Fix some symbols. (Full support for packages or face groups) (Indirectly covered packages): Add newly supported packages. (DIY Add support for combobulate):, (DIY Add support for engrave-faces, DIY Add support for howm) (DIY Add support for meow-mode): Document how to style those packages. (Acknowledgements): Update names of people who have in one way or another contributed to the project. * etc/themes/modus-operandi-deuteranopia-theme.el: * etc/themes/modus-operandi-theme.el: * etc/themes/modus-operandi-tinted-theme.el: * etc/themes/modus-operandi-tritanopia-theme.el: * etc/themes/modus-vivendi-deuteranopia-theme.el: * etc/themes/modus-vivendi-theme.el: * etc/themes/modus-vivendi-tinted-theme.el: * etc/themes/modus-vivendi-tritanopia-theme.el: * etc/themes/modus-themes.el: Make refinements to supported faces, add support for more faces, and tweak palette entries. Release notes: <https://protesilaos.com/codelog/2024-10-27-modus-themes-4.6.0/>.
-rw-r--r--doc/misc/modus-themes.org305
-rw-r--r--etc/themes/modus-operandi-deuteranopia-theme.el4
-rw-r--r--etc/themes/modus-operandi-theme.el10
-rw-r--r--etc/themes/modus-operandi-tinted-theme.el10
-rw-r--r--etc/themes/modus-operandi-tritanopia-theme.el4
-rw-r--r--etc/themes/modus-themes.el153
-rw-r--r--etc/themes/modus-vivendi-deuteranopia-theme.el6
-rw-r--r--etc/themes/modus-vivendi-theme.el12
-rw-r--r--etc/themes/modus-vivendi-tinted-theme.el12
-rw-r--r--etc/themes/modus-vivendi-tritanopia-theme.el6
10 files changed, 426 insertions, 96 deletions
diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org
index c02da3fbad1..76379d1a168 100644
--- a/doc/misc/modus-themes.org
+++ b/doc/misc/modus-themes.org
@@ -4,9 +4,9 @@
4#+language: en 4#+language: en
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#+macro: stable-version 4.5.0 7#+macro: stable-version 4.6.0
8#+macro: release-date 2024-08-21 8#+macro: release-date 2024-10-27
9#+macro: development-version 4.6.0-dev 9#+macro: development-version 4.7.0-dev
10#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@ 10#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
11#+macro: space @@texinfo:@: @@ 11#+macro: space @@texinfo:@: @@
12#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@ 12#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
@@ -50,7 +50,7 @@ Current development target is {{{development-version}}}.
50:custom_id: h:b14c3fcb-13dd-4144-9d92-2c58b3ed16d3 50:custom_id: h:b14c3fcb-13dd-4144-9d92-2c58b3ed16d3
51:end: 51:end:
52 52
53Copyright (C) 2020-2023 Free Software Foundation, Inc. 53Copyright (C) 2020-2024 Free Software Foundation, Inc.
54 54
55#+begin_quote 55#+begin_quote
56Permission is granted to copy, distribute and/or modify this document 56Permission is granted to copy, distribute and/or modify this document
@@ -486,7 +486,7 @@ The reason we recommend ~load-theme~ instead of the other option of
486~enable-theme~ is that the former does a kind of "reset" on the face 486~enable-theme~ is that the former does a kind of "reset" on the face
487specs. It quite literally loads (or reloads) the theme. Whereas the 487specs. It quite literally loads (or reloads) the theme. Whereas the
488~enable-theme~ function simply puts an already loaded theme to the top 488~enable-theme~ function simply puts an already loaded theme to the top
489of the list of enabled items, re-using whatever state was last loaded. 489of the list of enabled items, reusing whatever state was last loaded.
490 490
491As such, ~load-theme~ reads all customizations that may happen during 491As such, ~load-theme~ reads all customizations that may happen during
492any given Emacs session: even after the initial setup of a theme. 492any given Emacs session: even after the initial setup of a theme.
@@ -707,10 +707,12 @@ Advanced users may also want to configure the exact attributes of the
707:PROPERTIES: 707:PROPERTIES:
708:CUSTOM_ID: h:4fbfed66-5a89-447a-a07d-a03f6819c5bd 708:CUSTOM_ID: h:4fbfed66-5a89-447a-a07d-a03f6819c5bd
709:END: 709:END:
710#+vindex: modus-themes-to-toggle
711 710
712Brief: Choose to Modus themes to toggle between 711#+findex: modus-themes-toggle
712Brief: Specify which two themes to toggle between when using the command
713~modus-themes-toggle~.
713 714
715#+vindex: modus-themes-to-toggle
714Symbol: ~modus-themes-to-toggle~ (=list= type) 716Symbol: ~modus-themes-to-toggle~ (=list= type)
715 717
716Default value: ='(modus-operandi modus-vivendi)= 718Default value: ='(modus-operandi modus-vivendi)=
@@ -718,16 +720,38 @@ Default value: ='(modus-operandi modus-vivendi)=
718Possible values: 720Possible values:
719 721
720- ~modus-operandi~ 722- ~modus-operandi~
721- ~modus-vivendi~
722- ~modus-operandi-tinted~ 723- ~modus-operandi-tinted~
723- ~modus-vivendi-tinted~
724- ~modus-operandi-deuteranopia~ 724- ~modus-operandi-deuteranopia~
725- ~modus-vivendi-deuteranopia~
726- ~modus-operandi-tritanopia~ 725- ~modus-operandi-tritanopia~
726- ~modus-vivendi~
727- ~modus-vivendi-tinted~
728- ~modus-vivendi-deuteranopia~
727- ~modus-vivendi-tritanopia~ 729- ~modus-vivendi-tritanopia~
728 730
729Specify two themes to toggle between using the command 731** Option for which themes to rotate
730~modus-themes-toggle~. 732:PROPERTIES:
733:CUSTOM_ID: h:a10c0202-3683-4fad-9897-433c25e255f6
734:END:
735
736#+findex: modus-themes-rotate
737Brief: Specify which themes to rotate among when using the command
738~modus-themes-rotate~.
739
740#+vindex: modus-themes-to-rotate
741Symbol: ~modus-themes-to-rotate~ (=list= type)
742
743Default value: =modus-themes-items= (which includes all the Modus themes)
744
745Possible values:
746
747- ~modus-operandi~
748- ~modus-operandi-tinted~
749- ~modus-operandi-deuteranopia~
750- ~modus-operandi-tritanopia~
751- ~modus-vivendi~
752- ~modus-vivendi-tinted~
753- ~modus-vivendi-deuteranopia~
754- ~modus-vivendi-tritanopia~
731 755
732** Option for font mixing 756** Option for font mixing
733:properties: 757:properties:
@@ -1517,6 +1541,101 @@ the general idea (extra space for didactic purposes):
1517 ,@modus-themes-preset-overrides-intense)) 1541 ,@modus-themes-preset-overrides-intense))
1518#+end_src 1542#+end_src
1519 1543
1544** DIY Add support for ~engrave-faces~
1545:PROPERTIES:
1546:CUSTOM_ID: h:6c3f87a8-3573-43de-89e0-53f567c0ede1
1547:END:
1548
1549The ~engraved-faces~ package is used as part of an Org export process
1550to produce decent colors in the output. Its default style though
1551requires changes to use the colors of the active Modus theme.
1552
1553In the code below we show how to map everything that ~engrave-faces~
1554defines to the corresponding entry in the palette of the active Modus
1555theme. We then use a hook to ensure that the value is updated after we
1556switch to another theme in the collection ([[#h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24][DIY Use a hook at the post-load-theme phase]]).
1557
1558#+begin_src emacs-lisp
1559(defun my-modus-themes-engraved-faces (&rest _)
1560 (modus-themes-with-colors
1561 (setq engrave-faces-themes
1562 `((default .
1563 (;; faces.el --- excluding: bold, italic, bold-italic, underline, and some others
1564 (default :short "default" :slug "D" :foreground ,fg-main :background ,bg-main :family "Monospace")
1565 (variable-pitch :short "var-pitch" :slug "vp" :foreground ,fg-main :family "Sans Serif")
1566 (shadow :short "shadow" :slug "h" :foreground ,fg-dim)
1567 (success :short "success" :slug "sc" :foreground ,green :weight bold)
1568 (warning :short "warning" :slug "w" :foreground ,warning :weight bold)
1569 (error :short "error" :slug "e" :foreground ,err :weight bold)
1570 (link :short "link" :slug "l" :foreground ,fg-link)
1571 (link-visited :short "link" :slug "lv" :foreground ,fg-link-visited)
1572 (highlight :short "link" :slug "hi" :foreground ,info)
1573 ;; font-lock.el
1574 (font-lock-comment-face :short "fl-comment" :slug "c" :foreground ,comment)
1575 (font-lock-comment-delimiter-face :short "fl-comment-delim" :slug "cd" :foreground ,comment)
1576 (font-lock-string-face :short "fl-string" :slug "s" :foreground ,string)
1577 (font-lock-doc-face :short "fl-doc" :slug "d" :foreground ,docstring)
1578 (font-lock-doc-markup-face :short "fl-doc-markup" :slug "m" :foreground ,docmarkup)
1579 (font-lock-keyword-face :short "fl-keyword" :slug "k" :foreground ,keyword)
1580 (font-lock-builtin-face :short "fl-builtin" :slug "b" :foreground ,builtin)
1581 (font-lock-function-name-face :short "fl-function" :slug "f" :foreground ,fnname)
1582 (font-lock-variable-name-face :short "fl-variable" :slug "v" :foreground ,variable)
1583 (font-lock-type-face :short "fl-type" :slug "t" :foreground ,type)
1584 (font-lock-constant-face :short "fl-constant" :slug "o" :foreground ,constant)
1585 (font-lock-warning-face :short "fl-warning" :slug "wr" :foreground ,warning :weight bold)
1586 (font-lock-negation-char-face :short "fl-neg-char" :slug "nc")
1587 (font-lock-preprocessor-face :short "fl-preprocessor" :slug "pp" :foreground ,preprocessor)
1588 (font-lock-regexp-grouping-construct :short "fl-regexp" :slug "rc" :weight bold)
1589 (font-lock-regexp-grouping-backslash :short "fl-regexp-backslash" :slug "rb" :weight bold)
1590 ;; org-faces.el
1591 (org-block :short "org-block" :slug "ob") ; forcing no background is preferable
1592 (org-block-begin-line :short "org-block-begin" :slug "obb") ; forcing no background is preferable
1593 (org-block-end-line :short "org-block-end" :slug "obe") ; forcing no background is preferable
1594 ;; outlines
1595 (outline-1 :short "outline-1" :slug "Oa" :foreground ,fg-heading-1)
1596 (outline-2 :short "outline-2" :slug "Ob" :foreground ,fg-heading-2)
1597 (outline-3 :short "outline-3" :slug "Oc" :foreground ,fg-heading-3)
1598 (outline-4 :short "outline-4" :slug "Od" :foreground ,fg-heading-4)
1599 (outline-5 :short "outline-5" :slug "Oe" :foreground ,fg-heading-5)
1600 (outline-6 :short "outline-6" :slug "Of" :foreground ,fg-heading-6)
1601 (outline-7 :short "outline-7" :slug "Og" :foreground ,fg-heading-7)
1602 (outline-8 :short "outline-8" :slug "Oh" :foreground ,fg-heading-8)
1603 ;; highlight-numbers.el
1604 (highlight-numbers-number :short "hl-number" :slug "hn" :foreground ,number)
1605 ;; highlight-quoted.el
1606 (highlight-quoted-quote :short "hl-qquote" :slug "hq" :foreground ,string)
1607 (highlight-quoted-symbol :short "hl-qsymbol" :slug "hs" :foreground ,constant)
1608 ;; rainbow-delimiters.el
1609 (rainbow-delimiters-depth-1-face :short "rd-1" :slug "rda" :foreground ,rainbow-0)
1610 (rainbow-delimiters-depth-2-face :short "rd-2" :slug "rdb" :foreground ,rainbow-1)
1611 (rainbow-delimiters-depth-3-face :short "rd-3" :slug "rdc" :foreground ,rainbow-2)
1612 (rainbow-delimiters-depth-4-face :short "rd-4" :slug "rdd" :foreground ,rainbow-3)
1613 (rainbow-delimiters-depth-5-face :short "rd-5" :slug "rde" :foreground ,rainbow-4)
1614 (rainbow-delimiters-depth-6-face :short "rd-6" :slug "rdf" :foreground ,rainbow-5)
1615 (rainbow-delimiters-depth-7-face :short "rd-7" :slug "rdg" :foreground ,rainbow-6)
1616 (rainbow-delimiters-depth-8-face :short "rd-8" :slug "rdh" :foreground ,rainbow-7)
1617 (rainbow-delimiters-depth-9-face :short "rd-9" :slug "rdi" :foreground ,rainbow-8)
1618 ;; ansi-color
1619 (ansi-color-yellow :short "ansi-yellow" :slug "any" :foreground ,fg-term-yellow)
1620 (ansi-color-red :short "ansi-red" :slug "anr" :foreground ,fg-term-red)
1621 (ansi-color-black :short "ansi-black" :slug "anb" :foreground ,fg-term-black)
1622 (ansi-color-green :short "ansi-green" :slug "ang" :foreground ,fg-term-green)
1623 (ansi-color-blue :short "ansi-blue" :slug "anB" :foreground ,fg-term-blue)
1624 (ansi-color-cyan :short "ansi-cyan" :slug "anc" :foreground ,fg-term-cyan)
1625 (ansi-color-white :short "ansi-white" :slug "anw" :foreground ,fg-term-white)
1626 (ansi-color-magenta :short "ansi-magenta" :slug "anm" :foreground ,fg-term-magenta)
1627 (ansi-color-bright-yellow :short "ansi-bright-yellow" :slug "ANy" :foreground ,fg-term-yellow-bright)
1628 (ansi-color-bright-red :short "ansi-bright-red" :slug "ANr" :foreground ,fg-term-red-bright)
1629 (ansi-color-bright-black :short "ansi-bright-black" :slug "ANb" :foregroun ,fg-term-black-bright)
1630 (ansi-color-bright-green :short "ansi-bright-green" :slug "ANg" :foreground ,fg-term-green-bright)
1631 (ansi-color-bright-blue :short "ansi-bright-blue" :slug "ANB" :foreground ,fg-term-blue-bright)
1632 (ansi-color-bright-cyan :short "ansi-bright-cyan" :slug "ANc" :foreground ,fg-term-cyan-bright)
1633 (ansi-color-bright-white :short "ansi-bright-white" :slug "ANw" :foregroun ,fg-term-white-bright)
1634 (ansi-color-bright-magenta :short "ansi-bright-magenta" :slug "ANm" :foregroun ,fg-term-magenta-bright)))))))
1635
1636(add-hook 'enable-theme-functions #'my-modus-themes-engraved-faces)
1637#+end_src
1638
1520** DIY Stylistic variants using palette overrides 1639** DIY Stylistic variants using palette overrides
1521:PROPERTIES: 1640:PROPERTIES:
1522:CUSTOM_ID: h:df1199d8-eaba-47db-805d-6b568a577bf3 1641:CUSTOM_ID: h:df1199d8-eaba-47db-805d-6b568a577bf3
@@ -2892,7 +3011,7 @@ above:
2892The reason we no longer provide this option is because it depends on a 3011The reason we no longer provide this option is because it depends on a
2893non-~nil~ value for ~x-underline-at-descent-line~. That variable 3012non-~nil~ value for ~x-underline-at-descent-line~. That variable
2894affects ALL underlines, including those of links. The effect is 3013affects ALL underlines, including those of links. The effect is
2895intrusive and looks awkard in prose. 3014intrusive and looks awkward in prose.
2896 3015
2897As such, the Modus themes no longer provide that option but instead 3016As such, the Modus themes no longer provide that option but instead
2898offer this piece of documentation to make the user fully aware of the 3017offer this piece of documentation to make the user fully aware of the
@@ -2907,7 +3026,7 @@ Reload the theme for changes to take effect.
2907#+cindex: Remapping faces 3026#+cindex: Remapping faces
2908 3027
2909There are cases where we need to change the buffer-local attributes of a 3028There are cases where we need to change the buffer-local attributes of a
2910face. This might be because we have our own minor mode that re-uses a 3029face. This might be because we have our own minor mode that reuses a
2911face for a particular purpose, such as a line selection tool that 3030face for a particular purpose, such as a line selection tool that
2912activates ~hl-line-mode~, but we wish to keep it distinct from other 3031activates ~hl-line-mode~, but we wish to keep it distinct from other
2913buffers. This is where ~face-remap-add-relative~ can be applied and may 3032buffers. This is where ~face-remap-add-relative~ can be applied and may
@@ -3837,7 +3956,7 @@ on what we cover at length elsewhere in this manual:
3837 (modus-themes-with-colors 3956 (modus-themes-with-colors
3838 (custom-set-faces 3957 (custom-set-faces
3839 `(solaire-default-face ((,c :inherit default :background ,bg-dim :foreground ,fg-dim))) 3958 `(solaire-default-face ((,c :inherit default :background ,bg-dim :foreground ,fg-dim)))
3840 `(solaire-line-number-face ((,c :inherit solaire-default-face :foreground ,fg-unfocused))) 3959 `(solaire-line-number-face ((,c :inherit solaire-default-face :foreground ,fg-dim)))
3841 `(solaire-hl-line-face ((,c :background ,bg-active))) 3960 `(solaire-hl-line-face ((,c :background ,bg-active)))
3842 `(solaire-org-hide-face ((,c :background ,bg-dim :foreground ,bg-dim)))))) 3961 `(solaire-org-hide-face ((,c :background ,bg-dim :foreground ,bg-dim))))))
3843 3962
@@ -3848,6 +3967,127 @@ on what we cover at length elsewhere in this manual:
3848 3967
3849Reload the theme for changes to take effect. 3968Reload the theme for changes to take effect.
3850 3969
3970** DIY Add support for meow-mode
3971:PROPERTIES:
3972:CUSTOM_ID: h:caa5a5c4-18fb-4b9f-91f9-883f216fce41
3973:END:
3974
3975The ~meow~ package provides a modal editing experience. It is meant to
3976build on top of the key bindings the user is already familiar with. My
3977problem as an outsider is that I cannot make sense of all the contexts
3978where its faces are used in, so I cannot make a good choice of which
3979styles to use. The following is but a basic attempt to get started.
3980
3981#+begin_src emacs-lisp
3982;; This is not complete, because it is difficult for a non-user to
3983;; make sense of where all the faces are used in.
3984(defun my-modus-themes-custom-faces (&rest _)
3985 (modus-themes-with-colors
3986 (custom-set-faces
3987 ;; FIXME: What is a "region cursor" and should it differ from the position highlights below?
3988 `(meow-region-cursor-1 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-0)))
3989 `(meow-region-cursor-2 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-1)))
3990 `(meow-region-cursor-3 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-2)))
3991
3992 `(meow-position-highlight-number-1 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-0)))
3993 `(meow-position-highlight-number-2 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-1)))
3994 `(meow-position-highlight-number-3 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-2))))))
3995
3996(add-hook 'enable-theme-functions #'my-modus-themes-custom-faces)
3997#+end_src
3998
3999[[#h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24][Using a hook at the post-load-theme phase]].
4000
4001** DIY Add support for combobulate
4002:PROPERTIES:
4003:CUSTOM_ID: h:e94bdd17-1c2d-41b5-86c5-83462bd8f30c
4004:END:
4005
4006The ~combobulate~ package provides the means to operate on text that
4007is underpinned by the ~tree-sitter~ program. Because this is a
4008specialized case that requires intimate knowledge of the
4009technicalities, I am not adding support for this package directly at
4010the theme level. Users can try this instead:
4011
4012#+begin_src emacs-lisp
4013(defun my-modus-themes-custom-faces (&rest _)
4014 (modus-themes-with-colors
4015 (custom-set-faces
4016 `(combobulate-active-indicator-face ((,c :foreground ,fg-main)))
4017 `(combobulate-dimmed-indicator-face ((,c :inherit shadow)))
4018 `(combobulate-error-indicator-face ((,c :inherit error)))
4019 `(combobulate-query-highlight-fiery-flames-face ((,c :inherit modus-themes-intense-red)))
4020 `(combobulate-query-highlight-gleaming-gold-face ((,c :inherit modus-themes-intense-yellow)))
4021 `(combobulate-query-highlight-majestic-mercury-face ((,c :inherit modus-themes-intense-cyan)))
4022 `(combobulate-query-highlight-mysterious-mauve-face ((,c :inherit modus-themes-intense-magenta)))
4023 `(combobulate-query-highlight-radiant-rind-face ((,c :inherit modus-themes-subtle-red)))
4024 `(combobulate-query-highlight-regal-ripples-face ((,c :inherit modus-themes-intense-blue)))
4025 `(combobulate-query-highlight-serene-shade-face ((,c :inherit modus-themes-subtle-green)))
4026 `(combobulate-query-highlight-silver-shadows-face ((,c :background ,bg-active :foreground ,fg-main)))
4027 `(combobulate-query-highlight-vibrant-veggie-face ((,c :inherit modus-themes-intense-green)))
4028 `(combobulate-query-query-anonymous-face ((,c :inherit modus-themes-bold :foreground ,fg-alt)))
4029 `(combobulate-query-query-builtin-face ((,c :inherit font-lock-builtin-face)))
4030 `(combobulate-query-query-constant-face ((,c :inherit font-lock-constant-face)))
4031 `(combobulate-query-query-doc-markup-face ((,c :inherit font-lock-doc-markup-face)))
4032 `(combobulate-query-query-keyword-face ((,c :inherit font-lock-keyword-face)))
4033 `(combobulate-query-query-predicate-builtin-face ((,c :inherit bold)))
4034 `(combobulate-query-query-string-face ((,c :inherit font-lock-string-face)))
4035 `(combobulate-refactor-choice-face ((,c :inherit modus-themes-slant :foreground ,info)))
4036 `(combobulate-refactor-cursor-face ((,c :foreground ,cursor)))
4037 `(combobulate-refactor-field-face ((,c :background ,bg-inactive :foreground ,fg-main :extend nil)))
4038 `(combobulate-refactor-highlight-face ((,c :inherit highlight)))
4039 `(combobulate-refactor-inactive-choice-face ((,c :inherit modus-themes-slant :foreground ,fg-dim)))
4040 `(combobulate-refactor-inactive-field-face ((,c :background ,bg-dim :foreground ,fg-dim :extend nil)))
4041 `(combobulate-refactor-label-face ((,c :inherit modus-themes-search-replace)))
4042 `(combobulate-tree-branch-face ((,c :inherit shadow)))
4043 `(combobulate-tree-highlighted-node-face ((,c :inherit success)))
4044 `(combobulate-tree-normal-node-face ((,c :foreground ,fg-main)))
4045 `(combobulate-tree-pulse-node-face ((,c :background ,bg-blue-intense :extend t))))))
4046
4047(add-hook 'enable-theme-functions #'my-modus-themes-custom-faces)
4048#+end_src
4049
4050[[#h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24][Using a hook at the post-load-theme phase]].
4051
4052** DIY Add support for howm
4053:PROPERTIES:
4054:CUSTOM_ID: h:7ea8fa66-1cd8-47b0-92b4-9998a3068f85
4055:END:
4056
4057The ~howm~ package is a note-taking solution for Emacs. Users can add
4058support for its faces with something like the following.
4059
4060#+begin_src emacs-lisp
4061(defun my-modus-themes-custom-faces (&rest _)
4062 (modus-themes-with-colors
4063 (custom-set-faces
4064 `(action-lock-face ((,c :inherit button)))
4065 `(howm-mode-keyword-face (( )))
4066 `(howm-mode-ref-face ((,c :inherit link)))
4067 `(howm-mode-title-face ((,c :inherit modus-themes-heading-0)))
4068 `(howm-mode-wiki-face ((,c :inherit link)))
4069 `(howm-reminder-deadline-face ((,c :foreground ,date-deadline)))
4070 `(howm-reminder-late-deadline-face ((,c :inherit bold :foreground ,date-deadline)))
4071 `(howm-reminder-defer-face ((,c :foreground ,date-scheduled)))
4072 `(howm-reminder-scheduled-face ((,c :foreground ,date-scheduled)))
4073 `(howm-reminder-done-face ((,c :foreground ,prose-done)))
4074 `(howm-reminder-todo-face ((,c :foreground ,prose-todo)))
4075 `(howm-reminder-normal-face ((,c :foreground ,date-common)))
4076 `(howm-reminder-today-face ((,c :inherit bold :foreground ,date-common)))
4077 `(howm-reminder-tomorrow-face ((,c :inherit bold :foreground ,date-scheduled)))
4078 `(howm-simulate-todo-mode-line-face ((,c :inherit bold)))
4079 `(howm-view-empty-face (( )))
4080 `(howm-view-hilit-face ((,c :inherit match)))
4081 `(howm-view-name-face ((,c :inherit bold)))
4082 `(iigrep-counts-face1 ((,c :foreground ,rainbow-1)))
4083 `(iigrep-counts-face2 ((,c :foreground ,rainbow-2)))
4084 `(iigrep-counts-face3 ((,c :foreground ,rainbow-3)))
4085 `(iigrep-counts-face4 ((,c :foreground ,rainbow-4)))
4086 `(iigrep-counts-face5 ((,c :foreground ,rainbow-5))))))
4087
4088(add-hook 'enable-theme-functions #'my-modus-themes-custom-faces)
4089#+end_src
4090
3851** DIY Use a hook at the post-load-theme phase 4091** DIY Use a hook at the post-load-theme phase
3852:PROPERTIES: 4092:PROPERTIES:
3853:CUSTOM_ID: h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24 4093:CUSTOM_ID: h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24
@@ -4057,6 +4297,7 @@ have lots of extensions, so the "full support" may not be 100% true…
4057+ focus 4297+ focus
4058+ fold-this 4298+ fold-this
4059+ font-lock (generic syntax highlighting) 4299+ font-lock (generic syntax highlighting)
4300+ forge
4060+ geiser 4301+ geiser
4061+ git-commit 4302+ git-commit
4062+ git-gutter (and variants) 4303+ git-gutter (and variants)
@@ -4066,6 +4307,7 @@ have lots of extensions, so the "full support" may not be 100% true…
4066+ gotest 4307+ gotest
4067+ golden-ratio-scroll-screen 4308+ golden-ratio-scroll-screen
4068+ helpful 4309+ helpful
4310+ hexl-mode
4069+ highlight-numbers 4311+ highlight-numbers
4070+ highlight-parentheses ([[#h:24bab397-dcb2-421d-aa6e-ec5bd622b913][Note on highlight-parentheses.el]]) 4312+ highlight-parentheses ([[#h:24bab397-dcb2-421d-aa6e-ec5bd622b913][Note on highlight-parentheses.el]])
4071+ highlight-thing 4313+ highlight-thing
@@ -4264,7 +4506,6 @@ supported by the themes.
4264+ flyspell-correct 4506+ flyspell-correct
4265+ fortran-mode 4507+ fortran-mode
4266+ freeze-it 4508+ freeze-it
4267+ forge
4268+ git-walktree 4509+ git-walktree
4269+ goggles 4510+ goggles
4270+ highlight-defined 4511+ highlight-defined
@@ -4534,7 +4775,7 @@ advanced customization options of the themes.
4534[[#h:f4651d55-8c07-46aa-b52b-bed1e53463bb][Advanced customization]]. 4775[[#h:f4651d55-8c07-46aa-b52b-bed1e53463bb][Advanced customization]].
4535 4776
4536In the following example, we are assuming that the user wants to (i) 4777In the following example, we are assuming that the user wants to (i)
4537re-use color variables provided by the themes, (ii) be able to retain 4778reuse color variables provided by the themes, (ii) be able to retain
4538their tweaks while switching between ~modus-operandi~ and ~modus-vivendi~, 4779their tweaks while switching between ~modus-operandi~ and ~modus-vivendi~,
4539and (iii) have the option to highlight either the foreground of the 4780and (iii) have the option to highlight either the foreground of the
4540parentheses or the background as well. 4781parentheses or the background as well.
@@ -4554,7 +4795,7 @@ Then we can update our preference with this:
4554(setq my-highlight-parentheses-use-background nil) 4795(setq my-highlight-parentheses-use-background nil)
4555#+end_src 4796#+end_src
4556 4797
4557To re-use colors from the themes, we must wrap our code in the 4798To reuse colors from the themes, we must wrap our code in the
4558~modus-themes-with-colors~ macro. Our implementation must interface with 4799~modus-themes-with-colors~ macro. Our implementation must interface with
4559the variables ~highlight-parentheses-background-colors~ and/or 4800the variables ~highlight-parentheses-background-colors~ and/or
4560~highlight-parentheses-colors~. 4801~highlight-parentheses-colors~.
@@ -5220,7 +5461,7 @@ each of the three channels of light (red, green, blue). For example:
5220: xrandr --output LVDS1 --brightness 1.0 --gamma 0.76:0.75:0.68 5461: xrandr --output LVDS1 --brightness 1.0 --gamma 0.76:0.75:0.68
5221 5462
5222Typography is another variable. Some font families are blurry at small 5463Typography is another variable. Some font families are blurry at small
5223point sizes. Others may have a regular weight that is lighter (thiner) 5464point sizes. Others may have a regular weight that is lighter (thinner)
5224than that of their peers which may, under certain circumstances, cause a 5465than that of their peers which may, under certain circumstances, cause a
5225halo effect around each glyph. 5466halo effect around each glyph.
5226 5467
@@ -5516,19 +5757,19 @@ The Modus themes are a collective effort. Every bit of work matters.
5516 Euker, Feng Shu, Filippo Argiolas, Gautier Ponsinet, Gerry Agbobada, 5757 Euker, Feng Shu, Filippo Argiolas, Gautier Ponsinet, Gerry Agbobada,
5517 Gianluca Recchia, Gonçalo Marrafa, Guilherme Semente, Gustavo 5758 Gianluca Recchia, Gonçalo Marrafa, Guilherme Semente, Gustavo
5518 Barros, Hörmetjan Yiltiz, Ilja Kocken, Imran Khan, Iris Garcia, Ivan 5759 Barros, Hörmetjan Yiltiz, Ilja Kocken, Imran Khan, Iris Garcia, Ivan
5519 Popovych, James Ferguson, Jeremy Friesen, Jerry Zhang, Johannes 5760 Popovych, Jabir Ali Ouassou, James Ferguson, Jeremy Friesen, Jerry
5520 Grødem, John Haman, John Wick, Jonas Collberg, Jorge Morais, Joshua 5761 Zhang, Johannes Grødem, John Haman, John Wick, Jonas Collberg, Jorge
5521 O'Connor, Julio C. Villasante, Kenta Usami, Kevin Fleming, Kévin Le 5762 Morais, Joshua O'Connor, Julio C. Villasante, Kenta Usami, Kevin
5522 Gouguec, Kevin Kainan Li, Kostadin Ninev, Laith Bahodi, Lasse 5763 Fleming, Kévin Le Gouguec, Kevin Kainan Li, Kostadin Ninev, Laith
5523 Lindner, Len Trigg, Lennart C.{{{space()}}} Karssen, Luis Miguel 5764 Bahodi, Lasse Lindner, Len Trigg, Lennart C.{{{space()}}} Karssen,
5524 Castañeda, Magne Hov, Manuel Giraud, Manuel Uberti, Mark Bestley, 5765 Luis Miguel Castañeda, Magne Hov, Manuel Giraud, Manuel Uberti, Mark
5525 Mark Burton, Mark Simpson, Marko Kocic, Markus Beppler, Matt 5766 Bestley, Mark Burton, Mark Simpson, Marko Kocic, Markus Beppler,
5526 Armstrong, Matthias Fuchs, Mattias Engdegård, Mauro Aranda, Maxime 5767 Matt Armstrong, Matthias Fuchs, Mattias Engdegård, Mauro Aranda,
5527 Tréca, Michael Goldenberg, Morgan Smith, Morgan Willcock, Murilo 5768 Maxime Tréca, Michael Goldenberg, Morgan Smith, Morgan Willcock,
5528 Pereira, Nicky van Foreest, Nicolas De Jaeghere, Nicolas Semrau, 5769 Murilo Pereira, Nicky van Foreest, Nicolas De Jaeghere, Nicolas
5529 Olaf Meeuwissen, Oliver Epper, Pablo Stafforini, Paul Poloskov, 5770 Semrau, Olaf Meeuwissen, Oliver Epper, Pablo Stafforini, Paul
5530 Pengji Zhang, Pete Kazmier, Peter Wu, Philip Kaludercic, Pierre 5771 Poloskov, Pengji Zhang, Pete Kazmier, Peter Wu, Philip Kaludercic,
5531 Téchoueyres, Przemysław Kryger, Robert Hepple, Roman Rudakov, 5772 Pierre Téchoueyres, Przemysław Kryger, Robert Hepple, Roman Rudakov,
5532 Russell Sim, Ryan Phillips, Rytis Paškauskas, Rudolf Adamkovič, Sam 5773 Russell Sim, Ryan Phillips, Rytis Paškauskas, Rudolf Adamkovič, Sam
5533 Kleinman, Samuel Culpepper, Saša Janiška, Shreyas Ragavan, Simon 5774 Kleinman, Samuel Culpepper, Saša Janiška, Shreyas Ragavan, Simon
5534 Pugnet, Steve Downey, Tassilo Horn, Thanos Apollo, Thibaut Verron, 5775 Pugnet, Steve Downey, Tassilo Horn, Thanos Apollo, Thibaut Verron,
diff --git a/etc/themes/modus-operandi-deuteranopia-theme.el b/etc/themes/modus-operandi-deuteranopia-theme.el
index 485a71e19b5..58b27b90a18 100644
--- a/etc/themes/modus-operandi-deuteranopia-theme.el
+++ b/etc/themes/modus-operandi-deuteranopia-theme.el
@@ -304,14 +304,16 @@ standard)."
304 304
305 (date-common cyan) 305 (date-common cyan)
306 (date-deadline yellow-warmer) 306 (date-deadline yellow-warmer)
307 (date-deadline-subtle red-faint)
307 (date-event fg-alt) 308 (date-event fg-alt)
308 (date-holiday yellow-warmer) 309 (date-holiday yellow-warmer)
309 (date-holiday-other blue) 310 (date-holiday-other blue)
310 (date-now fg-main) 311 (date-now fg-main)
311 (date-range fg-alt) 312 (date-range fg-alt)
312 (date-scheduled yellow-cooler) 313 (date-scheduled yellow-cooler)
314 (date-scheduled-subtle yellow-faint)
313 (date-weekday cyan) 315 (date-weekday cyan)
314 (date-weekend yellow-faint) 316 (date-weekend magenta)
315 317
316;;;; Line number mappings 318;;;; Line number mappings
317 319
diff --git a/etc/themes/modus-operandi-theme.el b/etc/themes/modus-operandi-theme.el
index 6fd2ddd57de..bd6d4b4c50b 100644
--- a/etc/themes/modus-operandi-theme.el
+++ b/etc/themes/modus-operandi-theme.el
@@ -301,15 +301,17 @@ which corresponds to a minimum contrast in relative luminance of
301;;;; Date mappings 301;;;; Date mappings
302 302
303 (date-common cyan) 303 (date-common cyan)
304 (date-deadline red) 304 (date-deadline red-cooler)
305 (date-deadline-subtle red-faint)
305 (date-event fg-alt) 306 (date-event fg-alt)
306 (date-holiday red-cooler) 307 (date-holiday red)
307 (date-holiday-other blue) 308 (date-holiday-other blue)
308 (date-now fg-main) 309 (date-now fg-main)
309 (date-range fg-alt) 310 (date-range fg-alt)
310 (date-scheduled yellow-warmer) 311 (date-scheduled yellow)
312 (date-scheduled-subtle yellow-faint)
311 (date-weekday cyan) 313 (date-weekday cyan)
312 (date-weekend red-faint) 314 (date-weekend magenta)
313 315
314;;;; Line number mappings 316;;;; Line number mappings
315 317
diff --git a/etc/themes/modus-operandi-tinted-theme.el b/etc/themes/modus-operandi-tinted-theme.el
index c901e834d15..a9be4374f80 100644
--- a/etc/themes/modus-operandi-tinted-theme.el
+++ b/etc/themes/modus-operandi-tinted-theme.el
@@ -301,15 +301,17 @@ which corresponds to a minimum contrast in relative luminance of
301;;;; Date mappings 301;;;; Date mappings
302 302
303 (date-common cyan) 303 (date-common cyan)
304 (date-deadline red) 304 (date-deadline red-cooler)
305 (date-deadline-subtle red-faint)
305 (date-event fg-alt) 306 (date-event fg-alt)
306 (date-holiday red-cooler) 307 (date-holiday red)
307 (date-holiday-other blue) 308 (date-holiday-other blue)
308 (date-now fg-main) 309 (date-now fg-main)
309 (date-range fg-alt) 310 (date-range fg-alt)
310 (date-scheduled yellow-warmer) 311 (date-scheduled yellow)
312 (date-scheduled-subtle yellow-faint)
311 (date-weekday cyan) 313 (date-weekday cyan)
312 (date-weekend red-faint) 314 (date-weekend magenta)
313 315
314;;;; Line number mappings 316;;;; Line number mappings
315 317
diff --git a/etc/themes/modus-operandi-tritanopia-theme.el b/etc/themes/modus-operandi-tritanopia-theme.el
index ae62198c4ed..c7460ba9054 100644
--- a/etc/themes/modus-operandi-tritanopia-theme.el
+++ b/etc/themes/modus-operandi-tritanopia-theme.el
@@ -304,14 +304,16 @@ standard)."
304 304
305 (date-common cyan-cooler) 305 (date-common cyan-cooler)
306 (date-deadline red) 306 (date-deadline red)
307 (date-deadline-subtle red-faint)
307 (date-event fg-alt) 308 (date-event fg-alt)
308 (date-holiday red) 309 (date-holiday red)
309 (date-holiday-other cyan) 310 (date-holiday-other cyan)
310 (date-now fg-main) 311 (date-now fg-main)
311 (date-range fg-alt) 312 (date-range fg-alt)
312 (date-scheduled magenta) 313 (date-scheduled magenta)
314 (date-scheduled-subtle magenta-faint)
313 (date-weekday cyan) 315 (date-weekday cyan)
314 (date-weekend red-faint) 316 (date-weekend magenta-warmer)
315 317
316;;;; Line number mappings 318;;;; Line number mappings
317 319
diff --git a/etc/themes/modus-themes.el b/etc/themes/modus-themes.el
index 7950a3da39d..c2ffc6e3593 100644
--- a/etc/themes/modus-themes.el
+++ b/etc/themes/modus-themes.el
@@ -5,7 +5,7 @@
5;; Author: Protesilaos Stavrou <info@protesilaos.com> 5;; Author: Protesilaos Stavrou <info@protesilaos.com>
6;; Maintainer: Protesilaos Stavrou <info@protesilaos.com> 6;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
7;; URL: https://github.com/protesilaos/modus-themes 7;; URL: https://github.com/protesilaos/modus-themes
8;; Version: 4.5.0 8;; Version: 4.6.0
9;; Package-Requires: ((emacs "27.1")) 9;; Package-Requires: ((emacs "27.1"))
10;; Keywords: faces, theme, accessibility 10;; Keywords: faces, theme, accessibility
11 11
@@ -287,10 +287,14 @@ set this variable to a nil value."
287 "Alias of `modus-themes-items'.") 287 "Alias of `modus-themes-items'.")
288 288
289(defconst modus-themes-items 289(defconst modus-themes-items
290 '( modus-operandi modus-vivendi 290 '( modus-operandi
291 modus-operandi-tinted modus-vivendi-tinted 291 modus-operandi-tinted
292 modus-operandi-deuteranopia modus-vivendi-deuteranopia 292 modus-operandi-deuteranopia
293 modus-operandi-tritanopia modus-vivendi-tritanopia) 293 modus-operandi-tritanopia
294 modus-vivendi
295 modus-vivendi-tinted
296 modus-vivendi-deuteranopia
297 modus-vivendi-tritanopia)
294 "Symbols of the Modus themes.") 298 "Symbols of the Modus themes.")
295 299
296(defcustom modus-themes-to-toggle '(modus-operandi modus-vivendi) 300(defcustom modus-themes-to-toggle '(modus-operandi modus-vivendi)
@@ -308,18 +312,19 @@ the same as using the command `modus-themes-select'."
308 :type `(choice 312 :type `(choice
309 (const :tag "No toggle" nil) 313 (const :tag "No toggle" nil)
310 (list :tag "Pick two themes to toggle between" 314 (list :tag "Pick two themes to toggle between"
311 (choice :tag "Theme one of two" 315 (choice :tag "Theme one of two" ,@(mapcar (lambda (theme) (list 'const theme)) modus-themes-items))
312 ,@(mapcar (lambda (theme) 316 (choice :tag "Theme two of two" ,@(mapcar (lambda (theme) (list 'const theme)) modus-themes-items))))
313 (list 'const theme))
314 modus-themes-items))
315 (choice :tag "Theme two of two"
316 ,@(mapcar (lambda (theme)
317 (list 'const theme))
318 modus-themes-items))))
319 :package-version '(modus-themes . "4.0.0") 317 :package-version '(modus-themes . "4.0.0")
320 :version "30.1" 318 :version "30.1"
321 :set #'modus-themes--set-option 319 :group 'modus-themes)
322 :initialize #'custom-initialize-default 320
321(defcustom modus-themes-to-rotate modus-themes-items
322 "List of Modus themes to rotate among, per `modus-themes-rotate'."
323 :type `(repeat
324 (choice :tag "A theme among the `modus-themes-items'"
325 ,@(mapcar (lambda (theme) (list 'const theme)) modus-themes-items)))
326 :package-version '(modus-themes . "4.6.0")
327 :version "31.1"
323 :group 'modus-themes) 328 :group 'modus-themes)
324 329
325(defvaralias 'modus-themes-post-load-hook 'modus-themes-after-load-theme-hook) 330(defvaralias 'modus-themes-post-load-hook 'modus-themes-after-load-theme-hook)
@@ -330,8 +335,6 @@ This is used by the command `modus-themes-toggle'."
330 :type 'hook 335 :type 'hook
331 :package-version '(modus-themes . "4.0.0") 336 :package-version '(modus-themes . "4.0.0")
332 :version "30.1" 337 :version "30.1"
333 :set #'modus-themes--set-option
334 :initialize #'custom-initialize-default
335 :group 'modus-themes) 338 :group 'modus-themes)
336 339
337(defvaralias 'modus-themes-slanted-constructs 'modus-themes-italic-constructs) 340(defvaralias 'modus-themes-slanted-constructs 'modus-themes-italic-constructs)
@@ -1106,7 +1109,7 @@ With optional SUFFIX, return THEME-palette-SUFFIX as a symbol."
1106 "Return palette value of active Modus theme, else produce `user-error'. 1109 "Return palette value of active Modus theme, else produce `user-error'.
1107With optional OVERRIDES return palette value plus whatever 1110With optional OVERRIDES return palette value plus whatever
1108overrides." 1111overrides."
1109 (if-let ((theme (modus-themes--current-theme))) 1112 (if-let* ((theme (modus-themes--current-theme)))
1110 (if overrides 1113 (if overrides
1111 (modus-themes--palette-value theme :overrides) 1114 (modus-themes--palette-value theme :overrides)
1112 (modus-themes--palette-value theme)) 1115 (modus-themes--palette-value theme))
@@ -1182,13 +1185,15 @@ symbol, which is safe when used as a face attribute's value."
1182 1185
1183;;;; Commands 1186;;;; Commands
1184 1187
1188;;;;; Select a theme with completion
1189
1185(defvar modus-themes--select-theme-history nil 1190(defvar modus-themes--select-theme-history nil
1186 "Minibuffer history of `modus-themes--select-prompt'.") 1191 "Minibuffer history of `modus-themes--select-prompt'.")
1187 1192
1188(defun modus-themes--annotate-theme (theme) 1193(defun modus-themes--annotate-theme (theme)
1189 "Return completion annotation for THEME." 1194 "Return completion annotation for THEME."
1190 (when-let ((symbol (intern-soft theme)) 1195 (when-let* ((symbol (intern-soft theme))
1191 (doc-string (get symbol 'theme-documentation))) 1196 (doc-string (get symbol 'theme-documentation)))
1192 (format " -- %s" 1197 (format " -- %s"
1193 (propertize (car (split-string doc-string "\\.")) 1198 (propertize (car (split-string doc-string "\\."))
1194 'face 'completions-annotations)))) 1199 'face 'completions-annotations))))
@@ -1222,6 +1227,8 @@ Disable other themes per `modus-themes-disable-other-themes'."
1222 (interactive (list (modus-themes--select-prompt))) 1227 (interactive (list (modus-themes--select-prompt)))
1223 (modus-themes-load-theme theme)) 1228 (modus-themes-load-theme theme))
1224 1229
1230;;;;; Toggle between two themes
1231
1225(defun modus-themes--toggle-theme-p () 1232(defun modus-themes--toggle-theme-p ()
1226 "Return non-nil if `modus-themes-to-toggle' are valid." 1233 "Return non-nil if `modus-themes-to-toggle' are valid."
1227 (mapc 1234 (mapc
@@ -1241,6 +1248,7 @@ practically the same as the `modus-themes-select' command).
1241 1248
1242Run `modus-themes-after-load-theme-hook' after loading the theme. 1249Run `modus-themes-after-load-theme-hook' after loading the theme.
1243Disable other themes per `modus-themes-disable-other-themes'." 1250Disable other themes per `modus-themes-disable-other-themes'."
1251 (declare (interactive-only t))
1244 (interactive) 1252 (interactive)
1245 (if-let* ((themes (modus-themes--toggle-theme-p)) 1253 (if-let* ((themes (modus-themes--toggle-theme-p))
1246 (one (car themes)) 1254 (one (car themes))
@@ -1248,6 +1256,44 @@ Disable other themes per `modus-themes-disable-other-themes'."
1248 (modus-themes-load-theme (if (eq (car custom-enabled-themes) one) two one)) 1256 (modus-themes-load-theme (if (eq (car custom-enabled-themes) one) two one))
1249 (modus-themes-load-theme (modus-themes--select-prompt)))) 1257 (modus-themes-load-theme (modus-themes--select-prompt))))
1250 1258
1259;;;;; Rotate through a list of themes
1260
1261(defun modus-themes--rotate (themes)
1262 "Rotate THEMES rightward such that the car is moved to the end."
1263 (if (proper-list-p themes)
1264 (let* ((index (seq-position themes (modus-themes--current-theme)))
1265 (offset (1+ index)))
1266 (append (nthcdr offset themes) (take offset themes)))
1267 (error "The `%s' is not a list" themes)))
1268
1269(defun modus-themes--rotate-p (themes)
1270 "Return a new theme among THEMES if it is possible to rotate to it."
1271 (if-let* ((new-theme (car (modus-themes--rotate themes))))
1272 (if (eq new-theme (modus-themes--current-theme))
1273 (car (modus-themes--rotate-p (modus-themes--rotate themes)))
1274 new-theme)
1275 (error "Cannot determine a theme among `%s'" themes)))
1276
1277;;;###autoload
1278(defun modus-themes-rotate (themes)
1279 "Rotate to the next theme among THEMES.
1280When called interactively THEMES is the value of `modus-themes-to-rotate'.
1281
1282If the current theme is already the next in line, then move to the one
1283after. Perform the rotation rightwards, such that the first element in
1284the list becomes the last. Do not modify THEMES in the process."
1285 (interactive (list modus-themes-to-rotate))
1286 (unless (proper-list-p themes)
1287 "This is not a list of themes: `%s'" themes)
1288 (let ((candidate (modus-themes--rotate-p themes)))
1289 (if (modus-themes--modus-p candidate)
1290 (progn
1291 (message "Rotating to `%s'" (propertize (symbol-name candidate) 'face 'success))
1292 (modus-themes-load-theme candidate))
1293 (user-error "`%s' is not part of the Modus collection" candidate))))
1294
1295;;;;; Preview a theme palette
1296
1251(defun modus-themes--list-colors-render (buffer theme &optional mappings &rest _) 1297(defun modus-themes--list-colors-render (buffer theme &optional mappings &rest _)
1252 "Render colors in BUFFER from THEME for `modus-themes-list-colors'. 1298 "Render colors in BUFFER from THEME for `modus-themes-list-colors'.
1253Optional MAPPINGS changes the output to only list the semantic 1299Optional MAPPINGS changes the output to only list the semantic
@@ -1741,12 +1787,12 @@ FG and BG are the main colors."
1741 `(all-the-icons-silver ((,c :foreground "gray50"))) 1787 `(all-the-icons-silver ((,c :foreground "gray50")))
1742 `(all-the-icons-yellow ((,c :foreground ,yellow))) 1788 `(all-the-icons-yellow ((,c :foreground ,yellow)))
1743;;;;; all-the-icons-dired 1789;;;;; all-the-icons-dired
1744 `(all-the-icons-dired-dir-face ((,c :foreground ,cyan-faint))) 1790 `(all-the-icons-dired-dir-face ((,c :foreground ,accent-0)))
1745;;;;; all-the-icons-ibuffer 1791;;;;; all-the-icons-ibuffer
1746 `(all-the-icons-ibuffer-dir-face ((,c :foreground ,cyan-faint))) 1792 `(all-the-icons-ibuffer-dir-face ((,c :foreground ,accent-0)))
1747 `(all-the-icons-ibuffer-file-face ((,c :foreground ,blue-faint))) 1793 `(all-the-icons-ibuffer-file-face ((,c :foreground ,docstring)))
1748 `(all-the-icons-ibuffer-mode-face ((,c :foreground ,cyan))) 1794 `(all-the-icons-ibuffer-mode-face ((,c :foreground ,type)))
1749 `(all-the-icons-ibuffer-size-face ((,c :foreground ,cyan-cooler))) 1795 `(all-the-icons-ibuffer-size-face ((,c :foreground ,variable)))
1750;;;;; annotate 1796;;;;; annotate
1751 `(annotate-annotation ((,c :inherit modus-themes-subtle-blue))) 1797 `(annotate-annotation ((,c :inherit modus-themes-subtle-blue)))
1752 `(annotate-annotation-secondary ((,c :inherit modus-themes-subtle-magenta))) 1798 `(annotate-annotation-secondary ((,c :inherit modus-themes-subtle-magenta)))
@@ -1942,7 +1988,7 @@ FG and BG are the main colors."
1942 `(company-scrollbar-bg ((,c :background ,bg-active))) 1988 `(company-scrollbar-bg ((,c :background ,bg-active)))
1943 `(company-scrollbar-fg ((,c :background ,fg-main))) 1989 `(company-scrollbar-fg ((,c :background ,fg-main)))
1944 `(company-template-field ((,c :background ,bg-active))) 1990 `(company-template-field ((,c :background ,bg-active)))
1945 `(company-tooltip ((,c :background ,bg-dim))) 1991 `(company-tooltip ((,c :inherit modus-themes-fixed-pitch :background ,bg-dim)))
1946 `(company-tooltip-annotation ((,c :inherit completions-annotations))) 1992 `(company-tooltip-annotation ((,c :inherit completions-annotations)))
1947 `(company-tooltip-common ((,c :inherit company-echo-common))) 1993 `(company-tooltip-common ((,c :inherit company-echo-common)))
1948 `(company-tooltip-deprecated ((,c :inherit company-tooltip :strike-through t))) 1994 `(company-tooltip-deprecated ((,c :inherit company-tooltip :strike-through t)))
@@ -1978,7 +2024,7 @@ FG and BG are the main colors."
1978 `(corfu-current ((,c :inherit modus-themes-completion-selected))) 2024 `(corfu-current ((,c :inherit modus-themes-completion-selected)))
1979 `(corfu-bar ((,c :background ,fg-dim))) 2025 `(corfu-bar ((,c :background ,fg-dim)))
1980 `(corfu-border ((,c :background ,bg-active))) 2026 `(corfu-border ((,c :background ,bg-active)))
1981 `(corfu-default ((,c :background ,bg-dim))) 2027 `(corfu-default ((,c :inherit modus-themes-fixed-pitch :background ,bg-dim)))
1982;;;;; corfu-candidate-overlay 2028;;;;; corfu-candidate-overlay
1983 `(corfu-candidate-overlay-face ((t :inherit shadow))) 2029 `(corfu-candidate-overlay-face ((t :inherit shadow)))
1984;;;;; corfu-quick 2030;;;;; corfu-quick
@@ -2269,8 +2315,10 @@ FG and BG are the main colors."
2269 `(elpher-gemini-heading2 ((,c :inherit modus-themes-heading-2))) 2315 `(elpher-gemini-heading2 ((,c :inherit modus-themes-heading-2)))
2270 `(elpher-gemini-heading3 ((,c :inherit modus-themes-heading-3))) 2316 `(elpher-gemini-heading3 ((,c :inherit modus-themes-heading-3)))
2271;;;;; embark 2317;;;;; embark
2318 `(embark-collect-group-title ((,c :inherit bold :foreground ,name)))
2272 `(embark-keybinding ((,c :inherit modus-themes-key-binding))) 2319 `(embark-keybinding ((,c :inherit modus-themes-key-binding)))
2273 `(embark-collect-marked ((,c :inherit modus-themes-mark-sel))) 2320 `(embark-keybinding-repeat ((,c :inherit bold)))
2321 `(embark-selected ((,c :inherit modus-themes-mark-sel)))
2274;;;;; ement (ement.el) 2322;;;;; ement (ement.el)
2275 `(ement-room-fully-read-marker ((,c :inherit success))) 2323 `(ement-room-fully-read-marker ((,c :inherit success)))
2276 `(ement-room-membership ((,c :inherit shadow))) 2324 `(ement-room-membership ((,c :inherit shadow)))
@@ -2439,6 +2487,23 @@ FG and BG are the main colors."
2439 `(font-lock-type-face ((,c :inherit modus-themes-bold :foreground ,type))) 2487 `(font-lock-type-face ((,c :inherit modus-themes-bold :foreground ,type)))
2440 `(font-lock-variable-name-face ((,c :foreground ,variable))) 2488 `(font-lock-variable-name-face ((,c :foreground ,variable)))
2441 `(font-lock-warning-face ((,c :inherit modus-themes-bold :foreground ,warning))) 2489 `(font-lock-warning-face ((,c :inherit modus-themes-bold :foreground ,warning)))
2490;;;;; forge
2491 `(forge-dimmed ((,c :inherit shadow)))
2492 `(forge-issue-completed ((,c :inherit shadow)))
2493 `(forge-issue-open (( )))
2494 `(forge-issue-unplanned ((,c :inherit forge-dimmed :strike-through t)))
2495 `(forge-post-author ((,c :inherit bold :foreground ,name)))
2496 `(forge-post-date ((,c :inherit bold :foreground ,date-common)))
2497 `(forge-pullreq-merged ((,c :foreground ,fg-alt)))
2498 `(forge-pullreq-open ((,c :foreground ,info)))
2499 `(forge-pullreq-rejected ((,c :foreground ,err :strike-through t)))
2500 `(forge-topic-done (( )))
2501 `(forge-topic-pending ((,c :inherit italic)))
2502 `(forge-topic-slug-completed ((,c :inherit forge-dimmed)))
2503 `(forge-topic-slug-open ((,c :inherit forge-dimmed)))
2504 `(forge-topic-slug-saved ((,c :inherit success)))
2505 `(forge-topic-slug-unplanned ((,c :inherit forge-dimmed :strike-through t)))
2506 `(forge-topic-unread ((,c :inherit bold)))
2442;;;;; geiser 2507;;;;; geiser
2443 `(geiser-font-lock-autodoc-current-arg ((,c :inherit bold :background ,bg-active-argument :foreground ,fg-active-argument))) 2508 `(geiser-font-lock-autodoc-current-arg ((,c :inherit bold :background ,bg-active-argument :foreground ,fg-active-argument)))
2444 `(geiser-font-lock-autodoc-identifier ((,c :foreground ,docstring))) 2509 `(geiser-font-lock-autodoc-identifier ((,c :foreground ,docstring)))
@@ -2562,6 +2627,9 @@ FG and BG are the main colors."
2562 `(golden-ratio-scroll-highlight-line-face ((,c :background ,bg-cyan-subtle :foreground ,fg-main))) 2627 `(golden-ratio-scroll-highlight-line-face ((,c :background ,bg-cyan-subtle :foreground ,fg-main)))
2563;;;;; helpful 2628;;;;; helpful
2564 `(helpful-heading ((,c :inherit modus-themes-heading-1))) 2629 `(helpful-heading ((,c :inherit modus-themes-heading-1)))
2630;;;;; hexl-mode
2631 `(hexl-address-region ((,c :foreground ,constant)))
2632 `(hexl-ascii-region ((,c :foreground ,variable)))
2565;;;;; highlight region or ad-hoc regexp 2633;;;;; highlight region or ad-hoc regexp
2566 ;; HACK 2022-06-23: The :inverse-video prevents hl-line-mode from 2634 ;; HACK 2022-06-23: The :inverse-video prevents hl-line-mode from
2567 ;; overriding the background. Such an override really defeats the 2635 ;; overriding the background. Such an override really defeats the
@@ -2620,6 +2688,11 @@ FG and BG are the main colors."
2620 `(hydra-face-pink ((,c :inherit bold :foreground ,magenta))) 2688 `(hydra-face-pink ((,c :inherit bold :foreground ,magenta)))
2621 `(hydra-face-red ((,c :inherit bold :foreground ,red-faint))) 2689 `(hydra-face-red ((,c :inherit bold :foreground ,red-faint)))
2622 `(hydra-face-teal ((,c :inherit bold :foreground ,cyan-cooler))) 2690 `(hydra-face-teal ((,c :inherit bold :foreground ,cyan-cooler)))
2691;;;;; hyperbole
2692 `(hbut-item-face ((,c :foreground ,info)))
2693 `(hbut-face ((,c :inherit modus-themes-button)))
2694 `(hbut-flash ((,c :background ,bg-search-replace)))
2695 `(ibut-face ((,c :inherit button :background ,bg-link-symbolic :foreground ,fg-link-symbolic :underline ,underline-link-symbolic)))
2623;;;;; icomplete 2696;;;;; icomplete
2624 `(icomplete-first-match ((,c :inherit modus-themes-completion-match-0))) 2697 `(icomplete-first-match ((,c :inherit modus-themes-completion-match-0)))
2625 `(icomplete-selected-match ((,c :inherit modus-themes-completion-selected))) 2698 `(icomplete-selected-match ((,c :inherit modus-themes-completion-selected)))
@@ -3128,14 +3201,14 @@ FG and BG are the main colors."
3128 `(nerd-icons-silver ((,c :foreground "gray50"))) 3201 `(nerd-icons-silver ((,c :foreground "gray50")))
3129 `(nerd-icons-yellow ((,c :foreground ,yellow))) 3202 `(nerd-icons-yellow ((,c :foreground ,yellow)))
3130;;;;; nerd-icons-completion 3203;;;;; nerd-icons-completion
3131 `(nerd-icons-completion-dir-face ((,c :foreground ,cyan-faint))) 3204 `(nerd-icons-completion-dir-face ((,c :foreground ,accent-0)))
3132;;;;; nerd-icons-dired 3205;;;;; nerd-icons-dired
3133 `(nerd-icons-dired-dir-face ((,c :foreground ,cyan-faint))) 3206 `(nerd-icons-dired-dir-face ((,c :foreground ,accent-0)))
3134;;;;; nerd-icons-ibuffer 3207;;;;; nerd-icons-ibuffer
3135 `(nerd-icons-ibuffer-dir-face ((,c :foreground ,cyan-faint))) 3208 `(nerd-icons-ibuffer-dir-face ((,c :foreground ,accent-0)))
3136 `(nerd-icons-ibuffer-file-face ((,c :foreground ,blue-faint))) 3209 `(nerd-icons-ibuffer-file-face ((,c :foreground ,docstring)))
3137 `(nerd-icons-ibuffer-mode-face ((,c :foreground ,cyan))) 3210 `(nerd-icons-ibuffer-mode-face ((,c :foreground ,type)))
3138 `(nerd-icons-ibuffer-size-face ((,c :foreground ,cyan-cooler))) 3211 `(nerd-icons-ibuffer-size-face ((,c :foreground ,variable)))
3139;;;;; neotree 3212;;;;; neotree
3140 `(neo-banner-face ((,c :foreground ,accent-0))) 3213 `(neo-banner-face ((,c :foreground ,accent-0)))
3141 `(neo-button-face ((,c :inherit button))) 3214 `(neo-button-face ((,c :inherit button)))
@@ -3273,7 +3346,7 @@ FG and BG are the main colors."
3273 `(org-headline-todo ((,c :inherit org-todo))) 3346 `(org-headline-todo ((,c :inherit org-todo)))
3274 `(org-hide ((,c :foreground ,bg-main))) 3347 `(org-hide ((,c :foreground ,bg-main)))
3275 `(org-indent ((,c :inherit (fixed-pitch org-hide)))) 3348 `(org-indent ((,c :inherit (fixed-pitch org-hide))))
3276 `(org-imminent-deadline ((,c :inherit modus-themes-bold :foreground ,date-deadline))) 3349 `(org-imminent-deadline ((,c :inherit bold :foreground ,date-deadline)))
3277 `(org-latex-and-related ((,c :foreground ,type))) 3350 `(org-latex-and-related ((,c :foreground ,type)))
3278 `(org-level-1 ((,c :inherit modus-themes-heading-1))) 3351 `(org-level-1 ((,c :inherit modus-themes-heading-1)))
3279 `(org-level-2 ((,c :inherit modus-themes-heading-2))) 3352 `(org-level-2 ((,c :inherit modus-themes-heading-2)))
@@ -3292,9 +3365,9 @@ FG and BG are the main colors."
3292 `(org-priority ((,c :foreground ,prose-tag))) 3365 `(org-priority ((,c :foreground ,prose-tag)))
3293 `(org-property-value ((,c :inherit modus-themes-fixed-pitch :foreground ,prose-metadata-value))) 3366 `(org-property-value ((,c :inherit modus-themes-fixed-pitch :foreground ,prose-metadata-value)))
3294 `(org-quote ((,c :inherit org-block))) 3367 `(org-quote ((,c :inherit org-block)))
3295 `(org-scheduled ((,c :foreground ,date-scheduled))) 3368 `(org-scheduled ((,c :foreground ,date-scheduled-subtle)))
3296 `(org-scheduled-previously ((,c :inherit org-scheduled))) 3369 `(org-scheduled-previously ((,c :inherit (bold org-scheduled-today))))
3297 `(org-scheduled-today ((,c :inherit (modus-themes-bold org-scheduled)))) 3370 `(org-scheduled-today ((,c :foreground ,date-scheduled)))
3298 `(org-sexp-date ((,c :foreground ,date-common))) 3371 `(org-sexp-date ((,c :foreground ,date-common)))
3299 `(org-special-keyword ((,c :inherit org-drawer))) 3372 `(org-special-keyword ((,c :inherit org-drawer)))
3300 `(org-table ((,c :inherit modus-themes-fixed-pitch :foreground ,prose-table))) 3373 `(org-table ((,c :inherit modus-themes-fixed-pitch :foreground ,prose-table)))
@@ -3304,8 +3377,8 @@ FG and BG are the main colors."
3304 `(org-target ((,c :underline t))) 3377 `(org-target ((,c :underline t)))
3305 `(org-time-grid ((,c :foreground ,fg-dim))) 3378 `(org-time-grid ((,c :foreground ,fg-dim)))
3306 `(org-todo ((,c :foreground ,prose-todo))) 3379 `(org-todo ((,c :foreground ,prose-todo)))
3307 `(org-upcoming-deadline ((,c :foreground ,date-deadline))) 3380 `(org-upcoming-deadline ((,c :foreground ,date-deadline-subtle)))
3308 `(org-upcoming-distant-deadline ((,c :inherit org-upcoming-deadline))) 3381 `(org-upcoming-distant-deadline ((,c :foreground ,fg-main)))
3309 `(org-verbatim ((,c :inherit modus-themes-prose-verbatim))) 3382 `(org-verbatim ((,c :inherit modus-themes-prose-verbatim)))
3310 `(org-verse ((,c :inherit org-block))) 3383 `(org-verse ((,c :inherit org-block)))
3311 `(org-warning ((,c :inherit warning))) 3384 `(org-warning ((,c :inherit warning)))
diff --git a/etc/themes/modus-vivendi-deuteranopia-theme.el b/etc/themes/modus-vivendi-deuteranopia-theme.el
index 815e2403e13..23b31186d15 100644
--- a/etc/themes/modus-vivendi-deuteranopia-theme.el
+++ b/etc/themes/modus-vivendi-deuteranopia-theme.el
@@ -72,7 +72,7 @@ standard)."
72 72
73 (red "#ff5f59") 73 (red "#ff5f59")
74 (red-warmer "#ff6b55") 74 (red-warmer "#ff6b55")
75 (red-cooler "#ff7f9f") 75 (red-cooler "#ff7f86")
76 (red-faint "#ff9580") 76 (red-faint "#ff9580")
77 (red-intense "#ff5f5f") 77 (red-intense "#ff5f5f")
78 (green "#44bc44") 78 (green "#44bc44")
@@ -304,14 +304,16 @@ standard)."
304 304
305 (date-common cyan) 305 (date-common cyan)
306 (date-deadline yellow-warmer) 306 (date-deadline yellow-warmer)
307 (date-deadline-subtle red-faint)
307 (date-event fg-alt) 308 (date-event fg-alt)
308 (date-holiday yellow-warmer) 309 (date-holiday yellow-warmer)
309 (date-holiday-other blue) 310 (date-holiday-other blue)
310 (date-now fg-main) 311 (date-now fg-main)
311 (date-range fg-alt) 312 (date-range fg-alt)
312 (date-scheduled yellow-cooler) 313 (date-scheduled yellow-cooler)
314 (date-scheduled-subtle yellow-faint)
313 (date-weekday cyan) 315 (date-weekday cyan)
314 (date-weekend yellow-faint) 316 (date-weekend magenta)
315 317
316;;;; Line number mappings 318;;;; Line number mappings
317 319
diff --git a/etc/themes/modus-vivendi-theme.el b/etc/themes/modus-vivendi-theme.el
index 8f56d0ca78e..216bb2a7201 100644
--- a/etc/themes/modus-vivendi-theme.el
+++ b/etc/themes/modus-vivendi-theme.el
@@ -70,7 +70,7 @@ which corresponds to a minimum contrast in relative luminance of
70 70
71 (red "#ff5f59") 71 (red "#ff5f59")
72 (red-warmer "#ff6b55") 72 (red-warmer "#ff6b55")
73 (red-cooler "#ff7f9f") 73 (red-cooler "#ff7f86")
74 (red-faint "#ff9580") 74 (red-faint "#ff9580")
75 (red-intense "#ff5f5f") 75 (red-intense "#ff5f5f")
76 (green "#44bc44") 76 (green "#44bc44")
@@ -301,15 +301,17 @@ which corresponds to a minimum contrast in relative luminance of
301;;;; Date mappings 301;;;; Date mappings
302 302
303 (date-common cyan) 303 (date-common cyan)
304 (date-deadline red) 304 (date-deadline red-cooler)
305 (date-deadline-subtle red-faint)
305 (date-event fg-alt) 306 (date-event fg-alt)
306 (date-holiday red-cooler) 307 (date-holiday magenta-warmer)
307 (date-holiday-other blue) 308 (date-holiday-other blue)
308 (date-now fg-main) 309 (date-now fg-main)
309 (date-range fg-alt) 310 (date-range fg-alt)
310 (date-scheduled yellow-warmer) 311 (date-scheduled yellow-cooler)
312 (date-scheduled-subtle yellow-faint)
311 (date-weekday cyan) 313 (date-weekday cyan)
312 (date-weekend red-faint) 314 (date-weekend magenta)
313 315
314;;;; Line number mappings 316;;;; Line number mappings
315 317
diff --git a/etc/themes/modus-vivendi-tinted-theme.el b/etc/themes/modus-vivendi-tinted-theme.el
index 55c1cd7d2d1..2bbec8aa844 100644
--- a/etc/themes/modus-vivendi-tinted-theme.el
+++ b/etc/themes/modus-vivendi-tinted-theme.el
@@ -70,7 +70,7 @@ which corresponds to a minimum contrast in relative luminance of
70 70
71 (red "#ff5f59") 71 (red "#ff5f59")
72 (red-warmer "#ff6b55") 72 (red-warmer "#ff6b55")
73 (red-cooler "#ff7f9f") 73 (red-cooler "#ff7f86")
74 (red-faint "#ff9f80") 74 (red-faint "#ff9f80")
75 (red-intense "#ff5f5f") 75 (red-intense "#ff5f5f")
76 (green "#44bc44") 76 (green "#44bc44")
@@ -301,15 +301,17 @@ which corresponds to a minimum contrast in relative luminance of
301;;;; Date mappings 301;;;; Date mappings
302 302
303 (date-common cyan) 303 (date-common cyan)
304 (date-deadline red) 304 (date-deadline red-cooler)
305 (date-deadline-subtle red-faint)
305 (date-event fg-alt) 306 (date-event fg-alt)
306 (date-holiday red-cooler) 307 (date-holiday magenta-warmer)
307 (date-holiday-other blue) 308 (date-holiday-other blue)
308 (date-now fg-main) 309 (date-now fg-main)
309 (date-range fg-alt) 310 (date-range fg-alt)
310 (date-scheduled yellow-warmer) 311 (date-scheduled yellow-cooler)
312 (date-scheduled-subtle yellow-faint)
311 (date-weekday cyan) 313 (date-weekday cyan)
312 (date-weekend red-faint) 314 (date-weekend magenta)
313 315
314;;;; Line number mappings 316;;;; Line number mappings
315 317
diff --git a/etc/themes/modus-vivendi-tritanopia-theme.el b/etc/themes/modus-vivendi-tritanopia-theme.el
index f1bd65e97bc..d18a44b38db 100644
--- a/etc/themes/modus-vivendi-tritanopia-theme.el
+++ b/etc/themes/modus-vivendi-tritanopia-theme.el
@@ -72,7 +72,7 @@ standard)."
72 72
73 (red "#ff5f59") 73 (red "#ff5f59")
74 (red-warmer "#ff6740") 74 (red-warmer "#ff6740")
75 (red-cooler "#ff6f9f") 75 (red-cooler "#ff7f86")
76 (red-faint "#ff9070") 76 (red-faint "#ff9070")
77 (red-intense "#ff5f5f") 77 (red-intense "#ff5f5f")
78 (green "#44bc44") 78 (green "#44bc44")
@@ -304,14 +304,16 @@ standard)."
304 304
305 (date-common cyan-cooler) 305 (date-common cyan-cooler)
306 (date-deadline red) 306 (date-deadline red)
307 (date-deadline-subtle red-faint)
307 (date-event fg-alt) 308 (date-event fg-alt)
308 (date-holiday red-intense) 309 (date-holiday red-intense)
309 (date-holiday-other cyan-warmer) 310 (date-holiday-other cyan-warmer)
310 (date-now fg-main) 311 (date-now fg-main)
311 (date-range fg-alt) 312 (date-range fg-alt)
312 (date-scheduled magenta) 313 (date-scheduled magenta)
314 (date-scheduled-subtle magenta-faint)
313 (date-weekday cyan) 315 (date-weekday cyan)
314 (date-weekend red-faint) 316 (date-weekend magenta-warmer)
315 317
316;;;; Line number mappings 318;;;; Line number mappings
317 319