#+options: ':t toc:nil author:t email:t num:t
#+startup: content
-#+macro: stable-version 2.2.0
-#+macro: release-date 2022-02-23
-#+macro: development-version 2.3.0-dev
+#+macro: stable-version 2.3.0
+#+macro: release-date 2022-04-01
+#+macro: development-version 2.4.0-dev
#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
#+macro: space @@texinfo:@: @@
#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
#+texinfo_filename: modus-themes.info
#+texinfo_dir_category: Emacs misc features
#+texinfo_dir_title: Modus Themes: (modus-themes)
-#+texinfo_dir_desc: Highly accessible themes (WCAG AAA)
+#+texinfo_dir_desc: Elegant, highly legible and customizable themes
#+texinfo_header: @set MAINTAINERSITE @uref{https://protesilaos.com,maintainer webpage}
#+texinfo_header: @set MAINTAINER Protesilaos Stavrou
#+texinfo_header: @set MAINTAINEREMAIL @email{info@protesilaos.com}
#+cindex: Essential configuration
#+vindex: modus-themes-after-load-theme-hook
-Users of the built-in themes can load and automatically enable the theme
-of their preference by adding either form to their init file:
+Users of the built-in themes cannot ~require~ the package as usual
+because there is no package to speak of. Instead, things are simpler as
+all one needs is to load the theme of their preference by adding either
+form to their init file:
#+begin_src emacs-lisp
(load-theme 'modus-operandi) ; Light theme
(load-theme 'modus-vivendi) ; Dark theme
#+end_src
-This is all one needs.
-
Users of packaged variants of the themes must add a few more lines to
ensure that everything works as intended. First, one has to require the
main library before loading either theme:
Changes to the available customization options must always be evaluated
before loading a theme ([[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization Options]]). An exception to this
norm is when using the various Custom interfaces or with commands like
-{{{kbd(M-x customize-set-variable)}}}, which can automatically reload
-the theme ([[#h:9001527a-4e2c-43e0-98e8-3ef72d770639][Option for inhibiting theme reload]]). This is how a basic
-setup could look like:
+{{{kbd(M-x customize-set-variable)}}}, which can optionally
+automatically reload the theme ([[#h:9001527a-4e2c-43e0-98e8-3ef72d770639][Option for inhibiting theme reload]]).
+
+This is how a basic setup could look like:
#+begin_src emacs-lisp
+;;; For the built-in themes which cannot use `require':
+;; Add all your customizations prior to loading the themes
+(setq modus-themes-italic-constructs t
+ modus-themes-bold-constructs nil
+ modus-themes-region '(bg-only no-extend))
+
+;; Load the theme of your choice:
+(load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi)
+
+(define-key global-map (kbd "<f5>") #'modus-themes-toggle)
+
+
+
+;;; For packaged versions which must use `require':
(require 'modus-themes)
-;; Your customisations here. For example:
-(setq modus-themes-bold-constructs t
- modus-themes-mode-line '3d)
+;; Add all your customizations prior to loading the themes
+(setq modus-themes-italic-constructs t
+ modus-themes-bold-constructs nil
+ modus-themes-region '(bg-only no-extend))
-;; Load the theme files before enabling a theme (else you get an error).
+;; Load the theme files before enabling a theme
(modus-themes-load-themes)
-;; Enable the theme of your preference:
-(modus-themes-load-operandi)
+;; Load the theme of your choice:
+(modus-themes-load-operandi) ;; OR (modus-themes-load-vivendi)
-;; Optionally add a key binding for the toggle between the themes:
(define-key global-map (kbd "<f5>") #'modus-themes-toggle)
#+end_src
package configurations in their setup. We use this as an example:
#+begin_src emacs-lisp
+;;; For the built-in themes which cannot use `require':
+(use-package emacs
+ :init
+ ;; Add all your customizations prior to loading the themes
+ (setq modus-themes-italic-constructs t
+ modus-themes-bold-constructs nil
+ modus-themes-region '(bg-only no-extend))
+ :config
+ ;; Load the theme of your choice:
+ (load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi)
+ :bind ("<f5>" . modus-themes-toggle)
+
+
+
+;;; For packaged versions which must use `require':
(use-package modus-themes
- :ensure ; omit this to use the built-in themes
+ :ensure
:init
;; Add all your customizations prior to loading the themes
(setq modus-themes-italic-constructs t
modus-themes-bold-constructs nil
modus-themes-region '(bg-only no-extend))
- ;; Load the theme files before enabling a theme (else you get an error).
+ ;; Load the theme files before enabling a theme
(modus-themes-load-themes)
:config
;; Load the theme of your choice:
The same without ~use-package~:
#+begin_src emacs-lisp
+;;; For the built-in themes which cannot use `require':
+;; Add all your customizations prior to loading the themes
+(setq modus-themes-italic-constructs t
+ modus-themes-bold-constructs nil
+ modus-themes-region '(bg-only no-extend))
+
+;; Load the theme of your choice:
+(load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi)
+
+(define-key global-map (kbd "<f5>") #'modus-themes-toggle)
+
+
+
+;;; For packaged versions which must use `require':
(require 'modus-themes)
;; Add all your customizations prior to loading the themes
modus-themes-bold-constructs nil
modus-themes-mixed-fonts nil
modus-themes-subtle-line-numbers nil
+ modus-themes-intense-mouseovers nil
modus-themes-deuteranopia t
modus-themes-tabs-accented t
modus-themes-variable-pitch-ui nil
;; Options for `modus-themes-mode-line' are either nil, or a list
;; that can combine any of `3d' OR `moody', `borderless',
- ;; `accented', and a natural number for extra padding
- modus-themes-mode-line '(4 accented borderless)
+ ;; `accented', a natural number for extra padding (or a cons cell
+ ;; of padding and NATNUM), and a floating point for the height of
+ ;; the text relative to the base font size (or a cons cell of
+ ;; height and FLOAT)
+ modus-themes-mode-line '(accented borderless (padding . 4) (height . 0.9))
+
+ ;; Same as above:
+ ;; modus-themes-mode-line '(accented borderless 4 0.9)
;; Options for `modus-themes-markup' are either nil, or a list
;; that can combine any of `bold', `italic', `background',
;; Options for `modus-themes-box-buttons' are either nil (the
;; default), or a list that can combine any of `flat', `accented',
- ;; `faint', `variable-pitch', `underline', the symbol of any font
- ;; weight as listed in `modus-themes-weights', and a floating
- ;; point number (e.g. 0.9) for the height of the button's text.
+ ;; `faint', `variable-pitch', `underline', `all-buttons', the
+ ;; symbol of any font weight as listed in `modus-themes-weights',
+ ;; and a floating point number (e.g. 0.9) for the height of the
+ ;; button's text.
modus-themes-box-buttons '(variable-pitch flat faint 0.9)
;; Options for `modus-themes-prompts' are either nil (the
;; value (or empty list) or a list of properties that can include
;; any of the following (for WEIGHT read further below):
;;
- ;; `key' - `background', `intense', `underline', `italic', WEIGHT
- ;; `selection' - `accented', `intense', `underline', `italic', WEIGHT
+ ;; `matches' - `background', `intense', `underline', `italic', WEIGHT
+ ;; `selection' - `accented', `intense', `underline', `italic', `text-also' WEIGHT
;; `popup' - same as `selected'
;; `t' - applies to any key not explicitly referenced (check docs)
;;
- ~heavy~
- ~extrabold~
- ~ultrabold~
-+ A floating point as a height multiple of the default (e.g. =0.9=)
++ A floating point as a height multiple of the default or a cons cell in
+ the form of =(height . FLOAT)=
++ ~all-buttons~
The default (a nil value or an empty list) is a gray background combined
with a pseudo three-dimensional effect.
A number, expressed as a floating point (e.g. =0.9=), adjusts the height
of the button's text to that many times the base font size. The default
height is the same as =1.0=, though it need not be explicitly stated.
+Instead of a floating point, an acceptable value can be in the form of a
+cons cell like =(height . FLOAT)= or =(height FLOAT)=, where FLOAT is
+the given number.
+
+The ~all-buttons~ property extends the box button effect (or the
+aforementioned properties) to the faces of the generic widget library.
+By default, those do not look like the buttons of the Custom UI as they
+are ordinary text wrapped in square brackets.
Combinations of any of those properties are expressed as a list,
like in these examples:
#+begin_src emacs-lisp
(flat)
(variable-pitch flat)
-(variable-pitch flat 0.9 semibold)
+(variable-pitch flat semibold 0.9)
+(variable-pitch flat semibold (height 0.9)) ; same as above
+(variable-pitch flat semibold (height . 0.9)) ; same as above
#+end_src
The order in which the properties are set is not significant.
- ~moody~
+ ~accented~
+ ~borderless~
-+ A natural number > 1 for extra padding
++ A natural number > 1 for extra padding or a cons cell in the form of
+ ~(padding . NATNUM)~.
++ A floating point to set the height of the mode line's text. It can
+ also be a cons cell in the form of ~(height . FLOAT)~.
The default (a nil value or an empty list) is a two-dimensional
rectangle with a border around it. The active and the inactive mode
users on Emacs 29, the ~x-use-underline-position-properties~ variable must
also be set to nil.
+The padding can also be expressed as a cons cell in the form of
+=(padding . NATNUM)= or =(padding NATNUM)= where the key is constant and
+NATNUM is the desired natural number.
+
+A floating point applies an adjusted height to the mode line's text as a
+multiple of the main font size. The default rate is 1.0 and does not
+need to be specified. Apart from a floating point, the height may also
+be expressed as a cons cell in the form of =(height . FLOAT)= or
+=(height FLOAT)= where the key is constant and the FLOAT is the desired
+number.
+
Combinations of any of those properties are expressed as a list, like in
these examples:
(moody accented borderless)
#+end_src
+Same as above, using the padding and height as an example (these
+all yield the same result):
+
+#+begin_src emacs-lisp
+(accented borderless 4 0.9)
+(accented borderless (padding . 4) (height . 0.9))
+(accented borderless (padding 4) (height 0.9))
+#+end_src
+
The order in which the properties are set is not significant.
In user configuration files the form may look like this:
The ~selection~ key applies to the current line or currently matched
candidate, depending on the specifics of the User Interface. By default
-(nil or an empty list), it has a subtle gray background and a bold
-weight. The list of properties it accepts is as follows (order is not
-significant):
+(nil or an empty list), it has a subtle gray background, a bold weight,
+and the base foreground value for the text. The list of properties it
+accepts is as follows (order is not significant):
- ~accented~ to make the background colorful instead of gray;
+- ~text-also~ to apply extra color to the text of the selected line;
+
- ~intense~ to increase the overall coloration;
- ~underline~ to draw a line below the characters;
#+end_src
In the case of the fallback, any property that does not apply to the
-corresponding key is simply ignored (~matches~ does not have ~accented~,
-~selection~ and ~popup~ do not have ~background~).
+corresponding key is simply ignored (~matches~ does not have ~accented~
+and ~text-also~, while ~selection~ and ~popup~ do not have
+~background~).
A concise expression of those associations can be written as follows,
where the ~car~ is always the key and the ~cdr~ is the list of
the rest of the buffer. Foreground values for all relevant faces are
updated to accommodate this aesthetic.
+** Option for mouseover effects
+:properties:
+:alt_title: Mouse hover effects
+:description: Toggle intense style for mouseover highlights
+:custom_id: h:9b869620-fcc5-4b5f-9ab8-225d73b7f22f
+:end:
+#+vindex: modus-themes-intense-mouseovers
+
+Brief: Toggle intense mouse hover effects.
+
+Symbol: ~modus-themes-intense-mouseovers~ (=boolean= type)
+
+Possible value:
+
+1. ~nil~ (default)
+2. ~t~
+
+By default all mouseover effects apply a highlight with a subtle colored
+background. When non-nil, these have a more pronounced effect.
+
+Note that this affects the generic ~highlight~ which, strictly speaking,
+is not limited to mouse usage.
+
** Option for markup style in Org and others
:properties:
:alt_title: Markup
properties:
- ~variable-pitch~ to use a proportionately spaced typeface;
+
- A number as a floating point (e.g. 1.5) to set the height of the text
to that many times the default font height. A float of 1.0 or the
- symbol ~no-scale~ have the same effect of making the font to the same
- height as the rest of the buffer. When neither a number nor ~no-scale~
- are present, the default is a small increase in height (a value of
- 1.15).
+ symbol ~no-scale~ have the same effect of making the font the same
+ height as the rest of the buffer. When neither a number nor
+ `no-scale' are present, the default is a small increase in height (a
+ value of 1.15).
+
+ Instead of a floating point, an acceptable value can be in the form of
+ a cons cell like =(height . FLOAT)= or =(height FLOAT)=, where FLOAT
+ is the given number.
+
- The symbol of a weight attribute adjusts the font of the heading
accordingly, such as ~light~, ~semibold~, etc. Valid symbols are
defined in the variable ~modus-themes-weights~. The absence of a
- ~grayscale~ to make weekdays use the main foreground color and
weekends a more subtle gray;
+
- ~workaholic~ to make weekdays and weekends look the same in
terms of color;
+
- ~bold-today~ to apply a bold typographic weight to the current
date;
+
- ~bold-all~ to render all date headings in a bold weight;
+
- ~underline-today~ applies an underline to the current date while
removing the background it has by default;
+
- A number as a floating point (e.g. 1.2) to set the height of the text
to that many times the default font height. The default is the same
- as the base font height (the equivalent of 1.0).
+ as the base font height (the equivalent of 1.0). Instead of a
+ floating point, an acceptable value can be in the form of a cons cell
+ like =(height . FLOAT)= or =(height FLOAT)=, where FLOAT is the given
+ number.
For example:
attenuated by painting both of them using shades of green. This
option thus highlights the alert and overdue states.
- When ~modus-themes-deuteranopia~ is non-nil the exact style of the habit
- graph adapts to the needs of users with red-green colour deficiency by
+ graph adapts to the needs of users with red-green color deficiency by
substituting every instance of green with blue or cyan (depending on
the specifics).
- ~extrabold~
- ~ultrabold~
+ ~no-bold~ (deprecated alias of a ~regular~ weight)
-+ A floating point as a height multiple of the default (e.g. =1.1=)
++ A floating point as a height multiple of the default or a cons cell in
+ the form of =(height . FLOAT)=.
By default (a ~nil~ value for this variable), all headings have a bold
typographic weight and use a desaturated text color.
A number, expressed as a floating point (e.g. 1.5), adjusts the height
of the heading to that many times the base font size. The default
height is the same as 1.0, though it need not be explicitly stated.
+Instead of a floating point, an acceptable value can be in the form of a
+cons cell like =(height . FLOAT)= or =(height FLOAT)=, where FLOAT is
+the given number.
Combinations of any of those properties are expressed as a list, like in
these examples:
(semibold)
(rainbow background)
(overline monochrome semibold 1.3)
+(overline monochrome semibold (height 1.3)) ; same as above
+(overline monochrome semibold (height . 1.3)) ; same as above
#+end_src
The order in which the properties are set is not significant.
: TERM=xterm-direct uxterm -e emacsclient -nw
+** Range of color with terminal emulators
+:PROPERTIES:
+:CUSTOM_ID: h:6b8211b0-d11b-4c00-9543-4685ec3b742f
+:END:
+#+cindex: Pure white and pure black in terminal emulators
+
+[ This is based on partial information. Please help verify and/or
+ expand these findings. ]
+
+When Emacs runs in a non-windowed session its color reproduction
+capacity is framed or determined by the underlying terminal emulator
+([[#h:fbb5e254-afd6-4313-bb05-93b3b4f67358][More accurate colors in terminal emulators]]). Emacs cannot produce a
+color that lies outside the range of what the terminal's color palette
+renders possible.
+
+This is immediately noticeable when the terminal's first 16 codes do not
+include a pure black value for the =termcol0= entry and a pure white for
+=termcol15=. Emacs cannot set the correct background (white for
+~modus-operandi~; black for ~modus-vivendi~) or foreground (inverse of
+the background). It thus falls back to the closest approximation, which
+seldom is appropriate for the purposes of the Modus themes.
+
+In such a case, the user is expected to update their terminal's color
+palette such as by adapting these resources:
+
+#+begin_src emacs-lisp
+! Theme: modus-operandi
+! Description: XTerm port of modus-operandi (Modus themes for GNU Emacs)
+! Author: Protesilaos Stavrou, <https://protesilaos.com>
+xterm*background: #ffffff
+xterm*foreground: #000000
+xterm*color0: #000000
+xterm*color1: #a60000
+xterm*color2: #005e00
+xterm*color3: #813e00
+xterm*color4: #0031a9
+xterm*color5: #721045
+xterm*color6: #00538b
+xterm*color7: #bfbfbf
+xterm*color8: #595959
+xterm*color9: #972500
+xterm*color10: #315b00
+xterm*color11: #70480f
+xterm*color12: #2544bb
+xterm*color13: #5317ac
+xterm*color14: #005a5f
+xterm*color15: #ffffff
+
+! Theme: modus-vivendi
+! Description: XTerm port of modus-vivendi (Modus themes for GNU Emacs)
+! Author: Protesilaos Stavrou, <https://protesilaos.com>
+xterm*background: #000000
+xterm*foreground: #ffffff
+xterm*color0: #000000
+xterm*color1: #ff8059
+xterm*color2: #44bc44
+xterm*color3: #d0bc00
+xterm*color4: #2fafff
+xterm*color5: #feacd0
+xterm*color6: #00d3d0
+xterm*color7: #bfbfbf
+xterm*color8: #595959
+xterm*color9: #ef8b50
+xterm*color10: #70b900
+xterm*color11: #c0c530
+xterm*color12: #79a8ff
+xterm*color13: #b6a0ff
+xterm*color14: #6ae4b9
+xterm*color15: #ffffff
+#+end_src
+
** Visualize the active Modus theme's palette
:properties:
:custom_id: h:f4d4b71b-2ca5-4c3d-b0b4-9bfd7aa7fb4d
is controlled by the variables ~modus-themes-operandi-color-overrides~ and
~modus-themes-vivendi-color-overrides~, which are alists that should
mirror a subset of the associations in ~modus-themes-operandi-colors~ and
-~modus-themes-vivendi-colors~ respectively. As with all customisations,
+~modus-themes-vivendi-colors~ respectively. As with all customizations,
overriding must be done before loading the affected theme.
[[#h:f4d4b71b-2ca5-4c3d-b0b4-9bfd7aa7fb4d][Visualize the active Modus theme's palette]].
the two themes, such as with {{{kbd(M-x modus-themes-toggle)}}} will
also use the overrides.
-Given that this is a user-level customisation, one is free to implement
+Given that this is a user-level customization, one is free to implement
whatever color values they desire, even if the possible combinations
fall below the minimum 7:1 contrast ratio that governs the design of the
themes (the WCAG AAA legibility standard). Alternatively, this can also
[[#h:f4d4b71b-2ca5-4c3d-b0b4-9bfd7aa7fb4d][Visualize the active Modus theme's palette]].
+** Near-monochrome syntax highlighting
+:properties:
+:custom_id: h:c1f3fa8e-7a63-4a6f-baf3-a7febc0661f0
+:end:
+#+cindex: Monochrome code syntax
+
+While the Modus themes do provide a user option to control the overall
+style of syntax highlighting in programming major modes, they do not
+cover the possibility of a monochromatic or near-monochromatic design
+([[#h:c119d7b2-fcd4-4e44-890e-5e25733d5e52][Option for syntax highlighting]]). This is due to the multitude of
+preferences involved: one may like comments to be styled with an accent
+value, another may want certain constructs to be bold, a third may apply
+italics to doc strings but not comments... The possibilities are
+virtually endless. As such, this sort of design is best handled at the
+user level in accordance with the information furnished elsewhere in
+this manual.
+
+[[#h:1487c631-f4fe-490d-8d58-d72ffa3bd474][Case-by-case face specs using the themes' palette]].
+
+[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]].
+
+The gist is that we want to override the font-lock faces. For our
+changes to persist while switching between ~modus-operandi~ and
+~modus-vivendi~ we wrap our face overrides in a function that we hook to
+~modus-themes-after-load-theme-hook~.
+
+Users who want to replicate the structure of the themes' source code are
+advised to use the examples with ~custom-set-faces~. Those who prefer a
+different approach can use the snippets which call ~set-face-attribute~.
+Below are the code blocks.
+
+The following uses a yellow accent value for comments and green hues for
+strings. Regexp grouping constructs have color values that work in the
+context of a green string. All other elements use the main foreground
+color, except warnings such as the ~user-error~ function in Elisp
+buffers which gets a subtle red tint (not to be confused with the
+~warning~ face which is used for genuine warnings). Furthermore, notice
+the ~modus-themes-bold~ and ~modus-themes-slant~ which apply the
+preference set in the user options ~modus-themes-bold-constructs~ and
+~modus-themes-italic-constructs~, respectively. Users who do not want
+this conditionally must replace these faces with ~bold~ and ~italic~
+respectively (or ~unspecified~ to disable the effect altogether).
+
+#+begin_src emacs-lisp
+;; This is the hook. It will not be replicated across all code samples.
+(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-subtle-syntax)
+
+(defun my-modus-themes-subtle-syntax ()
+ (modus-themes-with-colors
+ (custom-set-faces
+ `(font-lock-builtin-face ((,class :inherit modus-themes-bold :foreground unspecified)))
+ `(font-lock-comment-delimiter-face ((,class :inherit font-lock-comment-face)))
+ `(font-lock-comment-face ((,class :inherit unspecified :foreground ,fg-comment-yellow)))
+ `(font-lock-constant-face ((,class :foreground unspecified)))
+ `(font-lock-doc-face ((,class :inherit modus-themes-slant :foreground ,fg-special-mild)))
+ `(font-lock-function-name-face ((,class :foreground unspecified)))
+ `(font-lock-keyword-face ((,class :inherit modus-themes-bold :foreground unspecified)))
+ `(font-lock-negation-char-face ((,class :inherit modus-themes-bold :foreground unspecified)))
+ `(font-lock-preprocessor-face ((,class :foreground unspecified)))
+ `(font-lock-regexp-grouping-backslash ((,class :inherit bold :foreground ,yellow)))
+ `(font-lock-regexp-grouping-construct ((,class :inherit bold :foreground ,blue-alt-other)))
+ `(font-lock-string-face ((,class :foreground ,green-alt-other)))
+ `(font-lock-type-face ((,class :inherit modus-themes-bold :foreground unspecified)))
+ `(font-lock-variable-name-face ((,class :foreground unspecified)))
+ `(font-lock-warning-face ((,class :inherit modus-themes-bold :foreground ,red-nuanced-fg))))))
+
+;; Same as above with `set-face-attribute' instead of `custom-set-faces'
+(defun my-modus-themes-subtle-syntax ()
+ (modus-themes-with-colors
+ (set-face-attribute 'font-lock-builtin-face nil :inherit 'modus-themes-bold :foreground 'unspecified)
+ (set-face-attribute 'font-lock-comment-delimiter-face nil :inherit 'font-lock-comment-face)
+ (set-face-attribute 'font-lock-comment-face nil :inherit 'unspecified :foreground fg-comment-yellow)
+ (set-face-attribute 'font-lock-constant-face nil :foreground 'unspecified)
+ (set-face-attribute 'font-lock-doc-face nil :inherit 'modus-themes-slant :foreground fg-special-mild)
+ (set-face-attribute 'font-lock-function-name-face nil :foreground 'unspecified)
+ (set-face-attribute 'font-lock-keyword-face nil :inherit 'modus-themes-bold :foreground 'unspecified)
+ (set-face-attribute 'font-lock-negation-char-face nil :inherit 'modus-themes-bold :foreground 'unspecified)
+ (set-face-attribute 'font-lock-preprocessor-face nil :foreground 'unspecified)
+ (set-face-attribute 'font-lock-regexp-grouping-backslash nil :inherit 'bold :foreground yellow)
+ (set-face-attribute 'font-lock-regexp-grouping-construct nil :inherit 'bold :foreground blue-alt-other)
+ (set-face-attribute 'font-lock-string-face nil :foreground green-alt-other)
+ (set-face-attribute 'font-lock-type-face nil :inherit 'modus-themes-bold :foreground 'unspecified)
+ (set-face-attribute 'font-lock-variable-name-face nil :foreground 'unspecified)
+ (set-face-attribute 'font-lock-warning-face nil :inherit 'modus-themes-bold :foreground red-nuanced-fg)))
+#+end_src
+
+The following sample is the same as above, except strings are blue and
+comments are gray. Regexp constructs are adapted accordingly.
+
+#+begin_src emacs-lisp
+(defun my-modus-themes-subtle-syntax ()
+ (modus-themes-with-colors
+ (custom-set-faces
+ `(font-lock-builtin-face ((,class :inherit modus-themes-bold :foreground unspecified)))
+ `(font-lock-comment-delimiter-face ((,class :inherit font-lock-comment-face)))
+ `(font-lock-comment-face ((,class :inherit unspecified :foreground ,fg-alt)))
+ `(font-lock-constant-face ((,class :foreground unspecified)))
+ `(font-lock-doc-face ((,class :inherit modus-themes-slant :foreground ,fg-docstring)))
+ `(font-lock-function-name-face ((,class :foreground unspecified)))
+ `(font-lock-keyword-face ((,class :inherit modus-themes-bold :foreground unspecified)))
+ `(font-lock-negation-char-face ((,class :inherit modus-themes-bold :foreground unspecified)))
+ `(font-lock-preprocessor-face ((,class :foreground unspecified)))
+ `(font-lock-regexp-grouping-backslash ((,class :inherit bold :foreground ,fg-escape-char-backslash)))
+ `(font-lock-regexp-grouping-construct ((,class :inherit bold :foreground ,fg-escape-char-construct)))
+ `(font-lock-string-face ((,class :foreground ,blue-alt)))
+ `(font-lock-type-face ((,class :inherit modus-themes-bold :foreground unspecified)))
+ `(font-lock-variable-name-face ((,class :foreground unspecified)))
+ `(font-lock-warning-face ((,class :inherit modus-themes-bold :foreground ,red-nuanced-fg))))))
+
+;; Same as above with `set-face-attribute' instead of `custom-set-faces'
+(defun my-modus-themes-subtle-syntax ()
+ (modus-themes-with-colors
+ (set-face-attribute 'font-lock-builtin-face nil :inherit 'modus-themes-bold :foreground 'unspecified)
+ (set-face-attribute 'font-lock-comment-delimiter-face nil :inherit 'font-lock-comment-face)
+ (set-face-attribute 'font-lock-comment-face nil :inherit 'unspecified :foreground fg-alt)
+ (set-face-attribute 'font-lock-constant-face nil :foreground 'unspecified)
+ (set-face-attribute 'font-lock-doc-face nil :inherit 'modus-themes-slant :foreground fg-docstring)
+ (set-face-attribute 'font-lock-function-name-face nil :foreground 'unspecified)
+ (set-face-attribute 'font-lock-keyword-face nil :inherit 'modus-themes-bold :foreground 'unspecified)
+ (set-face-attribute 'font-lock-negation-char-face nil :inherit 'modus-themes-bold :foreground 'unspecified)
+ (set-face-attribute 'font-lock-preprocessor-face nil :foreground 'unspecified)
+ (set-face-attribute 'font-lock-regexp-grouping-backslash nil :inherit 'bold :foreground fg-escape-char-backslash)
+ (set-face-attribute 'font-lock-regexp-grouping-construct nil :inherit 'bold :foreground fg-escape-char-construct)
+ (set-face-attribute 'font-lock-string-face nil :foreground blue-alt)
+ (set-face-attribute 'font-lock-type-face nil :inherit 'modus-themes-bold :foreground 'unspecified)
+ (set-face-attribute 'font-lock-variable-name-face nil :foreground 'unspecified)
+ (set-face-attribute 'font-lock-warning-face nil :inherit 'modus-themes-bold :foreground red-nuanced-fg)))
+#+end_src
+
* Face coverage
:properties:
:custom_id: h:a9c8f29d-7f72-4b54-b74b-ddefe15d6a19
+ deadgrep
+ debbugs
+ deft
++ devdocs
+ dictionary
+ diff-hl
+ diff-mode
+ mct
+ mentor
+ messages
++ mini-modeline
+ minimap
+ mmm-mode
+ mode-line
+ dtache
+ easy-kill
+ edit-indirect
++ elfeed-summary
+ evil-owl
+ flyspell-correct
+ fortran-mode
+ swift-mode
+ tab-bar-echo-area
+ tide
++ undo-hl
+ vdiff
+ vertico-indexed
+ vertico-mouse
:custom_id: h:2a602816-bc1b-45bf-9675-4cbbd7bf6cab
:end:
-While designing the style for ~display-fill-column-indicator-mode~, we
-stayed close to the mode's defaults: to apply a subtle foreground color
-to the ~fill-column-indicator~ face, which blends well with the rest of
-theme and is consistent with the role of that mode. This is to not
-upset the expectations of users.
-
-Nevertheless, ~display-fill-column-indicator-mode~ has some known
-limitations pertaining to its choice of using typographic characters to
-draw its indicator. What should be a continuous vertical line might
-appear as a series of dashes in certain contexts or under specific
-conditions: a non-default value for ~line-spacing~, scaled and/or
-variable-pitch headings have been observed to cause this effect.
+The ~display-fill-column-indicator-mode~ uses a typographic character to
+draw its line. This has the downside of creating a dashed line. The
+dashes are further apart depending on how tall the font's glyph height
+is and what integer the ~line-spacing~ is set to.
-Given that we cannot control such factors, it may be better for affected
-users to deviate from the default style of the ~fill-column-indicator~
-face. Instead of setting a foreground color, one could use a background
-and have the foreground be indistinguishable from it. For example:
+At the theme level we eliminate this effect by making the character one
+pixel tall: the line is contiguous. Users who prefer the dashed line
+are advised to change the ~fill-column-indicator~ face, as explained
+elsewhere in this document. For example:
#+begin_src emacs-lisp
(modus-themes-with-colors
(custom-set-faces
- `(fill-column-indicator ((,class :background ,bg-inactive
- :foreground ,bg-inactive)))))
+ `(fill-column-indicator ((,class :foreground ,bg-active)))))
#+end_src
[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]].
highlighting the syntactic constructs, it applies color to different
levels of depth in the code structure.
-As {{{file(prism.el)}}} offers a broad range of customisations, we cannot
+As {{{file(prism.el)}}} offers a broad range of customizations, we cannot
style it directly at the theme level: that would run contrary to the
spirit of the package. Instead, we may offer preset color schemes.
Those should offer a starting point for users to adapt to their needs.
configuration to respect the theme's colors instead of whatever
specifications the webpage provides.
-Consult {{{kbd(C-h v shr-use-colors)}}}.
+Consult the doc string of ~shr-use-colors~.
** Note on SHR fonts
:properties:
"-draw" "text %X,%Y '%c'"))))
#+end_src
+** Note on the Notmuch logo
+:properties:
+:custom_id: h:636af312-54a5-4918-84a6-0698e85a3c6d
+:end:
+
+By default, the "hello" buffer of Notmuch includes a header with the
+programs' logo and a couple of buttons. The logo has the effect of
+enlarging the height of the line, which negatively impacts the shape of
+those buttons. Disabling the logo fixes the problem:
+
+#+begin_src emacs-lisp
+(setq notmuch-show-logo nil)
+#+end_src
+
* Frequently Asked Questions
:properties:
:custom_id: h:b3384767-30d3-4484-ba7f-081729f03a47
The former criterion should be crystal clear as it pertains to the
scientific foundations of the themes: high legibility and taking care of
-the needs of users with red-green colour deficiency (deuteranopia) by
-avoiding red+green colour coding paradigms and/or by providing red+blue
+the needs of users with red-green color deficiency (deuteranopia) by
+avoiding red+green color coding paradigms and/or by providing red+blue
variants.
The latter criterion is the "je ne sais quoi" of the artistic aspect of
For a trivial example: the curly underline that Emacs draws for spelling
errors is thinner than, e.g., what a graphical web browser has, so if I
was to design for an editor than has a thicker curly underline I would
-make the applicable colours less intense to counterbalance the
+make the applicable colors less intense to counterbalance the
typographic intensity of the added thickness.
With those granted, if anyone is willing to develop a port of the
The ~modus-operandi~ and ~modus-vivendi~ themes are built into Emacs 28.
-The source code of the themes is [[https://gitlab.com/protesilaos/modus-themes/][available on Gitlab]], for the time
-being. A [[https://github.com/protesilaos/modus-themes/][mirror on Github]] is also on offer.
+The source code of the themes is [[https://gitlab.com/protesilaos/modus-themes/][available on GitLab]], for the time
+being. A [[https://github.com/protesilaos/modus-themes/][mirror on GitHub]] is also on offer.
An HTML version of this manual is provided as an extension of the
[[https://protesilaos.com/emacs/modus-themes/][author's personal website]] (does not rely on any non-free code).
+ Author/maintainer :: Protesilaos Stavrou.
+ Contributions to code or documentation :: Alex Griffin, Anders
- Johansson, Basil L.{{{space()}}} Contovounesios, Björn Lindström, Carlo
- Zancanaro, Christian Tietze, Daniel Mendler, Eli Zaretskii, Fritz
- Grabo, Illia Ostapyshyn, Kévin Le Gouguec, Kostadin Ninev, Madhavan
- Krishnan, Markus Beppler, Matthew Stevenson, Mauro Aranda, Nicolas De
- Jaeghere, Philip Kaludercic, Rudolf Adamkovič, Stephen Gildea, Shreyas
- Ragavan, Stefan Kangas, Utkarsh Singh, Vincent Murphy, Xinglu Chen,
- Yuanchen Xie.
+ Johansson, Basil L.{{{space()}}} Contovounesios, Björn Lindström,
+ Carlo Zancanaro, Christian Tietze, Daniel Mendler, Eli Zaretskii,
+ Fritz Grabo, Illia Ostapyshyn, Kévin Le Gouguec, Kostadin Ninev,
+ Madhavan Krishnan, Markus Beppler, Matthew Stevenson, Mauro Aranda,
+ Nicolas De Jaeghere, Philip Kaludercic, Pierre Téchoueyres, Rudolf
+ Adamkovič, Stephen Gildea, Shreyas Ragavan, Stefan Kangas, Utkarsh
+ Singh, Vincent Murphy, Xinglu Chen, Yuanchen Xie.
+ Ideas and user feedback :: Aaron Jensen, Adam Porter, Adam Spiers,
Adrian Manea, Alex Griffin, Alex Koen, Alex Peitsinis, Alexey Shmalko,
- Alok Singh, Anders Johansson, André Alexandre Gomes, Arif Rezai, Basil
- L.{{{space()}}} Contovounesios, Burgess Chang, Christian Tietze,
- Christopher Dimech, Damien Cassou, Daniel Mendler, Dario Gjorgjevski,
- David Edmondson, Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele
- Michele Alberto Monterosso, Farasha Euker, Feng Shu, Gautier Ponsinet,
- Gerry Agbobada, Gianluca Recchia, Guilherme Semente, Gustavo Barros,
- Hörmetjan Yiltiz, Ilja Kocken, Iris Garcia, Jeremy Friesen, Jerry
- Zhang, Johannes Grødem, John Haman, Joshua O'Connor, Kenta Usami,
- Kevin Fleming, Kévin Le Gouguec, Kostadin Ninev, Len Trigg, Magne Hov,
- Manuel Uberti, Mark Bestley, Mark Burton, Markus Beppler, Mauro
- Aranda, Michael Goldenberg, Morgan Smith, Murilo Pereira, Nicky van
+ Alok Singh, Anders Johansson, André Alexandre Gomes, Antonio Hernández
+ Blas, Arif Rezai, Augusto Stoffel, Basil L.{{{space()}}}
+ Contovounesios, Burgess Chang, Christian Tietze, Christopher Dimech,
+ Damien Cassou, Daniel Mendler, Dario Gjorgjevski, David Edmondson,
+ Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele Michele Alberto
+ Monterosso, Farasha Euker, Feng Shu, Gautier Ponsinet, Gerry Agbobada,
+ Gianluca Recchia, Guilherme Semente, Gustavo Barros, Hörmetjan Yiltiz,
+ Ilja Kocken, Iris Garcia, Jeremy Friesen, Jerry Zhang, Johannes
+ Grødem, John Haman, Jorge Morais, Joshua O'Connor, Julio
+ C. Villasante, Kenta Usami, Kevin Fleming, Kévin Le Gouguec, Kostadin
+ Ninev, Len Trigg, Lennart C. Karssen, Magne Hov, Manuel Uberti, Mark
+ Bestley, Mark Burton, Markus Beppler, Mauro Aranda, Michael
+ Goldenberg, Morgan Smith, Morgan Willcock, Murilo Pereira, Nicky van
Foreest, Nicolas De Jaeghere, Paul Poloskov, Pengji Zhang, Pete
- Kazmier, Peter Wu, Philip Kaludercic, Pierre Téchoueyres, Roman
- Rudakov, Ryan Phillips, Rudolf Adamkovič, Sam Kleinman, Samuel
- Culpepper, Saša Janiška, Shreyas Ragavan, Simon Pugnet, Tassilo Horn,
- Thibaut Verron, Thomas Heartman, Togan Muftuoglu, Trey Merkley, Tomasz
- Hołubowicz, Toon Claes, Uri Sharf, Utkarsh Singh, Vincent Foley. As
- well as users: Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux,
- Fredrik, Moesasji, Nick, TheBlob42, Trey, bepolymathe, bit9tream,
- derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn,
- pRot0ta1p.
+ Kazmier, Peter Wu, Philip Kaludercic, Pierre Téchoueyres, Robert
+ Hepple, Roman Rudakov, Ryan Phillips, Rytis Paškauskas, Rudolf
+ Adamkovič, Sam Kleinman, Samuel Culpepper, Saša Janiška, Shreyas
+ Ragavan, Simon Pugnet, Tassilo Horn, Thibaut Verron, Thomas Heartman,
+ Togan Muftuoglu, Tony Zorman, Trey Merkley, Tomasz Hołubowicz, Toon
+ Claes, Uri Sharf, Utkarsh Singh, Vincent Foley. As well as users:
+ Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux, Fredrik,
+ Moesasji, Nick, TheBlob42, Trey, bepolymathe, bit9tream, derek-upham,
+ doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn, pRot0ta1p.
+ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii, Glenn
Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core Emacs),
-;;; modus-themes.el --- Highly accessible and customizable themes (WCAG AAA) -*- lexical-binding:t -*-
+;;; modus-themes.el --- Elegant, highly legible and customizable themes -*- lexical-binding:t -*-
;; Copyright (C) 2019-2022 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; URL: https://gitlab.com/protesilaos/modus-themes
-;; Version: 2.2.0
-;; Last-Modified: <2022-02-23 08:56:46 +0200>
+;; Version: 2.3.0
+;; Last-Modified: <2022-04-01 12:33:34 +0300>
;; Package-Requires: ((emacs "27.1"))
;; Keywords: faces, theme, accessibility
;; modus-themes-bold-constructs (boolean)
;; modus-themes-deuteranopia (boolean)
;; modus-themes-inhibit-reload (boolean)
+;; modus-themes-intense-mouseovers (boolean)
;; modus-themes-italic-constructs (boolean)
;; modus-themes-mixed-fonts (boolean)
;; modus-themes-subtle-line-numbers (boolean)
;; deadgrep
;; debbugs
;; deft
+;; devdocs
;; dictionary
;; diff-hl
;; diff-mode
;; mct
;; mentor
;; messages
+;; mini-modeline
;; minimap
;; mmm-mode
;; mode-line
\f
-(eval-when-compile (require 'cl-lib))
+(eval-when-compile
+ (require 'cl-lib)
+ (require 'subr-x))
+(require 'seq)
(defgroup modus-themes ()
"Options for `modus-operandi', `modus-vivendi'.
(define-obsolete-face-alias
'modus-themes-completion-standard-first-match
- 'modus-themes-completion-selection
+ 'modus-themes-completion-selected
"2.2.0")
(define-obsolete-face-alias
'modus-themes-completion-standard-selected
- 'modus-themes-completion-selection
+ 'modus-themes-completion-selected
"2.2.0")
(define-obsolete-face-alias
'modus-themes-completion-extra-selected
- 'modus-themes-completion-selection
+ 'modus-themes-completion-selected
"2.2.0")
(define-obsolete-face-alias
(put 'modus-themes-vivendi-color-overrides
'custom-options (copy-sequence colors)))
-(define-obsolete-variable-alias
- 'modus-themes-slanted-constructs
- 'modus-themes-italic-constructs
- "1.5.0")
+(defvaralias 'modus-themes-slanted-constructs 'modus-themes-italic-constructs)
(defcustom modus-themes-italic-constructs nil
"Use italic font forms in more code constructs."
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Bold constructs"))
-(defcustom modus-themes-variable-pitch-headings nil
- "DEPRECATED: specify `variable-pitch' in `modus-themes-headings'."
- :group 'modus-themes
- :package-version '(modus-themes . "1.0.0")
- :version "28.1"
- :type 'boolean
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default
- :link '(info-link "(modus-themes) Headings' typeface"))
-
-(make-obsolete 'modus-themes-variable-pitch-headings 'modus-themes-headings "2.0.0")
-
(defcustom modus-themes-variable-pitch-ui nil
"Use proportional fonts (variable-pitch) in UI elements.
This includes the mode line, header line, tab bar, and tab line."
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) UI typeface"))
-(define-obsolete-variable-alias
- 'modus-themes-no-mixed-fonts
- 'modus-themes-mixed-fonts "On 2021-10-02 for version 1.7.0")
-
(defcustom modus-themes-mixed-fonts nil
"Non-nil to enable inheritance from `fixed-pitch' in some faces.
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Mixed fonts"))
+(defcustom modus-themes-intense-mouseovers nil
+ "When non-nil use more intense style for mouse hover effects.
+
+This affects the generic `highlight' face which, strictly
+speaking, is not limited to mouse usage."
+ :group 'modus-themes
+ :package-version '(modus-themes . "2.3.0")
+ :version "29.1"
+ :type 'boolean
+ :set #'modus-themes--set-option
+ :initialize #'custom-initialize-default
+ :link '(info-link "(modus-themes) Mouse hover effects"))
+
(defconst modus-themes--headings-choice
'(set :tag "Properties" :greedy t
(const :tag "Background color" background)
(const :tag "Semi-bold" semibold)
(const :tag "Extra-bold" extrabold)
(const :tag "Ultra-bold" ultrabold))
- (float :tag "Number (float) to adjust height by" :value 1.1)
+ (radio :tag "Height"
+ (float :tag "Floating point to adjust height by")
+ (cons :tag "Cons cell of `(height . FLOAT)'"
+ (const :tag "The `height' key (constant)" height)
+ (float :tag "Floating point")))
(choice :tag "Colors"
(const :tag "Subtle colors" nil)
(const :tag "Rainbow colors" rainbow)
A number, expressed as a floating point (e.g. 1.5), adjusts the
height of the heading to that many times the base font size. The
default height is the same as 1.0, though it need not be
-explicitly stated.
+explicitly stated. Instead of a floating point, an acceptable
+value can be in the form of a cons cell like (height . FLOAT)
+or (height FLOAT), where FLOAT is the given number.
Combinations of any of those properties are expressed as a list,
like in these examples:
(semibold)
(rainbow background)
(overline monochrome semibold 1.3)
+ (overline monochrome semibold (height 1.3)) ; same as above
+ (overline monochrome semibold (height . 1.3)) ; same as above
The order in which the properties are set is not significant.
and `background' properties. Depending on the version of Org,
there may be others, such as `org-fontify-done-headline'."
:group 'modus-themes
- :package-version '(modus-themes . "2.0.0")
+ :package-version '(modus-themes . "2.3.0")
:version "29.1"
:type `(alist
:options ,(mapcar (lambda (el)
include either or both of those properties:
- `variable-pitch' to use a proportionately spaced typeface;
+
- A number as a floating point (e.g. 1.5) to set the height of
the text to that many times the default font height. A float
of 1.0 or the symbol `no-scale' have the same effect of making
- the font to the same height as the rest of the buffer. When
+ the font the same height as the rest of the buffer. When
neither a number nor `no-scale' are present, the default is a
small increase in height (a value of 1.15).
+
+ Instead of a floating point, an acceptable value can be in the
+ form of a cons cell like (height . FLOAT) or (height FLOAT),
+ where FLOAT is the given number.
+
- The symbol of a weight attribute adjusts the font of the
heading accordingly, such as `light', `semibold', etc. Valid
symbols are defined in the variable `modus-themes-weights'.
- `grayscale' to make weekdays use the main foreground color and
weekends a more subtle gray;
+
- `workaholic' to make weekdays and weekends look the same in
terms of color;
+
- `bold-today' to apply a bold typographic weight to the current
date;
+
- `bold-all' to render all date headings in a bold weight;
+
- `underline-today' applies an underline to the current date
while removing the background it has by default;
+
- A number as a floating point (e.g. 1.2) to set the height of
the text to that many times the default font height. The
default is the same as the base font height (the equivalent of
- 1.0).
+ 1.0). Instead of a floating point, an acceptable value can be
+ in the form of a cons cell like (height . FLOAT) or (height
+ FLOAT), where FLOAT is the given number.
For example:
highlights the alert and overdue states.
- When `modus-themes-deuteranopia' is non-nil the exact style of
the habit graph adapts to the needs of users with red-green
- colour deficiency by substituting every instance of green with
+ color deficiency by substituting every instance of green with
blue or cyan (depending on the specifics).
For example:
(habit . simplified)
(habit . traffic-light)"
:group 'modus-themes
- :package-version '(modus-themes . "2.1.0")
+ :package-version '(modus-themes . "2.3.0")
:version "29.1"
:type '(set
(cons :tag "Block header"
(const :tag "Semi-bold" semibold)
(const :tag "Extra-bold" extrabold)
(const :tag "Ultra-bold" ultrabold))
- (choice :tag "Scaling"
+ (radio :tag "Scaling"
(const :tag "Slight increase in height (default)" nil)
(const :tag "Do not scale" no-scale)
- (float :tag "Number (float) to adjust height by" :value 1.3))))
+ (radio :tag "Number (float) to adjust height by"
+ (float :tag "Just the number")
+ (cons :tag "Cons cell of `(height . FLOAT)'"
+ (const :tag "The `height' key (constant)" height)
+ (float :tag "Floating point"))))))
(cons :tag "Date header" :greedy t
(const header-date)
(set :tag "Header presentation" :greedy t
(const :tag "Do not differentiate weekdays from weekends" workaholic)
(const :tag "Make today bold" bold-today)
(const :tag "Make all dates bold" bold-all)
- (float :tag "Number (float) to adjust height by" :value 1.05)
- (const :tag "Make today underlined; remove the background" underline-today)))
+ (const :tag "Make today underlined; remove the background" underline-today)
+ (radio :tag "Number (float) to adjust height by"
+ (float :tag "Just the number")
+ (cons :tag "Cons cell of `(height . FLOAT)'"
+ (const :tag "The `height' key (constant)" height)
+ (float :tag "Floating point")))))
(cons :tag "Event entry" :greedy t
(const event)
(set :tag "Text presentation" :greedy t
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Org agenda"))
-(defcustom modus-themes-scale-headings nil
- "DEPRECATED: specify height in `modus-themes-headings'."
- :group 'modus-themes
- :package-version '(modus-themes . "1.2.0")
- :version "28.1"
- :type 'boolean
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default)
-
-(make-obsolete 'modus-themes-scale-headings 'modus-themes-headings "2.0.0")
-
-(defcustom modus-themes-scale-1 1.05
- "DEPRECATED: specify height in `modus-themes-headings'."
- :group 'modus-themes
- :package-version '(modus-themes . "1.2.0")
- :version "28.1"
- :type 'number
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default)
-
-(make-obsolete 'modus-themes-scale-1 'modus-themes-headings "2.0.0")
-
-(defcustom modus-themes-scale-2 1.1
- "DEPRECATED: specify height in `modus-themes-headings'."
- :group 'modus-themes
- :package-version '(modus-themes . "1.2.0")
- :version "28.1"
- :type 'number
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default)
-
-(make-obsolete 'modus-themes-scale-2 'modus-themes-headings "2.0.0")
-
-(defcustom modus-themes-scale-3 1.15
- "DEPRECATED: specify height in `modus-themes-headings'."
- :group 'modus-themes
- :package-version '(modus-themes . "1.2.0")
- :version "28.1"
- :type 'number
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default)
-
-(make-obsolete 'modus-themes-scale-3 'modus-themes-headings "2.0.0")
-
-(defcustom modus-themes-scale-4 1.2
- "DEPRECATED: specify height in `modus-themes-headings'."
- :group 'modus-themes
- :package-version '(modus-themes . "1.2.0")
- :version "28.1"
- :type 'number
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default)
-
-(make-obsolete 'modus-themes-scale-4 'modus-themes-headings "2.0.0")
-
-(defcustom modus-themes-scale-title 1.3
- "DEPRECATED: specify height in `modus-themes-headings'.
-Same principle for `modus-themes-org-agenda'."
- :group 'modus-themes
- :package-version '(modus-themes . "1.5.0")
- :version "28.1"
- :type 'number
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default)
-
-(make-obsolete 'modus-themes-scale-title 'modus-themes-headings "2.0.0")
-
-(defcustom modus-themes-scale-small 0.9
- "DEPRECATED."
- :group 'modus-themes
- :package-version '(modus-themes . "1.6.0")
- :version "28.1"
- :type 'number
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default)
-
-(make-obsolete 'modus-themes-scale-small nil "2.0.0")
-
(defcustom modus-themes-fringes nil
"Define the visibility of fringes.
the `x-use-underline-position-properties' variable must also be
set to nil.
+The padding can also be expressed as a cons cell in the form
+of (padding . NATNUM) or (padding NATNUM) where the key is
+constant and NATNUM is the desired natural number.
+
+A floating point (e.g. 0.9) applies an adjusted height to the
+mode line's text as a multiple of the main font size. The
+default rate is 1.0 and does not need to be specified. Apart
+from a floating point, the height may also be expressed as a cons
+cell in the form of (height . FLOAT) or (height FLOAT) where the
+key is constant and the FLOAT is the desired number.
+
Combinations of any of those properties are expressed as a list,
like in these examples:
(borderless 3d)
(moody accented borderless)
+Same as above, using the padding and height as an example (these
+all yield the same result):
+
+ (accented borderless 4 0.9)
+ (accented borderless (padding . 4) (height . 0.9))
+ (accented borderless (padding 4) (height 0.9))
+
The order in which the properties are set is not significant.
In user configuration files the form may look like this:
instead of a box style, it is strongly advised to set
`x-underline-at-descent-line' to a non-nil value."
:group 'modus-themes
- :package-version '(modus-themes . "1.6.0")
- :version "28.1"
+ :package-version '(modus-themes . "2.3.0")
+ :version "29.1"
:type '(set :tag "Properties" :greedy t
(choice :tag "Overall style"
(const :tag "Rectangular Border" nil)
(const :tag "No box effects (Moody-compatible)" moody))
(const :tag "Colored background" accented)
(const :tag "Without border color" borderless)
- (natnum :tag "With extra padding"))
+ (radio :tag "Padding"
+ (natnum :tag "Natural number (e.g. 4)")
+ (cons :tag "Cons cell of `(padding . NATNUM)'"
+ (const :tag "The `padding' key (constant)" padding)
+ (natnum :tag "Natural number")))
+ (radio :tag "Height"
+ (float :tag "Floating point (e.g. 0.9)")
+ (cons :tag "Cons cell of `(height . FLOAT)'"
+ (const :tag "The `height' key (constant)" height)
+ (float :tag "Floating point"))))
:set #'modus-themes--set-option
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Mode line"))
-(defcustom modus-themes-mode-line-padding 6
- "DEPRECATED: Set natural number in `modus-themes-mode-line'."
- :group 'modus-themes
- :package-version '(modus-themes . "1.7.0")
- :version "29.1"
- :type 'natnum
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default
- :link '(info-link "(modus-themes) Mode line"))
-
-(make-obsolete 'modus-themes-mode-line-padding 'modus-themes-mode-line "2.0.0")
-
(defcustom modus-themes-diffs nil
"Adjust the overall style of diffs.
The `selection' key applies to the current line or currently
matched candidate, depending on the specifics of the User
Interface. By default (nil or an empty list), it has a subtle
-gray background and a bold weight. The list of properties it
-accepts is as follows (order is not significant):
+gray background, a bold weight, and the base foreground value
+for the text. The list of properties it accepts is as
+follows (order is not significant):
- `accented' to make the background colorful instead of gray;
+- `text-also' to apply extra color to the text of the selected
+ line;
+
- `intense' to increase the overall coloration;
- `underline' to draw a line below the characters;
In the case of the fallback, any property that does not apply to
the corresponding key is simply ignored (`matches' does not have
-`accented', `selection' and `popup' do not have `background').
+`accented' and `text-also', while `selection' and `popup' do not
+have `background').
A concise expression of those associations can be written as
follows, where the `car' is always the key and the `cdr' is the
Also refer to the Orderless documentation for its intersection
with Company (if you choose to use those in tandem)."
:group 'modus-themes
- :package-version '(modus-themes . "2.2.0")
+ :package-version '(modus-themes . "2.3.0")
:version "29.1"
:type `(set
(cons :tag "Matches"
(const :tag "Semi-bold" semibold)
(const :tag "Extra-bold" extrabold)
(const :tag "Ultra-bold" ultrabold))
+ (const :tag "Apply color to the line's text" text-also)
(const :tag "With accented background" accented)
(const :tag "Increased coloration" intense)
(const :tag "Italic font (oblique or slanted forms)" italic)
(const :tag "Semi-bold" semibold)
(const :tag "Extra-bold" extrabold)
(const :tag "Ultra-bold" ultrabold))
+ (const :tag "Apply color to the line's text" text-also)
(const :tag "With accented background" accented)
(const :tag "Increased coloration" intense)
(const :tag "Italic font (oblique or slanted forms)" italic)
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Active region"))
-(define-obsolete-variable-alias
- 'modus-themes-success-deuteranopia
- 'modus-themes-deuteranopia
- "2.0.0")
-
(defcustom modus-themes-deuteranopia nil
"When non-nil use red/blue color-coding instead of red/green.
A number, expressed as a floating point (e.g. 0.9), adjusts the
height of the button's text to that many times the base font
size. The default height is the same as 1.0, though it need not
-be explicitly stated.
+be explicitly stated. Instead of a floating point, an acceptable
+value can be in the form of a cons cell like (height . FLOAT)
+or (height FLOAT), where FLOAT is the given number.
+
+The `all-buttons' property extends the box button effect (or the
+aforementioned properties) to the faces of the generic widget
+library. By default, those do not look like the buttons of the
+Custom UI as they are ordinary text wrapped in square brackets.
Combinations of any of those properties are expressed as a list,
like in these examples:
(flat)
(variable-pitch flat)
- (variable-pitch flat 0.9 semibold)
+ (variable-pitch flat semibold 0.9)
+ (variable-pitch flat semibold (height 0.9)) ; same as above
+ (variable-pitch flat semibold (height . 0.9)) ; same as above
The order in which the properties are set is not significant.
(setq modus-themes-box-buttons (quote (variable-pitch flat 0.9)))"
:group 'modus-themes
- :package-version '(modus-themes . "2.1.0")
+ :package-version '(modus-themes . "2.3.0")
:version "29.1"
:type '(set :tag "Properties" :greedy t
(const :tag "Two-dimensional button" flat)
(const :tag "Reduce overall coloration" faint)
(const :tag "Proportionately spaced font (variable-pitch)" variable-pitch)
(const :tag "Underline instead of a box effect" underline)
+ (const :tag "Apply box button style to generic widget faces" all-buttons)
(choice :tag "Font weight (must be supported by the typeface)"
(const :tag "Thin" thin)
(const :tag "Ultra-light" ultralight)
(const :tag "Semi-bold" semibold)
(const :tag "Extra-bold" extrabold)
(const :tag "Ultra-bold" ultrabold))
- (float :tag "Number (float) to adjust height by" :value 0.9))
+ (radio :tag "Height"
+ (float :tag "Floating point to adjust height by")
+ (cons :tag "Cons cell of `(height . FLOAT)'"
+ (const :tag "The `height' key (constant)" height)
+ (float :tag "Floating point"))))
:set #'modus-themes--set-option
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Box buttons"))
;;; Internal functions
+(defun modus-themes--warn (option)
+ "Warn that OPTION has changed."
+ (prog1 nil
+ (display-warning
+ 'modus-themes
+ (format "`%s' has changed; please read the updated documentation" option)
+ :warning)))
+
+(defun modus-themes--list-or-warn (option)
+ "Return list or nil value of OPTION, else `modus-themes--warn'."
+ (let* ((value (symbol-value option)))
+ (if (or (null value) (listp value))
+ value
+ (modus-themes--warn option))))
+
+(defun modus-themes--alist-or-seq (properties alist-key seq-pred seq-default)
+ "Return value from alist or sequence.
+Check PROPERTIES for an alist value that corresponds to
+ALIST-KEY. If no alist is present, search the PROPERTIES
+sequence given SEQ-PRED, using SEQ-DEFAULT as a fallback."
+ (if-let* ((val (or (alist-get alist-key properties)
+ (seq-find seq-pred properties seq-default)))
+ ((listp val)))
+ (car val)
+ val))
+
(defun modus-themes--palette (theme)
"Return color palette for Modus theme THEME.
THEME is a symbol, either `modus-operandi' or `modus-vivendi'."
(custom-theme-set-variables ',name ,@modus-themes-custom-variables))))
(defun modus-themes--current-theme ()
- "Return current theme."
- (car custom-enabled-themes))
+ "Return current modus theme."
+ (car (seq-filter (lambda (arg) (string-match-p "^modus" (symbol-name arg)))
+ custom-enabled-themes)))
;; Helper functions that are meant to ease the implementation of the
;; above customization variables.
respectively. INTENSEFG-ALT is used when the intensity is high.
SUBTLEBG and INTENSEBG are color-coded background colors that
differ in overall intensity. FAINTFG is a nuanced color."
- (let ((modus-themes-lang-checkers
- (if (listp modus-themes-lang-checkers)
- modus-themes-lang-checkers
- (pcase modus-themes-lang-checkers
- ('colored-background '(background intense))
- ('intense-foreground '(intense))
- ('intense-foreground-straight-underline '(intense straight-underline))
- ('subtle-foreground '(text-also))
- ('subtle-foreground-straight-underline '(text-also straight-underline))
- ('straight-underline '(straight-underline))))))
+ (let ((properties (modus-themes--list-or-warn 'modus-themes-lang-checkers)))
(list :underline
(list :color
- (if (memq 'faint modus-themes-lang-checkers)
+ (if (memq 'faint properties)
faintfg underline)
:style
- (if (memq 'straight-underline modus-themes-lang-checkers)
+ (if (memq 'straight-underline properties)
'line 'wave))
:background
(cond
- ((and (memq 'background modus-themes-lang-checkers)
- (memq 'faint modus-themes-lang-checkers))
+ ((and (memq 'background properties)
+ (memq 'faint properties))
subtlebg)
- ((and (memq 'background modus-themes-lang-checkers)
- (memq 'intense modus-themes-lang-checkers))
+ ((and (memq 'background properties)
+ (memq 'intense properties))
intensebg)
- ((memq 'background modus-themes-lang-checkers)
+ ((memq 'background properties)
subtlebg)
('unspecified))
:foreground
(cond
- ((and (memq 'faint modus-themes-lang-checkers)
- (memq 'text-also modus-themes-lang-checkers))
+ ((and (memq 'faint properties)
+ (memq 'text-also properties))
faintfg)
- ((and (memq 'background modus-themes-lang-checkers)
- (memq 'intense modus-themes-lang-checkers))
+ ((and (memq 'background properties)
+ (memq 'intense properties))
intensefg-alt)
- ((memq 'intense modus-themes-lang-checkers)
+ ((memq 'intense properties)
intensefg)
- ((memq 'text-also modus-themes-lang-checkers)
+ ((memq 'text-also properties)
subtlefg)
('unspecified)))))
SUBTLEBGGRAY and INTENSEBGGRAY are background values. The former
can be combined with GRAYFG, while the latter only works with the
theme's fallback text color."
- (let ((properties modus-themes-prompts))
+ (let ((properties (modus-themes--list-or-warn 'modus-themes-prompts)))
(list :foreground
(cond
((and (memq 'gray properties)
something similar. INTENSEBG must be easier to discern next to
other backgrounds, such as the special palette color
'bg-paren-match-intense'."
- (let ((properties modus-themes-paren-match))
+ (let ((properties (modus-themes--list-or-warn 'modus-themes-paren-match)))
(list :inherit
(if (memq 'bold properties)
'bold
"Apply foreground value to code syntax.
FG is the default. FAINT is typically the same color in its
desaturated version."
- (let ((properties modus-themes-syntax))
+ (let ((properties (modus-themes--list-or-warn 'modus-themes-syntax)))
(list :foreground
(cond
((memq 'faint properties)
FG is the default. FAINT is typically the same color in its
desaturated version. ALT is another hue while optional FAINT-ALT
is its subtle alternative."
- (let ((properties modus-themes-syntax))
+ (let ((properties (modus-themes--list-or-warn 'modus-themes-syntax)))
(list :foreground
(cond
((and (memq 'alt-syntax properties)
the spectrum. ALT is another hue. Optional FAINT-GREEN is a
subtle alternative to GREEN. Optional FAINT-ALT is a subtle
alternative to ALT."
- (let ((properties modus-themes-syntax))
+ (let ((properties (modus-themes--list-or-warn 'modus-themes-syntax)))
(list :foreground
(cond
((and (memq 'faint properties)
FG is the default. YELLOW is a color variant of that name while
optional FAINT-YELLOW is its subtle variant. Optional FAINT is
an alternative to the default value."
- (let ((properties modus-themes-syntax))
+ (let ((properties (modus-themes--list-or-warn 'modus-themes-syntax)))
(list :foreground
(cond
((and (memq 'faint properties)
fg-alt)
(fg))
:height
- (seq-find #'floatp properties 'unspecified)
+ (modus-themes--alist-or-seq properties 'height #'floatp 'unspecified)
:weight
(or weight 'unspecified)
:overline
(or weight 'unspecified)
:height
(cond ((memq 'no-scale properties) 'unspecified)
- ((seq-find #'floatp properties 1.15)))
+ ((modus-themes--alist-or-seq properties 'height #'floatp 1.15)))
:foreground fg)))
(defun modus-themes--agenda-date (defaultfg grayscalefg &optional workaholicfg grayscaleworkaholicfg bg bold ul)
(t
defaultfg))
:height
- (seq-find #'floatp properties 'unspecified)
+ (modus-themes--alist-or-seq properties 'height #'floatp 'unspecified)
:underline
(if (and ul (memq 'underline-today properties))
t
Optional FG-DISTANT should be close to the main background
values. It is intended to be used as a distant-foreground
property."
- (let* ((properties modus-themes-mode-line)
- (padding (seq-find #'natnump properties 1))
+ (let* ((properties (modus-themes--list-or-warn 'modus-themes-mode-line))
+ (padding (modus-themes--alist-or-seq properties 'padding #'natnump 1))
+ (height (modus-themes--alist-or-seq properties 'height #'floatp 'unspecified))
(padded (> padding 1))
(base (cond ((memq 'accented properties)
(cons fg-accent bg-accent))
(border))))
(list :foreground (car base)
:background (cdr base)
+ :height height
:box
(cond ((memq 'moody properties)
'unspecified)
(list deuteran)
(list main)))
-(defun modus-themes--completion (key bg fg bgintense fgintense &optional bgaccent bgaccentintense)
+(make-obsolete 'modus-themes--completion 'modus-themes--completion-line "2.3.0")
+(make-obsolete 'modus-themes--completion 'modus-themes--completion-match "2.3.0")
+
+(defun modus-themes--completion-line (key bg fg bgintense fgintense &optional bgaccent bgaccentintense)
"Styles for `modus-themes-completions'.
KEY is the key of a cons cell. BG and FG are the main colors.
BGINTENSE works with the main foreground. FGINTENSE works on its
own. BGACCENT and BGACCENTINTENSE are colorful variants of the
other backgrounds."
- (let* ((var (if (listp modus-themes-completions)
- modus-themes-completions
- (prog1 nil
- (warn (concat "`modus-themes-completions' has changed."
- "\n"
- "Its value must now be an alist."
- "\n"
- "Please read the updated doc string.")))))
+ (let* ((var (modus-themes--list-or-warn 'modus-themes-completions))
(properties (or (alist-get key var) (alist-get t var)))
(popup (eq key 'popup))
(selection (eq key 'selection))
(line (or popup selection))
- (background (or line (memq 'background properties)))
- (base-fg (if selection fg 'unspecified))
+ (text (memq 'text-also properties))
(accented (memq 'accented properties))
(intense (memq 'intense properties))
(italic (memq 'italic properties))
bgaccentintense)
((and accented line)
bgaccent)
+ (intense bgintense)
+ (bg))
+ :foreground
+ (cond
+ ((and line text intense)
+ fgintense)
+ ((and line text)
+ fg)
+ ('unspecified))
+ :underline
+ (if (memq 'underline properties) t 'unspecified)
+ :weight
+ (if (and weight (null bold)) weight 'unspecified))))
+
+(defun modus-themes--completion-match (key bg fg bgintense fgintense)
+ "Styles for `modus-themes-completions'.
+KEY is the key of a cons cell. BG and FG are the main colors.
+BGINTENSE works with the main foreground. FGINTENSE works on its
+own."
+ (let* ((var (modus-themes--list-or-warn 'modus-themes-completions))
+ (properties (or (alist-get key var) (alist-get t var)))
+ (background (memq 'background properties))
+ (intense (memq 'intense properties))
+ (italic (memq 'italic properties))
+ (weight (modus-themes--weight properties))
+ (bold (when (and weight (eq weight 'bold)) 'bold)))
+ (list
+ :inherit
+ (cond
+ ((and italic weight (not (eq weight 'bold)))
+ 'italic)
+ ((and weight (not (eq weight 'bold)))
+ 'unspecified)
+ (italic 'bold-italic)
+ ('bold))
+ :background
+ (cond
((and background intense)
bgintense)
(background bg)
:foreground
(cond
((and background intense)
- base-fg)
+ 'unspecified)
(background fg)
(intense fgintense)
(fg))
property. FGFAINT is a desaturated color for the text and
underline. UNDERLINE is a gray color only for the undeline. BG
is a background color and BGNEUTRAL is its fallback value."
- (let ((properties modus-themes-links))
+ (let ((properties (modus-themes--list-or-warn 'modus-themes-links)))
(list :inherit
(cond
((and (memq 'bold properties)
"Extend `modus-themes--link'.
FG is the main accented foreground. FGFAINT is also accented,
yet desaturated. Optional NEUTRALFG is a gray value."
- (let ((properties modus-themes-links))
+ (let ((properties (modus-themes--list-or-warn 'modus-themes-links)))
(list :foreground
(cond
((memq 'no-color properties)
used to fontify text and code syntax. BGACCENT is a colored
background that combines well with FG. BGACCENTSUBTLE can be
combined with all colors used to fontify text."
- (let ((properties modus-themes-region))
+ (let ((properties (modus-themes--list-or-warn 'modus-themes-region)))
(list :background
(cond
((and (memq 'accented properties)
buffer's possible backgrounds: the former is neutral, the latter
is accented. LINENEUTRALINTENSE and LINEACCENTINTENSE are their
more prominent alternatives."
- (let ((properties modus-themes-hl-line))
+ (let ((properties (modus-themes--list-or-warn 'modus-themes-hl-line)))
(list :background
(cond
((and (memq 'intense properties)
(defun modus-themes--button (bg bgfaint bgaccent bgaccentfaint border &optional pressed-button-p)
"Apply `modus-themes-box-buttons' styles.
-Work in progress. BG BGFAINT BGACCENT BGACCENTFAINT BORDER PRESSED-BUTTON-P."
+BG is the main background. BGFAINT is its subtle alternative.
+BGACCENT is its accented variant and BGACCENTFAINT is the same
+but less intense. BORDER is the color around the box.
+
+When optional PRESSED-BUTTON-P is non-nil, the box uses the
+pressed button style, else the released button."
(let* ((properties modus-themes-box-buttons)
(weight (modus-themes--weight properties)))
(list :inherit
(weight weight)
('unspecified))
:height
- (seq-find #'floatp properties 'unspecified)
+ (modus-themes--alist-or-seq properties 'height #'floatp 'unspecified)
:underline
(if (memq 'underline properties)
t
(defvar modus-themes-after-load-theme-hook nil
"Hook that runs after the `modus-themes-toggle' routines.")
-;; The reason we use `load-theme' instead of `enable-theme' is that the
-;; former does a kind of "reset" on the face specs. So it plays nicely
-;; with `custom-set-faces', as well as defcustom user customizations,
-;; including the likes of `modus-themes-operandi-color-overrides'.
-;;
-;; Tests show that `enable-theme' does not re-read those variables, so
-;; it might appear to the unsuspecting user that the themes are somehow
-;; broken.
-;;
-;; This "reset", however, comes at the cost of being a bit slower than
-;; `enable-theme'. User who have a stable setup and seldom update their
-;; variables during a given Emacs session, are better off using
-;; something like this:
-;;
-;; (defun modus-themes-toggle-enabled ()
-;; "Toggle between `modus-operandi' and `modus-vivendi' themes."
-;; (interactive)
-;; (pcase (modus-themes--current-theme)
-;; ('modus-operandi (progn (enable-theme 'modus-vivendi)
-;; (disable-theme 'modus-operandi)))
-;; ('modus-vivendi (progn (enable-theme 'modus-operandi)
-;; (disable-theme 'modus-vivendi)))
-;; (_ (error "No Modus theme is loaded; evaluate `modus-themes-load-themes' first"))))
-
;;;###autoload
(defun modus-themes-load-operandi ()
"Load `modus-operandi' and disable `modus-vivendi'.
`(modus-themes-tab-inactive ((,class ,@(modus-themes--tab bg-tab-inactive bg-tab-inactive-accent fg-dim nil t))))
;;;;; completion frameworks
`(modus-themes-completion-match-0
- ((,class ,@(modus-themes--completion
+ ((,class ,@(modus-themes--completion-match
'matches bg-special-faint-calm magenta-alt
magenta-subtle-bg magenta-intense))))
`(modus-themes-completion-match-1
- ((,class ,@(modus-themes--completion
+ ((,class ,@(modus-themes--completion-match
'matches bg-special-faint-cold cyan
cyan-subtle-bg cyan-intense))))
`(modus-themes-completion-match-2
- ((,class ,@(modus-themes--completion
+ ((,class ,@(modus-themes--completion-match
'matches bg-special-faint-mild green
green-subtle-bg green-intense))))
`(modus-themes-completion-match-3
- ((,class ,@(modus-themes--completion
+ ((,class ,@(modus-themes--completion-match
'matches bg-special-faint-warm yellow
yellow-subtle-bg orange-intense))))
`(modus-themes-completion-selected
- ((,class ,@(modus-themes--completion
- 'selection bg-inactive 'unspecified
- bg-active 'unspecified
+ ((,class ,@(modus-themes--completion-line
+ 'selection bg-inactive blue-alt
+ bg-active blue-active
bg-completion-subtle bg-completion))))
`(modus-themes-completion-selected-popup
- ((,class ,@(modus-themes--completion
- 'popup bg-active 'unspecified
- bg-region 'unspecified
+ ((,class ,@(modus-themes--completion-line
+ 'popup bg-active blue-alt
+ bg-region blue-active
cyan-subtle-bg cyan-refine-bg))))
;;;;; buttons
`(modus-themes-box-button
;;;;; basic and/or ungrouped styles
`(bold ((,class :weight bold)))
`(bold-italic ((,class :inherit (bold italic))))
+ `(underline ((,class :underline ,fg-alt)))
`(buffer-menu-buffer ((,class :inherit bold)))
`(child-frame-border ((,class :background ,fg-window-divider-inner)))
`(comint-highlight-input ((,class :inherit bold)))
bg-hl-alt-intense bg-region-accent
bg-region-accent-subtle))))
`(secondary-selection ((,class :inherit modus-themes-special-cold)))
+ `(separator-line ((,class :underline ,bg-region)))
`(shadow ((,class :foreground ,fg-alt)))
`(success ((,class :inherit (bold modus-themes-grue))))
`(trailing-whitespace ((,class :background ,red-intense-bg)))
,@(modus-themes--link-color
magenta-alt-other magenta-alt-other-faint fg-alt))))
`(tooltip ((,class :background ,bg-special-cold :foreground ,fg-main)))
- `(widget-button ((,class :inherit bold :foreground ,blue-alt)))
- `(widget-button-pressed ((,class :inherit widget-button :foreground ,magenta)))
+ `(widget-button ((,class ,@(if (memq 'all-buttons modus-themes-box-buttons)
+ (list :inherit 'modus-themes-box-button)
+ (list :inherit 'bold :foreground blue-alt)))))
+ `(widget-button-pressed ((,class ,@(if (memq 'all-buttons modus-themes-box-buttons)
+ (list :inherit 'modus-themes-box-button-pressed)
+ (list :inherit 'bold :foreground magenta-alt)))))
`(widget-documentation ((,class :foreground ,green)))
`(widget-field ((,class :background ,bg-alt :foreground ,fg-main :extend nil)))
`(widget-inactive ((,class :inherit shadow :background ,bg-dim)))
`(font-latex-string-face ((,class :inherit font-lock-string-face)))
`(font-latex-subscript-face ((,class :height 0.95)))
`(font-latex-superscript-face ((,class :height 0.95)))
- `(font-latex-verbatim-face ((,class :background ,bg-dim :foreground ,fg-special-mild)))
+ `(font-latex-verbatim-face ((,class :inherit modus-themes-markup-verbatim)))
`(font-latex-warning-face ((,class :inherit font-lock-warning-face)))
`(tex-match ((,class :foreground ,blue-alt-other)))
`(tex-verbatim ((,class :inherit modus-themes-markup-verbatim)))
`(auto-dim-other-buffers-face ((,class :background ,bg-alt)))
;;;;; avy
`(avy-background-face ((,class :background ,bg-dim :foreground ,fg-dim :extend t)))
- `(avy-goto-char-timer-face ((,class :inherit (modus-themes-intense-yellow bold))))
- `(avy-lead-face ((,class :inherit (modus-themes-intense-magenta bold modus-themes-reset-soft))))
- `(avy-lead-face-0 ((,class :inherit (modus-themes-refine-cyan bold modus-themes-reset-soft))))
- `(avy-lead-face-1 ((,class :inherit (modus-themes-intense-neutral bold modus-themes-reset-soft))))
- `(avy-lead-face-2 ((,class :inherit (modus-themes-refine-red bold modus-themes-reset-soft))))
+ `(avy-goto-char-timer-face ((,class :inherit (modus-themes-intense-neutral bold))))
+ `(avy-lead-face ((,class :inherit (modus-themes-intense-blue bold modus-themes-reset-soft))))
+ `(avy-lead-face-0 ((,class :inherit (modus-themes-refine-magenta bold modus-themes-reset-soft))))
+ `(avy-lead-face-1 ((,class :inherit (modus-themes-special-warm modus-themes-reset-soft))))
+ `(avy-lead-face-2 ((,class :inherit (modus-themes-refine-green bold modus-themes-reset-soft))))
;;;;; aw (ace-window)
`(aw-background-face ((,class :foreground ,fg-unfocused)))
`(aw-key-face ((,class :inherit modus-themes-key-binding)))
`(centaur-tabs-close-unselected ((,class :inherit centaur-tabs-unselected)))
`(centaur-tabs-modified-marker-selected ((,class :inherit centaur-tabs-selected)))
`(centaur-tabs-modified-marker-unselected ((,class :inherit centaur-tabs-unselected)))
- `(centaur-tabs-default (( )))
+ `(centaur-tabs-default ((,class :background ,bg-main)))
`(centaur-tabs-selected ((,class :inherit modus-themes-tab-active)))
`(centaur-tabs-selected-modified ((,class :inherit (italic centaur-tabs-selected))))
`(centaur-tabs-unselected ((,class :inherit modus-themes-tab-inactive)))
`(company-preview-common ((,class :inherit company-echo-common)))
`(company-preview-search ((,class :inherit modus-themes-special-calm)))
`(company-template-field ((,class :inherit modus-themes-intense-magenta)))
- `(company-tooltip ((,class :background ,bg-alt :foreground ,fg-alt)))
+ `(company-tooltip ((,class :background ,bg-alt)))
`(company-tooltip-annotation ((,class :inherit completions-annotations)))
`(company-tooltip-common ((,class :inherit company-echo-common)))
`(company-tooltip-deprecated ((,class :inherit company-tooltip :strike-through t)))
`(deft-summary-face ((,class :inherit (shadow modus-themes-slant))))
`(deft-time-face ((,class :foreground ,fg-special-cold)))
`(deft-title-face ((,class :inherit bold :foreground ,fg-main)))
+;;;;; devdocs
+ `(devdocs-code-block ((,class :inherit modus-themes-fixed-pitch :background ,bg-dim :extend t)))
;;;;; dictionary
`(dictionary-button-face ((,class :inherit bold :foreground ,fg-special-cold)))
`(dictionary-reference-face ((,class :inherit button)))
`(diredp-tagged-autofile-name ((,class :inherit modus-themes-refine-magenta)))
`(diredp-write-priv ((,class :foreground ,cyan)))
;;;;; display-fill-column-indicator-mode
- `(fill-column-indicator ((,class :foreground ,bg-active)))
+ `(fill-column-indicator ((,class :height 1 :background ,bg-inactive :foreground ,bg-inactive)))
;;;;; doom-modeline
`(doom-modeline-bar ((,class :inherit modus-themes-active-blue)))
`(doom-modeline-bar-inactive ((,class :background ,fg-inactive :foreground ,bg-main)))
`(elpher-gemini-heading3 ((,class :inherit modus-themes-heading-3)))
;;;;; embark
`(embark-keybinding ((,class :inherit modus-themes-key-binding)))
+ `(embark-collect-marked ((,class :inherit modus-themes-mark-sel)))
;;;;; ement (ement.el)
`(ement-room-fully-read-marker ((,class :background ,cyan-subtle-bg)))
`(ement-room-membership ((,class :inherit shadow)))
- `(ement-room-mention (( )))
+ `(ement-room-mention ((,class :background ,bg-hl-alt-intense)))
`(ement-room-name ((,class :inherit bold)))
`(ement-room-reactions ((,class :inherit shadow)))
`(ement-room-read-receipt-marker ((,class :background ,yellow-subtle-bg)))
`(hi-red-b ((,class :inherit bold :background ,red-intense-bg :foreground ,fg-main)))
`(hi-salmon ((,class :background ,red-subtle-bg :foreground ,fg-main)))
`(hi-yellow ((,class :background ,yellow-subtle-bg :foreground ,fg-main)))
- `(highlight ((,class :background ,cyan-subtle-bg :foreground ,fg-main)))
+ `(highlight ((,class ,@(if modus-themes-intense-mouseovers
+ (list :background blue-intense-bg :foreground fg-main)
+ (list :background cyan-subtle-bg :foreground fg-main)))))
`(highlight-changes ((,class :foreground ,red-alt :underline nil)))
`(highlight-changes-delete ((,class :background ,red-nuanced-bg
:foreground ,red :underline t)))
;;;;; icomplete-vertical
`(icomplete-vertical-separator ((,class :inherit shadow)))
;;;;; ido-mode
- `(ido-first-match ((,class :inherit modus-themes-completion-selected)))
+ `(ido-first-match ((,class :inherit modus-themes-completion-match-0)))
`(ido-incomplete-regexp ((,class :inherit error)))
`(ido-indicator ((,class :inherit modus-themes-subtle-yellow)))
`(ido-only-match ((,class :inherit ido-first-match)))
`(message-header-xheader ((,class :foreground ,blue-alt)))
`(message-mml ((,class :foreground ,cyan-alt-other)))
`(message-separator ((,class :inherit modus-themes-intense-neutral)))
+;;;;; mini-modeline
+ `(mini-modeline-mode-line ((,class :background ,blue-intense :height 0.14)))
+ `(mini-modeline-mode-line-inactive ((,class :background ,fg-window-divider-inner :height 0.1)))
;;;;; minimap
`(minimap-active-region-background ((,class :background ,bg-active)))
`(minimap-current-line-face ((,class :background ,cyan-intense-bg :foreground ,fg-main)))
`(mode-line-active ((,class :inherit mode-line)))
`(mode-line-buffer-id ((,class :inherit bold)))
`(mode-line-emphasis ((,class :inherit bold :foreground ,magenta-active)))
- `(mode-line-highlight ((,class :inherit highlight)))
+ `(mode-line-highlight ((,class ,@(if modus-themes-intense-mouseovers
+ (list :inherit 'modus-themes-active-blue)
+ (list :inherit 'highlight)))))
`(mode-line-inactive ((,class :inherit modus-themes-ui-variable-pitch
,@(modus-themes--mode-line-attrs
fg-inactive bg-inactive
;;;;; org
`(org-agenda-calendar-event ((,class ,@(modus-themes--agenda-event blue-alt))))
`(org-agenda-calendar-sexp ((,class ,@(modus-themes--agenda-event blue-alt t))))
- `(org-agenda-clocking ((,class :inherit modus-themes-special-cold :extend t)))
+ `(org-agenda-clocking ((,class :background ,yellow-nuanced-bg :foreground ,red-alt)))
`(org-agenda-column-dateline ((,class :background ,bg-alt)))
`(org-agenda-current-time ((,class :foreground ,blue-alt-other-faint)))
`(org-agenda-date ((,class ,@(modus-themes--agenda-date cyan fg-main))))
`(org-checkbox (( )))
`(org-checkbox-statistics-done ((,class :inherit org-done)))
`(org-checkbox-statistics-todo ((,class :inherit org-todo)))
- `(org-clock-overlay ((,class :inherit modus-themes-special-cold)))
+ `(org-clock-overlay ((,class :background ,yellow-nuanced-bg :foreground ,red-alt-faint)))
`(org-code ((,class :inherit modus-themes-markup-code :extend t)))
`(org-column ((,class :inherit (modus-themes-fixed-pitch default)
:background ,bg-alt)))
`(org-hide ((,class :foreground ,bg-main)))
`(org-indent ((,class :inherit (fixed-pitch org-hide))))
`(org-imminent-deadline ((,class :foreground ,red-intense)))
- `(org-latex-and-related ((,class :foreground ,magenta-refine-fg)))
+ `(org-latex-and-related ((,class :foreground ,magenta-faint)))
`(org-level-1 ((,class :inherit modus-themes-heading-1)))
`(org-level-2 ((,class :inherit modus-themes-heading-2)))
`(org-level-3 ((,class :inherit modus-themes-heading-3)))
`(show-paren-match-expression ((,class :background ,bg-paren-expression)))
`(show-paren-mismatch ((,class :inherit modus-themes-intense-red)))
;;;;; shr
+ `(shr-abbreviation ((,class :inherit modus-themes-lang-note)))
+ `(shr-code ((,class :inherit modus-themes-markup-verbatim)))
`(shr-h1 ((,class :inherit modus-themes-heading-1)))
`(shr-h2 ((,class :inherit modus-themes-heading-2)))
`(shr-h3 ((,class :inherit modus-themes-heading-3)))
`(shr-h4 ((,class :inherit modus-themes-heading-4)))
`(shr-h5 ((,class :inherit modus-themes-heading-5)))
`(shr-h6 ((,class :inherit modus-themes-heading-6)))
- `(shr-abbreviation ((,class :inherit modus-themes-lang-note)))
`(shr-selected-link ((,class :inherit modus-themes-subtle-red)))
;;;;; side-notes
`(side-notes ((,class :background ,bg-dim :foreground ,fg-dim)))
;;;;; vertico
`(vertico-current ((,class :inherit modus-themes-completion-selected)))
;;;;; vertico-quick
- `(vertico-quick1 ((,class :inherit (modus-themes-intense-magenta bold))))
- `(vertico-quick2 ((,class :inherit (modus-themes-refine-cyan bold))))
+ `(vertico-quick1 ((,class :inherit (modus-themes-intense-blue bold))))
+ `(vertico-quick2 ((,class :inherit (modus-themes-refine-magenta bold))))
;;;;; vimish-fold
`(vimish-fold-fringe ((,class :foreground ,cyan-active)))
`(vimish-fold-mouse-face ((,class :inherit modus-themes-intense-blue)))
("XXX+" . ,red-alt)
("REVIEW" . ,cyan-alt-other)
("DEPRECATED" . ,blue-nuanced-fg)))
+;;;; mini-modeline
+ `(mini-modeline-face-attr '(:background unspecified))
;;;; pdf-tools
`(pdf-view-midnight-colors
'(,fg-main . ,bg-dim))
(340 . ,blue-alt-other)
(360 . ,magenta-alt-other)))
`(vc-annotate-very-old-color nil)
+;;;; wid-edit
+ `(widget-link-prefix ,(if (memq 'all-buttons modus-themes-box-buttons)
+ " "
+ "["))
+ `(widget-link-suffix ,(if (memq 'all-buttons modus-themes-box-buttons)
+ " "
+ "]"))
+ `(widget-mouse-face '(highlight widget-button))
+ `(widget-push-button-prefix ,(if (memq 'all-buttons modus-themes-box-buttons)
+ " "
+ "["))
+ `(widget-push-button-suffix ,(if (memq 'all-buttons modus-themes-box-buttons)
+ " "
+ "]"))
;;;; xterm-color
`(xterm-color-names ["black" ,red ,green ,yellow ,blue ,magenta ,cyan "gray65"])
`(xterm-color-names-bright ["gray35" ,red-alt ,green-alt ,yellow-alt ,blue-alt ,magenta-alt ,cyan-alt "white"])