modus-themes.info (268169B)
1 This is docGYh7V6.info, produced by makeinfo version 6.8 from 2 modus-themes.texi. 3 4 Copyright (C) 2020-2023 Free Software Foundation, Inc. 5 6 Permission is granted to copy, distribute and/or modify this 7 document under the terms of the GNU Free Documentation License, 8 Version 1.3 or any later version published by the Free Software 9 Foundation; with no Invariant Sections, with the Front-Cover Texts 10 being “A GNU Manual,” and with the Back-Cover Texts as in (a) 11 below. A copy of the license is included in the section entitled 12 “GNU Free Documentation License.” 13 14 (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and 15 modify this GNU manual.” 16 17 INFO-DIR-SECTION Emacs misc features 18 START-INFO-DIR-ENTRY 19 * Modus Themes: (modus-themes). Elegant, highly legible and customizable themes. 20 END-INFO-DIR-ENTRY 21 22 23 File: docGYh7V6.info, Node: Top, Next: Overview, Up: (dir) 24 25 Modus themes for GNU Emacs 26 ************************** 27 28 Copyright (C) 2020-2023 Free Software Foundation, Inc. 29 30 Permission is granted to copy, distribute and/or modify this 31 document under the terms of the GNU Free Documentation License, 32 Version 1.3 or any later version published by the Free Software 33 Foundation; with no Invariant Sections, with the Front-Cover Texts 34 being “A GNU Manual,” and with the Back-Cover Texts as in (a) 35 below. A copy of the license is included in the section entitled 36 “GNU Free Documentation License.” 37 38 (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and 39 modify this GNU manual.” 40 41 This manual, written by Protesilaos Stavrou, describes the 42 customization options for the Modus themes, and provides every other 43 piece of information pertinent to them. 44 45 The documentation furnished herein corresponds to stable version 46 4.3.0, released on 2023-09-19. Any reference to a newer feature which 47 does not yet form part of the latest tagged commit, is explicitly marked 48 as such. 49 50 Current development target is 4.4.0-dev. 51 52 • Package name (GNU ELPA): ‘modus-themes’ 53 • Official manual: <https://protesilaos.com/emacs/modus-themes> 54 • Change log: <https://protesilaos.com/emacs/modus-themes-changelog> 55 • Color palette: <https://protesilaos.com/emacs/modus-themes-colors> 56 • Sample pictures: 57 <https://protesilaos.com/emacs/modus-themes-pictures> 58 • Git repo on SourceHut: 59 <https://git.sr.ht/~protesilaos/modus-themes> 60 • Mirrors: 61 • GitHub: <https://github.com/protesilaos/modus-themes> 62 • GitLab: <https://gitlab.com/protesilaos/modus-themes> 63 • Mailing list: <https://lists.sr.ht/~protesilaos/modus-themes> 64 • Backronym: My Old Display Unexpectedly Sharpened ... themes 65 66 * Menu: 67 68 * Overview:: 69 * Installation:: 70 * Enable and load:: 71 * Customization options:: 72 * Advanced customization:: 73 * Face coverage:: 74 * Notes on individual packages:: 75 * Frequently Asked Questions:: 76 * Contributing:: 77 * Acknowledgements:: 78 * GNU Free Documentation License:: 79 * Indices:: 80 81 — The Detailed Node Listing — 82 83 Overview 84 85 * How do the themes look like:: 86 * Learn about the latest changes:: 87 88 Installation 89 90 * Install manually from source:: 91 * Install from the archives:: 92 * Install on GNU/Linux:: 93 * Dealing with byte compilation errors:: 94 95 Install on GNU/Linux 96 97 * Debian 11 Bullseye:: 98 * GNU Guix:: 99 100 Enable and load 101 102 * The require-theme for built-in Emacs themes:: 103 * Sample configuration with and without use-package:: 104 * Differences between loading and enabling:: 105 106 Customization options 107 108 * Custom reload theme:: Toggle auto-reload of the theme when setting custom variables 109 * Disable other themes:: Determine whether loading a Modus themes disables all others 110 * Bold constructs:: Toggle bold constructs in code 111 * Italic constructs:: Toggle italic font constructs in code 112 * Mixed fonts:: Toggle mixing of font families 113 * Command prompts:: Control the style of command prompts 114 * Completion UIs:: Choose among several styles for completion UIs 115 * Org mode blocks:: Choose among plain, gray, or tinted backgrounds 116 * Heading styles:: Choose among several styles, also per heading level 117 * UI typeface:: Toggle the use of variable-pitch across the User Interface 118 * Palette overrides:: Refashion color values and/or semantic color mappings 119 120 Advanced customization 121 122 * Palette override presets:: 123 * Stylistic variants using palette overrides:: 124 * More accurate colors in terminal emulators:: 125 * Range of color with terminal emulators:: 126 * Preview theme colors:: 127 * Per-theme customization settings:: 128 * Get a single color from the palette:: 129 * Use theme colors in code with modus-themes-with-colors:: 130 * Do not extend the region background:: 131 * Add padding to mode line:: 132 * Remap face with local value:: 133 * Font configurations for Org and others:: 134 * Configure bold and italic faces:: 135 * Custom Org todo keyword and priority faces:: 136 * Custom Org emphasis faces:: 137 * Update Org block delimiter fontification:: 138 * Measure color contrast:: 139 * Load theme depending on time of day:: 140 * Backdrop for pdf-tools:: 141 * Toggle themes without reloading them:: 142 * A theme-agnostic hook for theme loading:: 143 * Use more spacious margins or padding in Emacs frames:: 144 * Custom hl-todo colors:: 145 * Add support for solaire-mode:: 146 147 Stylistic variants using palette overrides 148 149 * Make the mode line borderless:: 150 * Make the active mode line colorful:: 151 * Make the tab bar more or less colorful:: 152 * Make the fringe invisible or another color:: 153 * Make links use subtle or no underlines:: 154 * Make prompts more or less colorful:: 155 * Make completion matches more or less colorful:: 156 * Make comments yellow and strings green:: 157 * Make code syntax use the old alt-syntax style:: 158 * Make use of alternative styles for code syntax:: 159 * Make matching parenthesis more or less intense:: 160 * Make box buttons more or less gray:: 161 * Make TODO and DONE more or less intense:: 162 * Make headings more or less colorful:: 163 * Make Org agenda more or less colorful:: 164 * Make inline code in prose use alternative styles:: 165 * Make mail citations and headers more or less colorful:: 166 * Make the region preserve text colors, plus other styles: Make the region preserve text colors plus other styles. 167 * Make mouse highlights more or less colorful:: 168 * Make language underlines less colorful:: 169 * Make line numbers use alternative styles:: 170 * Make diffs use only a foreground:: 171 * Make deuteranopia diffs red and blue instead of yellow and blue:: 172 * Make the themes look like what the maintainer uses:: 173 174 Face coverage 175 176 * Supported packages:: Full list of covered face groups 177 * Indirectly covered packages:: 178 179 Notes on individual packages 180 181 * Note on calendar.el weekday and weekend colors: Note on calendarel weekday and weekend colors. 182 * Note on git-gutter in Doom Emacs:: 183 * Note on php-mode multiline comments:: 184 * Note on underlines in compilation buffers:: 185 * Note on inline Latex in Org buffers:: 186 * Note on dimmer.el: Note on dimmerel. 187 * Note on display-fill-column-indicator-mode:: 188 * Note on highlight-parentheses.el: Note on highlight-parenthesesel. 189 * Note on mmm-mode.el background colors: Note on mmm-modeel background colors. 190 * Note for prism:: 191 * Note on company-mode overlay pop-up:: 192 * Note on ERC escaped color sequences:: 193 * Note on powerline or spaceline:: 194 * Note on SHR colors:: 195 * Note on SHR fonts:: 196 * Note on Ement colors and fonts:: 197 * Note on pdf-tools link hints:: 198 * Note on the Notmuch logo:: 199 * Note on goto-address-mode faces:: 200 201 Frequently Asked Questions 202 203 * Is the contrast ratio about adjacent colors?:: 204 * What does it mean to avoid exaggerations?:: 205 * Why are colors mostly variants of blue, magenta, cyan?: Why are colors mostly variants of blue magenta cyan?. 206 * What is the best setup for legibility?:: 207 * Are these color schemes?:: 208 * Port the Modus themes to other platforms?:: 209 210 Contributing 211 212 * Sources of the themes:: 213 * Issues you can help with:: 214 * Patches require copyright assignment to the FSF:: 215 216 Indices 217 218 * Function index:: 219 * Variable index:: 220 * Concept index:: 221 222 223 224 File: docGYh7V6.info, Node: Overview, Next: Installation, Prev: Top, Up: Top 225 226 1 Overview 227 ********** 228 229 The Modus themes are designed for accessible readability. They conform 230 with the highest standard for color contrast between combinations of 231 background and foreground values. For small sized text, this 232 corresponds to the WCAG AAA standard, which specifies a minimum rate of 233 distance in relative luminance of 7:1. 234 235 The Modus themes consist of eight themes, divided into four 236 subgroups. 237 238 Main themes 239 ‘modus-operandi’ is the project’s main light theme, while 240 ‘modus-vivendi’ is its dark counterpart. These two themes are part 241 of the project since its inception. They are designed to cover a 242 broad range of needs and are, in the opinion of the author, the 243 reference for what a highly legible “default” theme should look 244 like. 245 246 Tinted themes 247 ‘modus-operandi-tinted’ and ‘modus-vivendi-tinted’ are variants of 248 the two main themes. They slightly tone down the intensity of the 249 background and provide a bit more color variety. 250 ‘modus-operandi-tinted’ has a set of base tones that are shades of 251 light ochre (earthly colors), while ‘modus-vivendi-tinted’ gives a 252 night sky impression. 253 254 Deuteranopia themes 255 ‘modus-operandi-deuteranopia’ and its companion 256 ‘modus-vivendi-deuteranopia’ are optimized for users with red-green 257 color deficiency. This means that they do not use red and green 258 hues for color-coding purposes, such as for diff removed and added 259 lines. Instead, they implement colors that are discernible by 260 users with deueteranopia or deuteranomaly (mostly yellow and blue 261 hues). 262 263 Tritanopia themes 264 ‘modus-operandi-tritanopia’ and its counterpart 265 ‘modus-vivendi-tritanopia’ are optimized for users with blue-yellow 266 color deficiency. The idea is the same as with the deuteranopia 267 variants: color coding relies only on hues that are accessible to 268 people with tritanopia or tritanomaly, namely, shades of red and 269 cyan. 270 271 To ensure that users have a consistently accessible experience, the 272 themes strive to achieve as close to full face coverage as possible, 273 while still targeting a curated list of well-maintained packages (*note 274 Face coverage::). 275 276 The overarching objective of this project is to always offer 277 accessible color combinations. There shall never be a compromise on 278 this principle. If there arises an inescapable trade-off between 279 usability and stylistic considerations, we will always opt for the 280 former. 281 282 Starting with version 0.12.0 and onwards, the themes are built into 283 GNU Emacs. 284 285 * Menu: 286 287 * How do the themes look like:: 288 * Learn about the latest changes:: 289 290 291 File: docGYh7V6.info, Node: How do the themes look like, Next: Learn about the latest changes, Up: Overview 292 293 1.1 How do the themes look like 294 =============================== 295 296 Check the web page with the screen shots 297 (https://protesilaos.com/emacs/modus-themes-pictures/). Note that the 298 themes are highly customizable (*note Customization options::). 299 300 301 File: docGYh7V6.info, Node: Learn about the latest changes, Prev: How do the themes look like, Up: Overview 302 303 1.2 Learn about the latest changes 304 ================================== 305 306 Please refer to the web page with the change log 307 (https://protesilaos.com/emacs/modus-themes-changelog). It is 308 comprehensive and covers everything that goes into every tagged release 309 of the themes. 310 311 312 File: docGYh7V6.info, Node: Installation, Next: Enable and load, Prev: Overview, Up: Top 313 314 2 Installation 315 ************** 316 317 The Modus themes are distributed with Emacs starting with version 28.1. 318 On older versions of Emacs, they can be installed using Emacs’ package 319 manager or manually from their code repository. There also exist 320 packages for distributions of GNU/Linux. 321 322 Emacs 28 ships with ‘modus-themes’ version ‘1.6.0’. Emacs 29 323 includes version ‘3.0.0’. Emacs 30 provides a newer, refactored version 324 that thoroughly refashions how the themes are implemented and 325 customized. Such major versions are not backward-compatible due to the 326 limited resources at the maintainer’s disposal to support multiple 327 versions of Emacs and of the themes across the years. 328 329 * Menu: 330 331 * Install manually from source:: 332 * Install from the archives:: 333 * Install on GNU/Linux:: 334 * Dealing with byte compilation errors:: 335 336 337 File: docGYh7V6.info, Node: Install manually from source, Next: Install from the archives, Up: Installation 338 339 2.1 Install manually from source 340 ================================ 341 342 In the following example, we are assuming that your Emacs files are 343 stored in ‘~/.emacs.d’ and that you want to place the Modus themes in 344 ‘~/.emacs.d/modus-themes’. 345 346 1. Get the source and store it in the desired path by running the 347 following in the command line shell: 348 349 $ git clone https://gitlab.com/protesilaos/modus-themes.git ~/.emacs.d/modus-themes 350 351 1. Add that path to your known Elisp libraries’ list, by placing this 352 snippet of Emacs Lisp in your init file (e.g. ‘init.el’): 353 354 (add-to-list 'load-path "~/.emacs.d/modus-themes") 355 356 The themes are now ready to be used: *note Enable and load::. 357 358 359 File: docGYh7V6.info, Node: Install from the archives, Next: Install on GNU/Linux, Prev: Install manually from source, Up: Installation 360 361 2.2 Install from the archives 362 ============================= 363 364 The ‘modus-themes’ package is available from the GNU ELPA archive, which 365 is configured by default. 366 367 Prior to querying any package archive, make sure to update the index, 368 with ‘M-x package-refresh-contents’. Then all you need to do is type 369 ‘M-x package-install’ and specify the ‘modus-themes’. 370 371 Once installed, the themes are ready to be used: *note Enable and 372 load::. 373 374 375 File: docGYh7V6.info, Node: Install on GNU/Linux, Next: Dealing with byte compilation errors, Prev: Install from the archives, Up: Installation 376 377 2.3 Install on GNU/Linux 378 ======================== 379 380 The themes are also available from the archives of some distributions of 381 GNU/Linux. These should correspond to a tagged release rather than 382 building directly from the latest Git commit. It all depends on the 383 distro’s packaging policies. 384 385 * Menu: 386 387 * Debian 11 Bullseye:: 388 * GNU Guix:: 389 390 391 File: docGYh7V6.info, Node: Debian 11 Bullseye, Next: GNU Guix, Up: Install on GNU/Linux 392 393 2.3.1 Debian 11 Bullseye 394 ------------------------ 395 396 The themes are part of Debian 11 Bullseye. Get them with: 397 398 sudo apt install elpa-modus-themes 399 400 They are now ready to be used: *note Enable and load::. 401 402 NOTE that Debian’s package is severely out-of-date as of this writing 403 2022-07-24 09:57 +0300. 404 405 406 File: docGYh7V6.info, Node: GNU Guix, Prev: Debian 11 Bullseye, Up: Install on GNU/Linux 407 408 2.3.2 GNU Guix 409 -------------- 410 411 Users of Guix can get the themes with this command: 412 413 guix package -i emacs-modus-themes 414 415 They are now ready to be used: *note Enable and load::. 416 417 418 File: docGYh7V6.info, Node: Dealing with byte compilation errors, Prev: Install on GNU/Linux, Up: Installation 419 420 2.4 Dealing with byte compilation errors 421 ======================================== 422 423 From time to time, we receive bug reports pertaining to errors with byte 424 compilation. These seldom have to do with faulty code in the themes: it 425 might be a shortcoming of ‘package.el’, some regression in the current 426 development target of Emacs, a misconfiguration in an otherwise exotic 427 setup, and the like. 428 429 The common solution with a stable version of Emacs is to: 430 431 1. Delete the ‘modus-themes’ package. 432 2. Close the current Emacs session. 433 3. Install the ‘modus-themes’ again. 434 435 For those building Emacs directly from source, the solution may 436 involve reverting to an earlier commit in emacs.git. 437 438 At any rate, if you encounter such an issue please report it: we will 439 either fix the bug on our end if it is truly ours, or help forward it to 440 the relevant upstream maintainer. Whatever you do, please understand 441 that a build failure does not mean we are necessarily doing something 442 wrong. 443 444 *note Issues you can help with::. 445 446 447 File: docGYh7V6.info, Node: Enable and load, Next: Customization options, Prev: Installation, Up: Top 448 449 3 Enable and load 450 ***************** 451 452 NOTE that Emacs can load multiple themes, which typically produces 453 undesirable results and undoes the work of the designer. Use the 454 ‘disable-theme’ command if you are trying other themes beside the Modus 455 collection (*note Option for disabling other themes while loading Modus: 456 Disable other themes.). 457 458 Users of the built-in themes cannot ‘require’ the package as usual 459 because there is no package to speak of. Instead, things are simpler as 460 built-in themes are considered safe. All one needs is to load the theme 461 of their preference by adding either form to their init file: 462 463 (load-theme 'modus-operandi) ; Light theme 464 (load-theme 'modus-vivendi) ; Dark theme 465 466 Remember that the Modus themes are six themes (*note Overview::). 467 Adapt the above snippet accordingly. 468 469 Users of packaged variants of the themes must add a few more lines to 470 ensure that everything works as intended. First, one has to require the 471 main library before loading one of the themes: 472 473 (require 'modus-themes) 474 475 One can activate a theme with something like the following 476 expression, replacing ‘modus-operandi’ with their preferred Modus theme: 477 478 (load-theme 'modus-operandi :no-confirm) 479 480 Changes to the available customization options must always be 481 evaluated before loading a theme (*note Customization Options: 482 Customization options.). Reload a theme for new changes to take effect. 483 484 This is how a basic setup could look like (*note The require-theme 485 for built-in Emacs themes: The require-theme for built-in Emacs 486 themes.): 487 488 ;;; For the built-in themes which cannot use `require'. 489 (require-theme 'modus-themes) 490 491 ;; Add all your customizations prior to loading the themes. 492 (setq modus-themes-italic-constructs t 493 modus-themes-bold-constructs nil) 494 495 ;; Load the theme of your choice. 496 (load-theme 'modus-operandi) 497 498 ;; Optionally define a key to switch between Modus themes. Also check 499 ;; the user option `modus-themes-to-toggle'. 500 (define-key global-map (kbd "<f5>") #'modus-themes-toggle) 501 502 503 504 ;;; For packaged versions which must use `require'. 505 506 (require 'modus-themes) 507 508 ;; Add all your customizations prior to loading the themes 509 (setq modus-themes-italic-constructs t 510 modus-themes-bold-constructs nil) 511 512 ;; Load the theme of your choice. 513 (load-theme 'modus-operandi :no-confirm) 514 515 (define-key global-map (kbd "<f5>") #'modus-themes-toggle) 516 517 *note Sample configuration with and without use-package::. 518 519 * Menu: 520 521 * The require-theme for built-in Emacs themes:: 522 * Sample configuration with and without use-package:: 523 * Differences between loading and enabling:: 524 525 526 File: docGYh7V6.info, Node: The require-theme for built-in Emacs themes, Next: Sample configuration with and without use-package, Up: Enable and load 527 528 3.1 The ‘require-theme’ for built-in Emacs themes 529 ================================================= 530 531 The version of the Modus themes that is included in Emacs CANNOT use the 532 standard ‘require’. This is because the built-in themes are not 533 included in the ‘load-path’ (not my decision). The ‘require-theme’ 534 function must be used in this case as a replacement. For example: 535 536 (require-theme 'modus-themes) 537 538 ;; All customizations here 539 (setq modus-themes-bold-constructs t 540 modus-themes-italic-constructs t) 541 542 ;; Maybe define some palette overrides, such as by using our presets 543 (setq modus-themes-common-palette-overrides 544 modus-themes-preset-overrides-intense) 545 546 ;; Load the theme of choice (built-in themes are always "safe" so they 547 ;; do not need the `no-require' argument of `load-theme'). 548 (load-theme 'modus-operandi) 549 550 (define-key global-map (kbd "<f5>") #'modus-themes-toggle) 551 552 553 File: docGYh7V6.info, Node: Sample configuration with and without use-package, Next: Differences between loading and enabling, Prev: The require-theme for built-in Emacs themes, Up: Enable and load 554 555 3.2 Sample configuration with and without use-package 556 ===================================================== 557 558 What follows is a variant of what we demonstrate in the previous section 559 (*note Enable and load::). 560 561 It is common for Emacs users to rely on ‘use-package’ for declaring 562 package configurations in their setup. We use this as an example: 563 564 ;;; For the built-in themes which cannot use `require'. 565 (use-package emacs 566 :config 567 (require-theme 'modus-themes) ; `require-theme' is ONLY for the built-in Modus themes 568 569 ;; Add all your customizations prior to loading the themes 570 (setq modus-themes-italic-constructs t 571 modus-themes-bold-constructs nil) 572 573 ;; Maybe define some palette overrides, such as by using our presets 574 (setq modus-themes-common-palette-overrides 575 modus-themes-preset-overrides-intense) 576 577 ;; Load the theme of your choice. 578 (load-theme 'modus-operandi) 579 580 (define-key global-map (kbd "<f5>") #'modus-themes-toggle)) 581 582 583 584 ;;; For packaged versions which must use `require'. 585 (use-package modus-themes 586 :ensure t 587 :config 588 ;; Add all your customizations prior to loading the themes 589 (setq modus-themes-italic-constructs t 590 modus-themes-bold-constructs nil) 591 592 ;; Maybe define some palette overrides, such as by using our presets 593 (setq modus-themes-common-palette-overrides 594 modus-themes-preset-overrides-intense) 595 596 ;; Load the theme of your choice. 597 (load-theme 'modus-operandi) 598 599 (define-key global-map (kbd "<f5>") #'modus-themes-toggle)) 600 601 The same without ‘use-package’: 602 603 (require 'modus-themes) ; OR for the built-in themes: (require-theme 'modus-themes) 604 605 ;; Add all your customizations prior to loading the themes 606 (setq modus-themes-italic-constructs t 607 modus-themes-bold-constructs nil) 608 609 ;; Maybe define some palette overrides, such as by using our presets 610 (setq modus-themes-common-palette-overrides 611 modus-themes-preset-overrides-intense) 612 613 ;; Load the theme of your choice: 614 (load-theme 'modus-operandi :no-confirm) 615 616 (define-key global-map (kbd "<f5>") #'modus-themes-toggle) 617 618 *note Differences between loading and enabling::. 619 620 Note: make sure not to customize the variable 621 ‘custom-theme-load-path’ or ‘custom-theme-directory’ after the themes’ 622 package declaration. That will lead to failures in loading the files. 623 If either or both of those variables need to be changed, their values 624 should be defined before the package declaration of the themes. 625 626 *note Make the themes look like what the maintainer uses:: 627 628 629 File: docGYh7V6.info, Node: Differences between loading and enabling, Prev: Sample configuration with and without use-package, Up: Enable and load 630 631 3.3 Differences between loading and enabling 632 ============================================ 633 634 The reason we recommend ‘load-theme’ instead of the other option of 635 ‘enable-theme’ is that the former does a kind of “reset” on the face 636 specs. It quite literally loads (or reloads) the theme. Whereas the 637 ‘enable-theme’ function simply puts an already loaded theme to the top 638 of the list of enabled items, re-using whatever state was last loaded. 639 640 As such, ‘load-theme’ reads all customizations that may happen during 641 any given Emacs session: even after the initial setup of a theme. 642 Examples are calls to ‘custom-set-faces’, as well as new values assigned 643 to the options the Modus themes provide (*note Customization Options: 644 Customization options.). 645 646 Our tests show that ‘enable-theme’ does not read such variables anew, 647 so it might appear to the unsuspecting user that the themes are somehow 648 broken whenever they try to assign a new value to a customization option 649 or some face. 650 651 This “reset” that ‘load-theme’ brings about does, however, come at 652 the cost of being somewhat slower than ‘enable-theme’. Users who have a 653 stable setup and who seldom update their variables during a given Emacs 654 session, are better off using something like this: 655 656 (require 'modus-themes) 657 658 ;; Activate your desired themes here 659 (load-theme 'modus-operandi t t) 660 (load-theme 'modus-vivendi t t) 661 662 ;; Enable the preferred one 663 (enable-theme 'modus-operandi) 664 665 *note Toggle themes without reloading them::. 666 667 *note Sample configuration with and without use-package::. 668 669 With the above granted, other sections of the manual discuss how to 670 configure custom faces, where ‘load-theme’ is expected, though 671 ‘enable-theme’ could still apply in stable setups: 672 673 *note Use theme colors in code with modus-themes-with-colors::. 674 675 676 File: docGYh7V6.info, Node: Customization options, Next: Advanced customization, Prev: Enable and load, Up: Top 677 678 4 Customization options 679 *********************** 680 681 The Modus themes are highly configurable, though they should work well 682 without any further tweaks. We provide a variety of user options. The 683 following code block provides an overview. In addition to those 684 variables, the themes support a comprehensive system of overrides: it 685 can be used to make thoroughgoing changes to the looks of the themes 686 (*note Option for palette overrides: Palette overrides.). We document 687 everything at length in the pages of this manual and also provide 688 ready-to-use code samples. 689 690 Remember that all customization options must be evaluated before 691 loading a theme (*note Enable and load::). If the theme is already 692 active, it must be reloaded for changes to take effect. 693 694 ;; In all of the following, WEIGHT is a symbol such as `semibold', 695 ;; `light', `bold', or anything mentioned in `modus-themes-weights'. 696 (setq modus-themes-italic-constructs t 697 modus-themes-bold-constructs nil 698 modus-themes-mixed-fonts t 699 modus-themes-variable-pitch-ui nil 700 modus-themes-custom-auto-reload t 701 modus-themes-disable-other-themes t 702 703 ;; Options for `modus-themes-prompts' are either nil (the 704 ;; default), or a list of properties that may include any of those 705 ;; symbols: `italic', `WEIGHT' 706 modus-themes-prompts '(italic bold) 707 708 ;; The `modus-themes-completions' is an alist that reads two 709 ;; keys: `matches', `selection'. Each accepts a nil value (or 710 ;; empty list) or a list of properties that can include any of 711 ;; the following (for WEIGHT read further below): 712 ;; 713 ;; `matches' :: `underline', `italic', `WEIGHT' 714 ;; `selection' :: `underline', `italic', `WEIGHT' 715 modus-themes-completions 716 '((matches . (extrabold)) 717 (selection . (semibold italic text-also))) 718 719 modus-themes-org-blocks 'gray-background ; {nil,'gray-background,'tinted-background} 720 721 ;; The `modus-themes-headings' is an alist: read the manual's 722 ;; node about it or its doc string. Basically, it supports 723 ;; per-level configurations for the optional use of 724 ;; `variable-pitch' typography, a height value as a multiple of 725 ;; the base font size (e.g. 1.5), and a `WEIGHT'. 726 modus-themes-headings 727 '((1 . (variable-pitch 1.5)) 728 (2 . (1.3)) 729 (agenda-date . (1.3)) 730 (agenda-structure . (variable-pitch light 1.8)) 731 (t . (1.1)))) 732 733 ;; Remember that more (MUCH MORE) can be done with overrides, which we 734 ;; document extensively in this manual. 735 736 * Menu: 737 738 * Custom reload theme:: Toggle auto-reload of the theme when setting custom variables 739 * Disable other themes:: Determine whether loading a Modus themes disables all others 740 * Bold constructs:: Toggle bold constructs in code 741 * Italic constructs:: Toggle italic font constructs in code 742 * Mixed fonts:: Toggle mixing of font families 743 * Command prompts:: Control the style of command prompts 744 * Completion UIs:: Choose among several styles for completion UIs 745 * Org mode blocks:: Choose among plain, gray, or tinted backgrounds 746 * Heading styles:: Choose among several styles, also per heading level 747 * UI typeface:: Toggle the use of variable-pitch across the User Interface 748 * Palette overrides:: Refashion color values and/or semantic color mappings 749 750 751 File: docGYh7V6.info, Node: Custom reload theme, Next: Disable other themes, Up: Customization options 752 753 4.1 Option for reloading the theme on custom change 754 =================================================== 755 756 Brief: Toggle reloading of the active theme when an option is changed 757 through the Custom UI. 758 759 Symbol: ‘modus-themes-custom-auto-reload’ (‘boolean’ type) 760 761 Possible values: 762 763 1. ‘nil’ 764 2. ‘t’ (default) 765 766 All theme user options take effect when a theme is loaded. Any 767 subsequent changes require the theme to be reloaded. 768 769 When this variable has a non-‘nil’ value, any change made via the 770 Custom UI or related functions such as ‘customize-set-variable’ and 771 ‘setopt’ (Emacs 29), will trigger a reload automatically. 772 773 With a ‘nil’ value, changes to user options have no further 774 consequences: the user must manually reload the theme (*note Enable and 775 load::). 776 777 778 File: docGYh7V6.info, Node: Disable other themes, Next: Bold constructs, Prev: Custom reload theme, Up: Customization options 779 780 4.2 Option for disabling other themes while loading Modus 781 ========================================================= 782 783 Brief: Disable all other themes when loading a Modus theme. 784 785 Symbol: ‘modus-themes-disable-other-themes’ (‘boolean’ type) 786 787 Possible values: 788 789 1. ‘nil’ 790 2. ‘t’ (default) 791 792 When the value is non-‘nil’, the commands ‘modus-themes-toggle’ and 793 ‘modus-themes-select’, as well as the ‘modus-themes-load-theme’ 794 function, will disable all other themes while loading the specified 795 Modus theme. This is done to ensure that Emacs does not blend two or 796 more themes: such blends lead to awkward results that undermine the work 797 of the designer. 798 799 When the value is ‘nil’, the aforementioned commands and function 800 will only disable other themes within the Modus collection. 801 802 This option is provided because Emacs themes are not necessarily 803 limited to colors/faces: they can consist of an arbitrary set of 804 customizations. Users who use such customization bundles must set this 805 variable to a ‘nil’ value. 806 807 808 File: docGYh7V6.info, Node: Bold constructs, Next: Italic constructs, Prev: Disable other themes, Up: Customization options 809 810 4.3 Option for more bold constructs 811 =================================== 812 813 Brief: Use bold for code syntax highlighting and related. 814 815 Symbol: ‘modus-themes-bold-constructs’ (‘boolean’ type) 816 817 Possible values: 818 819 1. ‘nil’ (default) 820 2. ‘t’ 821 822 The default is to use a bold typographic weight only when it is 823 required. 824 825 With a non-‘nil’ value (‘t’) display several syntactic constructs in 826 bold weight. This concerns keywords and other important aspects of code 827 syntax. It also affects certain mode line indicators and command 828 prompts. 829 830 Advanced users may also want to configure the exact attributes of the 831 ‘bold’ face. 832 833 *note Configure bold and italic faces::. 834 835 836 File: docGYh7V6.info, Node: Italic constructs, Next: Mixed fonts, Prev: Bold constructs, Up: Customization options 837 838 4.4 Option for more italic constructs 839 ===================================== 840 841 Brief: Use italics for code syntax highlighting and related. 842 843 Symbol: ‘modus-themes-italic-constructs’ (‘boolean’ type) 844 845 Possible values: 846 847 1. ‘nil’ (default) 848 2. ‘t’ 849 850 The default is to not use slanted text forms (italics) unless it is 851 absolutely necessary. 852 853 With a non-‘nil’ value (‘t’) choose to render more faces in italics. 854 This typically affects documentation strings and code comments. 855 856 Advanced users may also want to configure the exact attributes of the 857 ‘italic’ face. 858 859 *note Configure bold and italic faces::. 860 861 862 File: docGYh7V6.info, Node: Mixed fonts, Next: Command prompts, Prev: Italic constructs, Up: Customization options 863 864 4.5 Option for font mixing 865 ========================== 866 867 Brief: Toggle the use of monospaced fonts for spacing-sensitive 868 constructs (affects font families). 869 870 Symbol: ‘modus-themes-mixed-fonts’ (‘boolean’ type) 871 872 Possible values: 873 874 1. ‘nil’ (default) 875 2. ‘t’ 876 877 When set to non-‘nil’ (‘t’), configure some spacing-sensitive faces 878 like Org tables and code blocks to always inherit from the ‘fixed-pitch’ 879 face. This is to ensure that certain constructs like code blocks and 880 tables remain monospaced even when users opt for a mode that remaps 881 typeface families, such as the built-in ‘M-x variable-pitch-mode’. 882 Otherwise the layout can appear broken, due to how spacing is done. 883 884 For a consistent experience, user may need to specify the font family 885 of the ‘fixed-pitch’ face. 886 887 *note Font configurations for Org and others::. 888 889 890 File: docGYh7V6.info, Node: Command prompts, Next: Completion UIs, Prev: Mixed fonts, Up: Customization options 891 892 4.6 Option for command prompt styles 893 ==================================== 894 895 Brief: Control the style of command prompts (e.g. minibuffer, shell, 896 IRC clients). 897 898 Symbol: ‘modus-themes-prompts’ (‘choice’ type, list of properties) 899 900 Possible values are expressed as a list of properties (default is 901 ‘nil’ or an empty list). The list can include any of the following 902 symbols: 903 904 • ‘italic’ 905 • ‘italic’ 906 • A font weight, which must be supported by the underlying typeface: 907 • ‘thin’ 908 • ‘ultralight’ 909 • ‘extralight’ 910 • ‘light’ 911 • ‘semilight’ 912 • ‘regular’ 913 • ‘medium’ 914 • ‘semibold’ 915 • ‘bold’ 916 • ‘heavy’ 917 • ‘extrabold’ 918 • ‘ultrabold’ 919 920 The default (a ‘nil’ value or an empty list) means to only use a 921 subtle colored foreground color. 922 923 The ‘italic’ property adds a slant to the font’s forms (italic or 924 oblique forms, depending on the typeface). 925 926 The symbol of a font weight attribute such as ‘light’, ‘semibold’, et 927 cetera, adds the given weight to links. Valid symbols are defined in 928 the variable ‘modus-themes-weights’. The absence of a weight means that 929 the one of the underlying text will be used. 930 931 Combinations of any of those properties are expressed as a list, like 932 in these examples: 933 934 (bold italic) 935 (italic semibold) 936 937 The order in which the properties are set is not significant. 938 939 In user configuration files the form may look like this: 940 941 (setq modus-themes-prompts '(extrabold italic)) 942 943 *note Make prompts more or less colorful::. 944 945 946 File: docGYh7V6.info, Node: Completion UIs, Next: Org mode blocks, Prev: Command prompts, Up: Customization options 947 948 4.7 Option for completion framework aesthetics 949 ============================================== 950 951 Brief: Set the overall style of completion framework interfaces. 952 953 Symbol: ‘modus-themes-completions’ (‘alist’ type properties) 954 955 This affects Company, Corfu, Flx, Icomplete/Fido, Ido, Ivy, 956 Orderless, Vertico, and the standard ‘*Completions*’ buffer. The value 957 is an alist of expressions, each of which takes the form of ‘(KEY . 958 LIST-OF-PROPERTIES)’. ‘KEY’ is a symbol, while ‘PROPERTIES’ is a list. 959 Here is a sample, followed by a description of the particularities: 960 961 (setq modus-themes-completions 962 '((matches . (extrabold underline)) 963 (selection . (semibold italic)))) 964 965 The ‘matches’ key refers to the highlighted characters that 966 correspond to the user’s input. When its properties are ‘nil’ or an 967 empty list, matching characters in the user interface will have a bold 968 weight and a colored foreground. The list of properties may include any 969 of the following symbols regardless of the order they may appear in: 970 971 • ‘underline’ to draw a line below the characters; 972 973 • ‘italic’ to use a slanted font (italic or oblique forms); 974 975 • The symbol of a font weight attribute such as ‘light’, ‘semibold’, 976 et cetera. Valid symbols are defined in the variable 977 ‘modus-themes-weights’. The absence of a weight means that bold 978 will be used. 979 980 The ‘selection’ key applies to the current line or currently matched 981 candidate, depending on the specifics of the user interface. When its 982 properties are ‘nil’ or an empty list, it has a subtle gray background, 983 a bold weight, and the base foreground value for the text. The list of 984 properties it accepts is as follows (order is not significant): 985 986 • ‘underline’ to draw a line below the characters; 987 988 • ‘italic’ to use a slanted font (italic or oblique forms); 989 990 • The symbol of a font weight attribute such as ‘light’, ‘semibold’, 991 et cetera. Valid symbols are defined in the variable 992 ‘modus-themes-weights’. The absence of a weight means that bold 993 will be used. 994 995 Apart from specifying each key separately, a catch-all list is 996 accepted. This is only useful when the desired aesthetic is the same 997 across all keys that are not explicitly referenced. For example, this: 998 999 (setq modus-themes-completions 1000 '((t . (extrabold underline)))) 1001 1002 Is the same as: 1003 1004 (setq modus-themes-completions 1005 '((matches . (extrabold underline)) 1006 (selection . (extrabold underline)))) 1007 1008 *note Make completion matches more or less colorful::. 1009 1010 1011 File: docGYh7V6.info, Node: Org mode blocks, Next: Heading styles, Prev: Completion UIs, Up: Customization options 1012 1013 4.8 Option for org-mode block styles 1014 ==================================== 1015 1016 Brief: Set the overall style of Org code blocks, quotes, and the like. 1017 1018 Symbol: ‘modus-themes-org-blocks’ (‘choice’ type) 1019 1020 Possible values: 1021 1022 1. ‘nil’ (default) 1023 2. ‘gray-background’ 1024 3. ‘tinted-background’ 1025 1026 Option ‘nil’ (the default) means that the block has no background of 1027 its own: it uses the one that applies to the rest of the buffer. In 1028 this case, the delimiter lines have a gray color for their text, making 1029 them look exactly like all other Org properties. 1030 1031 Option ‘gray-background’ applies a subtle gray background to the 1032 block’s contents. It also affects the begin and end lines of the block 1033 as they get another shade of gray as their background, which 1034 differentiates them from the contents of the block. All background 1035 colors extend to the edge of the window, giving the area a rectangular, 1036 “blocky” presentation. If the begin/end lines do not extend in this 1037 way, check the value of the Org user option 1038 ‘org-fontify-whole-block-delimiter-line’. 1039 1040 Option ‘tinted-background’ uses a colored background for the contents 1041 of the block. The exact color value will depend on the programming 1042 language and is controlled by the variable ‘org-src-block-faces’ (refer 1043 to the theme’s source code for the current association list). For this 1044 to take effect, the Org buffer needs to be restarted with 1045 ‘org-mode-restart’. 1046 1047 Code blocks use their major mode’s fontification (syntax 1048 highlighting) only when the variable ‘org-src-fontify-natively’ is 1049 non-‘nil’. While quote/verse blocks require setting 1050 ‘org-fontify-quote-and-verse-blocks’ to a non-‘nil’ value. 1051 1052 *note Update Org block delimiter fontification::. 1053 1054 1055 File: docGYh7V6.info, Node: Heading styles, Next: UI typeface, Prev: Org mode blocks, Up: Customization options 1056 1057 4.9 Option for the headings’ overall style 1058 ========================================== 1059 1060 Brief: Heading styles with optional list of values per heading level. 1061 1062 Symbol: ‘modus-themes-headings’ (‘alist’ type, multiple properties) 1063 1064 This is an alist that accepts a ‘(KEY . LIST-OF-VALUES)’ combination. 1065 The ‘KEY’ is either a number, representing the heading’s level (0 1066 through 8) or ‘t’, which pertains to the fallback style. The named keys 1067 ‘agenda-date’ and ‘agenda-structure’ apply to the Org agenda. 1068 1069 Level 0 is a special heading: it is used for what counts as a 1070 document title or equivalent, such as the ‘#+title’ construct we find in 1071 Org files. Levels 1-8 are regular headings. 1072 1073 The ‘LIST-OF-VALUES’ covers symbols that refer to properties, as 1074 described below. Here is a complete sample with various stylistic 1075 combinations, followed by a presentation of all available properties: 1076 1077 (setq modus-themes-headings 1078 '((1 . (variable-pitch 1.5)) 1079 (2 . (1.3)) 1080 (agenda-date . (1.3)) 1081 (agenda-structure . (variable-pitch light 1.8)) 1082 (t . (1.1)))) 1083 1084 Properties: 1085 1086 • A font weight, which must be supported by the underlying typeface: 1087 • ‘thin’ 1088 • ‘ultralight’ 1089 • ‘extralight’ 1090 • ‘light’ 1091 • ‘semilight’ 1092 • ‘regular’ 1093 • ‘medium’ 1094 • ‘semibold’ 1095 • ‘bold’ (default) 1096 • ‘heavy’ 1097 • ‘extrabold’ 1098 • ‘ultrabold’ 1099 • A floating point as a height multiple of the default or a cons cell 1100 in the form of ‘(height . FLOAT)’. 1101 1102 By default (a ‘nil’ value for this variable), all headings have a 1103 bold typographic weight and use a desaturated text color. 1104 1105 A ‘variable-pitch’ property changes the font family of the heading to 1106 that of the ‘variable-pitch’ face (normally a proportionately spaced 1107 typeface). 1108 1109 The symbol of a weight attribute adjusts the font of the heading 1110 accordingly, such as ‘light’, ‘semibold’, etc. Valid symbols are 1111 defined in the variable ‘modus-themes-weights’. The absence of a weight 1112 means that bold will be used by virtue of inheriting the ‘bold’ face. 1113 1114 *note Configure bold and italic faces::. 1115 1116 A number, expressed as a floating point (e.g. 1.5), adjusts the 1117 height of the heading to that many times the base font size. The 1118 default height is the same as 1.0, though it need not be explicitly 1119 stated. Instead of a floating point, an acceptable value can be in the 1120 form of a cons cell like ‘(height . FLOAT)’ or ‘(height FLOAT)’, where 1121 FLOAT is the given number. 1122 1123 Combinations of any of those properties are expressed as a list, like 1124 in these examples: 1125 1126 (semibold) 1127 (variable-pitch semibold 1.3) 1128 (variable-pitch semibold (height 1.3)) ; same as above 1129 (variable-pitch semibold (height . 1.3)) ; same as above 1130 1131 The order in which the properties are set is not significant. 1132 1133 In user configuration files the form may look like this: 1134 1135 (setq modus-themes-headings 1136 '((1 . (variable-pitch 1.5)) 1137 (2 . (1.3)) 1138 (agenda-date . (1.3)) 1139 (agenda-structure . (variable-pitch light 1.8)) 1140 (t . (1.1)))) 1141 1142 When defining the styles per heading level, it is possible to pass a 1143 non-‘nil’ value (‘t’) instead of a list of properties. This will retain 1144 the original aesthetic for that level. For example: 1145 1146 (setq modus-themes-headings 1147 '((1 . t) ; keep the default style 1148 (2 . (semibold 1.2)) 1149 (t . (rainbow)))) ; style for all other headings 1150 1151 (setq modus-themes-headings 1152 '((1 . (variable-pitch 1.5)) 1153 (2 . (semibold)) 1154 (t . t))) ; default style for all other levels 1155 1156 Note that the text color of headings, of their background, and 1157 overline can all be set via the overrides. It is possible to have any 1158 color combination for any heading level (something that could not be 1159 done in older versions of the themes). 1160 1161 *note Option for palette overrides: Palette overrides. 1162 1163 *note Make headings more or less colorful::. 1164 1165 1166 File: docGYh7V6.info, Node: UI typeface, Next: Palette overrides, Prev: Heading styles, Up: Customization options 1167 1168 4.10 Option for variable-pitch font in UI elements 1169 ================================================== 1170 1171 Brief: Toggle the use of proportionately spaced (‘variable-pitch’) fonts 1172 in the User Interface. 1173 1174 Symbol: ‘modus-themes-variable-pitch-ui’ (‘boolean’ type) 1175 1176 Possible values: 1177 1178 1. ‘nil’ (default) 1179 2. ‘t’ 1180 1181 This option concerns User Interface elements that are under the 1182 direct control of Emacs. In particular: the mode line, header line, tab 1183 bar, and tab line. 1184 1185 The default is to use the same font as the rest of Emacs, which 1186 usually is a monospaced family. 1187 1188 With a non-‘nil’ value (‘t’) apply a proportionately spaced typeface. 1189 This is done by assigning the ‘variable-pitch’ face to the relevant 1190 items. 1191 1192 *note Font configurations for Org and others::. 1193 1194 1195 File: docGYh7V6.info, Node: Palette overrides, Prev: UI typeface, Up: Customization options 1196 1197 4.11 Option for palette overrides 1198 ================================= 1199 1200 This section describes palette overrides in detail. For a simpler 1201 alternative, use the presets we provide (*note Palette override 1202 presets::). 1203 1204 Each Modus theme specifies a color palette that declares named color 1205 values and semantic color mappings: 1206 1207 • Named colors consist of a symbol and a string that specifies a 1208 hexadecimal RGB value. For example: ‘(blue-warmer "#354fcf")’. 1209 1210 • The semantic color mappings associate an abstract construct with a 1211 given named color from the palette, like ‘(heading-2 1212 yellow-faint)’. Both elements of the list are symbols, though the 1213 ‘cadr’ (value) can be a string that specifies a color, such as 1214 ‘(heading-2 "#354fcf")’. 1215 1216 Both of those subsets can be overridden, thus refashioning the theme. 1217 Overrides are either shared, by being stored in the user option 1218 ‘modus-themes-common-palette-overrides’, or they are specific to the 1219 theme they name. In the latter case, the naming scheme of each palette 1220 variable is ‘THEME-NAME-palette-overrides’, thus yielding: 1221 1222 • ‘modus-operandi-palette-overrides’ 1223 1224 • ‘modus-operandi-deuteranopia-palette-overrides’ 1225 1226 • ‘modus-operandi-tinted-palette-overrides’ 1227 1228 • ‘modus-operandi-tritanopia-palette-overrides’ 1229 1230 • ‘modus-vivendi-palette-overrides’ 1231 1232 • ‘modus-vivendi-deuteranopia-palette-overrides’ 1233 1234 • ‘modus-vivendi-tinted-palette-overrides’ 1235 1236 • ‘modus-vivendi-tritanopia-palette-overrides’ 1237 1238 Theme-specific overrides take precedence over the shared ones. It is 1239 strongly advised that shared overrides do NOT alter color values, as 1240 those will not be appropriate for both dark and light themes. Common 1241 overrides are best limited to the semantic color mappings as those use 1242 the color value that corresponds to the active theme (e.g. make the 1243 cursor ‘blue-warmer’ in all themes, whatever the value of ‘blue-warmer’ 1244 is in each theme). 1245 1246 The value of any overrides’ variable must mirror a theme’s palette. 1247 Palette variables are named after their theme as ‘THEME-NAME-palette’. 1248 For example, the ‘modus-operandi-palette’ is like this: 1249 1250 (defconst modus-operandi-palette 1251 '( 1252 ;;; Basic values 1253 1254 (bg-main "#ffffff") 1255 (bg-dim "#f0f0f0") 1256 (fg-main "#000000") 1257 1258 ;; ... 1259 1260 (red "#a60000") 1261 (red-warmer "#972500") 1262 (red-cooler "#a0132f") 1263 (red-faint "#7f0000") 1264 (red-intense "#d00000") 1265 1266 ;; ... 1267 1268 ;;;; Mappings 1269 1270 ;; ... 1271 1272 (cursor fg-main) 1273 (builtin magenta-warmer) 1274 (comment fg-dim) 1275 (constant blue-cooler) 1276 (docstring green-faint) 1277 (fnname magenta) 1278 (keyword magenta-cooler) 1279 1280 ;; ... 1281 )) 1282 1283 The ‘modus-operandi-palette-overrides’ targets the entries that need 1284 to be changed. For example, to make the main foreground color a dark 1285 gray instead of pure black, use a shade of red for comments, and apply a 1286 cyan hue to keywords: 1287 1288 (setq modus-operandi-palette-overrides 1289 '((fg-main "#333333") 1290 (comment red-faint) 1291 (keyword cyan-cooler))) 1292 1293 Changes take effect upon theme reload (*note Custom reload theme::). 1294 Overrides are removed by setting their variable to a ‘nil’ value. 1295 1296 The common accented foregrounds in each palette follow a predictable 1297 naming scheme: ‘HUE{,-warmer,-cooler,-faint,-intense}’. ‘HUE’ is one of 1298 the six basic colors: red, green, blue, yellow, magenta, cyan. 1299 1300 Named colors that are meant to be used as backgrounds contain ‘bg’ in 1301 their name, such as ‘bg-red-intense’. While special purpose foregrounds 1302 that are meant to be combined with such backgrounds, contain ‘fg’ in 1303 their name, such as ‘fg-removed’ which complements ‘bg-removed’. 1304 1305 Named colors can be previewed, such as with the command 1306 ‘modus-themes-list-colors’ (*note Preview theme colors::). 1307 1308 For a video tutorial that users of all skill levels can approach, 1309 watch: 1310 <https://protesilaos.com/codelog/2022-12-17-modus-themes-v4-demo/>. 1311 1312 1313 File: docGYh7V6.info, Node: Advanced customization, Next: Face coverage, Prev: Customization options, Up: Top 1314 1315 5 Advanced customization 1316 ************************ 1317 1318 Unlike the predefined customization options which follow a clear pattern 1319 of allowing the user to quickly specify their preference, the themes 1320 also provide a more flexible, albeit difficult, mechanism to control 1321 things with precision (*note Customization Options: Customization 1322 options.). 1323 1324 This section is of interest only to users who are prepared to 1325 maintain their own local tweaks and who are willing to deal with any 1326 possible incompatibilities between versioned releases of the themes. As 1327 such, they are labeled as “do-it-yourself” or “DIY”. 1328 1329 * Menu: 1330 1331 * Palette override presets:: 1332 * Stylistic variants using palette overrides:: 1333 * More accurate colors in terminal emulators:: 1334 * Range of color with terminal emulators:: 1335 * Preview theme colors:: 1336 * Per-theme customization settings:: 1337 * Get a single color from the palette:: 1338 * Use theme colors in code with modus-themes-with-colors:: 1339 * Do not extend the region background:: 1340 * Add padding to mode line:: 1341 * Remap face with local value:: 1342 * Font configurations for Org and others:: 1343 * Configure bold and italic faces:: 1344 * Custom Org todo keyword and priority faces:: 1345 * Custom Org emphasis faces:: 1346 * Update Org block delimiter fontification:: 1347 * Measure color contrast:: 1348 * Load theme depending on time of day:: 1349 * Backdrop for pdf-tools:: 1350 * Toggle themes without reloading them:: 1351 * A theme-agnostic hook for theme loading:: 1352 * Use more spacious margins or padding in Emacs frames:: 1353 * Custom hl-todo colors:: 1354 * Add support for solaire-mode:: 1355 1356 1357 File: docGYh7V6.info, Node: Palette override presets, Next: Stylistic variants using palette overrides, Up: Advanced customization 1358 1359 5.1 Palette override presets 1360 ============================ 1361 1362 This section shows how to refashion the themes by opting in to the 1363 stylistic presets we provide. Those presets override the default color 1364 mappings to amplify, tone down, or refashion the overall coloration of 1365 the themes. 1366 1367 To make almost all aspects of the themes less intense, use this: 1368 1369 ;; Always remember to reload the theme for changes to take effect! 1370 (setq modus-themes-common-palette-overrides modus-themes-preset-overrides-faint) 1371 1372 With ‘modus-themes-preset-overrides-faint’ the grays are toned down, 1373 gray backgrounds are removed from some contexts, and almost all accent 1374 colors are desaturated. It makes the themes less attention-grabbing. 1375 1376 On the opposite end of the stylistic spectrum, we have this 1377 1378 ;; Always remember to reload the theme for changes to take effect! 1379 (setq modus-themes-common-palette-overrides modus-themes-preset-overrides-intense) 1380 1381 The ‘modus-themes-preset-overrides-intense’ makes many background 1382 colors accented instead of gray and increases coloration in a number of 1383 places. Colors stand out more and are made easier to spot. 1384 1385 For some stylistic variation try the “cooler” and “warmer” presets: 1386 1387 ;; This: 1388 (setq modus-themes-common-palette-overrides modus-themes-preset-overrides-cooler) 1389 1390 ;; Or: 1391 (setq modus-themes-common-palette-overrides modus-themes-preset-overrides-warmer) 1392 1393 Note that the user is not limited to those presets. The system of 1394 overrides we provide makes it possible to tweak the value of each 1395 individual named color and to change how values are assigned to semantic 1396 color mappings (*note Option for palette overrides: Palette overrides.). 1397 Subsequent sections provide examples (*note Stylistic variants using 1398 palette overrides::). 1399 1400 It is also possible to use those presets as a basis and, for example, 1401 add to them code from the subsequent sections of this manual. This is 1402 the general idea (extra space for didactic purposes): 1403 1404 (setq modus-themes-common-palette-overrides 1405 `( 1406 ;; From the section "Make the mode line borderless" 1407 (border-mode-line-active unspecified) 1408 (border-mode-line-inactive unspecified) 1409 1410 ;; From the section "Make matching parenthesis more or less intense" 1411 (bg-paren-match bg-magenta-intense) 1412 (underline-paren-match fg-main) 1413 1414 ;; And expand the preset here. Note that the ,@ works because 1415 ;; we use the backtick for this list, instead of a straight 1416 ;; quote. 1417 ,@modus-themes-preset-overrides-intense)) 1418 1419 1420 File: docGYh7V6.info, Node: Stylistic variants using palette overrides, Next: More accurate colors in terminal emulators, Prev: Palette override presets, Up: Advanced customization 1421 1422 5.2 Stylistic variants using palette overrides 1423 ============================================== 1424 1425 This section contains practical examples of overriding the palette of 1426 the themes (*note Option for palette overrides: Palette overrides.). 1427 Users can copy the code to their init file, evaluate it, and then 1428 re-load the theme for changes to take effect. To apply overrides at 1429 startup simply define them before the call that loads the theme. 1430 Remember that we also provide presets that are easier to apply (*note 1431 Palette override presets::). 1432 1433 * Menu: 1434 1435 * Make the mode line borderless:: 1436 * Make the active mode line colorful:: 1437 * Make the tab bar more or less colorful:: 1438 * Make the fringe invisible or another color:: 1439 * Make links use subtle or no underlines:: 1440 * Make prompts more or less colorful:: 1441 * Make completion matches more or less colorful:: 1442 * Make comments yellow and strings green:: 1443 * Make code syntax use the old alt-syntax style:: 1444 * Make use of alternative styles for code syntax:: 1445 * Make matching parenthesis more or less intense:: 1446 * Make box buttons more or less gray:: 1447 * Make TODO and DONE more or less intense:: 1448 * Make headings more or less colorful:: 1449 * Make Org agenda more or less colorful:: 1450 * Make inline code in prose use alternative styles:: 1451 * Make mail citations and headers more or less colorful:: 1452 * Make the region preserve text colors, plus other styles: Make the region preserve text colors plus other styles. 1453 * Make mouse highlights more or less colorful:: 1454 * Make language underlines less colorful:: 1455 * Make line numbers use alternative styles:: 1456 * Make diffs use only a foreground:: 1457 * Make deuteranopia diffs red and blue instead of yellow and blue:: 1458 * Make the themes look like what the maintainer uses:: 1459 1460 1461 File: docGYh7V6.info, Node: Make the mode line borderless, Next: Make the active mode line colorful, Up: Stylistic variants using palette overrides 1462 1463 5.2.1 Make the mode line borderless 1464 ----------------------------------- 1465 1466 This is one of our practical examples to override the semantic colors of 1467 the Modus themes (*note Stylistic variants using palette overrides::). 1468 To hide the border around the active and inactive mode lines, we need to 1469 set their color to that of the underlying background. 1470 1471 *note Make the active mode line colorful::. 1472 1473 *note Add padding to mode line::. 1474 1475 ;; These overrides are common to all Modus themes. We also provide 1476 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 1477 ;; 1478 ;; In general, the theme-specific overrides are better for overriding 1479 ;; color values, such as redefining what `blue-faint' looks like. The 1480 ;; common overrides are best used for changes to semantic color 1481 ;; mappings, as we show below. 1482 1483 ;; Remove the border 1484 (setq modus-themes-common-palette-overrides 1485 '((border-mode-line-active unspecified) 1486 (border-mode-line-inactive unspecified))) 1487 1488 ;; Keep the border but make it the same color as the background of the 1489 ;; mode line (thus appearing borderless). The difference with the 1490 ;; above is that this version is a bit thicker because the border are 1491 ;; still there. 1492 (setq modus-themes-common-palette-overrides 1493 '((border-mode-line-active bg-mode-line-active) 1494 (border-mode-line-inactive bg-mode-line-inactive))) 1495 1496 1497 File: docGYh7V6.info, Node: Make the active mode line colorful, Next: Make the tab bar more or less colorful, Prev: Make the mode line borderless, Up: Stylistic variants using palette overrides 1498 1499 5.2.2 Make the active mode line colorful 1500 ---------------------------------------- 1501 1502 This is one of our practical examples to override the semantic colors of 1503 the Modus themes (*note Stylistic variants using palette overrides::). 1504 Here we show some snippets that apply different stylistic variants. Of 1505 course, it is possible to use theme-specific overrides to, say, have a 1506 blue mode line for ‘modus-operandi’ and a red one for ‘modus-vivendi’. 1507 1508 *note Make the mode line borderless::. 1509 1510 *note Add padding to mode line::. 1511 1512 ;; These overrides are common to all Modus themes. We also provide 1513 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 1514 ;; 1515 ;; In general, the theme-specific overrides are better for overriding 1516 ;; color values, such as redefining what `blue-faint' looks like. The 1517 ;; common overrides are best used for changes to semantic color 1518 ;; mappings, as we show below. 1519 1520 ;; Blue background, neutral foreground, intense blue border 1521 (setq modus-themes-common-palette-overrides 1522 '((bg-mode-line-active bg-blue-intense) 1523 (fg-mode-line-active fg-main) 1524 (border-mode-line-active blue-intense))) 1525 1526 ;; Subtle blue background, neutral foreground, intense blue border 1527 (setq modus-themes-common-palette-overrides 1528 '((bg-mode-line-active bg-blue-subtle) 1529 (fg-mode-line-active fg-main) 1530 (border-mode-line-active blue-intense))) 1531 1532 ;; Subtle red background, red foreground, invisible border 1533 (setq modus-themes-common-palette-overrides 1534 '((bg-mode-line-active bg-red-subtle) 1535 (fg-mode-line-active red-warmer) 1536 (border-mode-line-active bg-red-subtle))) 1537 1538 1539 File: docGYh7V6.info, Node: Make the tab bar more or less colorful, Next: Make the fringe invisible or another color, Prev: Make the active mode line colorful, Up: Stylistic variants using palette overrides 1540 1541 5.2.3 Make the tab bar more or less colorful 1542 -------------------------------------------- 1543 1544 This is one of our practical examples to override the semantic colors of 1545 the Modus themes (*note Stylistic variants using palette overrides::). 1546 Here we show how to affect the colors of the built-in ‘tab-bar-mode’ and 1547 ‘tab-line-mode’. 1548 1549 For consistent theme-wide results, consider changing the mode line, 1550 fringes, and line numbers. These are shown in other sections of this 1551 manual. 1552 1553 ;; These overrides are common to all Modus themes. We also provide 1554 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 1555 ;; 1556 ;; In general, the theme-specific overrides are better for overriding 1557 ;; color values, such as redefining what `blue-faint' looks like. The 1558 ;; common overrides are best used for changes to semantic color 1559 ;; mappings, as we show below. 1560 1561 1562 ;; Make the `tab-bar-mode' mode subtle while keepings its original 1563 ;; gray aesthetic. 1564 (setq modus-themes-common-palette-overrides 1565 '((bg-tab-bar bg-main) 1566 (bg-tab-current bg-active) 1567 (bg-tab-other bg-dim))) 1568 1569 ;; Like the above, but the current tab has a colorful background and 1570 ;; the inactive tabs have a slightly more noticeable gray background. 1571 (setq modus-themes-common-palette-overrides 1572 '((bg-tab-bar bg-main) 1573 (bg-tab-current bg-cyan-intense) 1574 (bg-tab-other bg-inactive))) 1575 1576 ;; Make the tabs colorful, using a monochromatic pattern (e.g. shades 1577 ;; of cyan). 1578 (setq modus-themes-common-palette-overrides 1579 '((bg-tab-bar bg-cyan-nuanced) 1580 (bg-tab-current bg-cyan-intense) 1581 (bg-tab-other bg-cyan-subtle))) 1582 1583 ;; Like the above, but with a dichromatic pattern (cyan and magenta). 1584 (setq modus-themes-common-palette-overrides 1585 '((bg-tab-bar bg-cyan-nuanced) 1586 (bg-tab-current bg-magenta-intense) 1587 (bg-tab-other bg-cyan-subtle))) 1588 1589 1590 File: docGYh7V6.info, Node: Make the fringe invisible or another color, Next: Make links use subtle or no underlines, Prev: Make the tab bar more or less colorful, Up: Stylistic variants using palette overrides 1591 1592 5.2.4 Make the fringe invisible or another color 1593 ------------------------------------------------ 1594 1595 This is one of our practical examples to override the semantic colors of 1596 the Modus themes (*note Stylistic variants using palette overrides::). 1597 Here we show how to make the fringe invisible or how to assign to it a 1598 different color. The “fringe” is a small area to the right and left 1599 side of the Emacs window which shows indicators such as for truncation 1600 or continuation lines. 1601 1602 ;; These overrides are common to all Modus themes. We also provide 1603 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 1604 ;; 1605 ;; In general, the theme-specific overrides are better for overriding 1606 ;; color values, such as redefining what `blue-faint' looks like. The 1607 ;; common overrides are best used for changes to semantic color 1608 ;; mappings, as we show below. 1609 1610 ;; Make the fringe invisible 1611 (setq modus-themes-common-palette-overrides 1612 '((fringe unspecified))) 1613 1614 ;; Make the fringe more intense 1615 (setq modus-themes-common-palette-overrides 1616 '((fringe bg-active))) 1617 1618 ;; Make the fringe colorful, but nuanced 1619 (setq modus-themes-common-palette-overrides 1620 '((fringe bg-blue-nuanced))) 1621 1622 1623 File: docGYh7V6.info, Node: Make links use subtle or no underlines, Next: Make prompts more or less colorful, Prev: Make the fringe invisible or another color, Up: Stylistic variants using palette overrides 1624 1625 5.2.5 Make links use subtle or no underlines 1626 -------------------------------------------- 1627 1628 This is one of our practical examples to override the semantic colors of 1629 the Modus themes (*note Stylistic variants using palette overrides::). 1630 In this example, we showcase the special use of the ‘unspecified’ symbol 1631 that underline mappings can read correctly. 1632 1633 ;; Subtle underlines 1634 (setq modus-themes-common-palette-overrides 1635 '((underline-link border) 1636 (underline-link-visited border) 1637 (underline-link-symbolic border))) 1638 1639 ;; No underlines 1640 (setq modus-themes-common-palette-overrides 1641 '((underline-link unspecified) 1642 (underline-link-visited unspecified) 1643 (underline-link-symbolic unspecified))) 1644 1645 1646 File: docGYh7V6.info, Node: Make prompts more or less colorful, Next: Make completion matches more or less colorful, Prev: Make links use subtle or no underlines, Up: Stylistic variants using palette overrides 1647 1648 5.2.6 Make prompts more or less colorful 1649 ---------------------------------------- 1650 1651 This section contains practical examples of overriding the palette of 1652 the themes (*note Option for palette overrides: Palette overrides.). In 1653 the following code block we show how to add or remove color from 1654 prompts. 1655 1656 *note Option for command prompt styles: Command prompts. 1657 1658 ;; These overrides are common to all Modus themes. We also provide 1659 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 1660 ;; 1661 ;; In general, the theme-specific overrides are better for overriding 1662 ;; color values, such as redefining what `blue-faint' looks like. The 1663 ;; common overrides are best used for changes to semantic color 1664 ;; mappings, as we show below. 1665 1666 ;; Keep the background unspecified (like the default), but use a faint 1667 ;; foreground color. 1668 (setq modus-themes-common-palette-overrides 1669 '((fg-prompt cyan-faint) 1670 (bg-prompt unspecified))) 1671 1672 ;; Add a nuanced background to prompts that complements their foreground. 1673 (setq modus-themes-common-palette-overrides 1674 '((fg-prompt cyan) 1675 (bg-prompt bg-cyan-nuanced))) 1676 1677 ;; Add a yellow background and adjust the foreground accordingly. 1678 (setq modus-themes-common-palette-overrides 1679 '((fg-prompt fg-main) 1680 (bg-prompt bg-yellow-subtle))) ; try to replace "subtle" with "intense" 1681 1682 1683 File: docGYh7V6.info, Node: Make completion matches more or less colorful, Next: Make comments yellow and strings green, Prev: Make prompts more or less colorful, Up: Stylistic variants using palette overrides 1684 1685 5.2.7 Make completion matches more or less colorful 1686 --------------------------------------------------- 1687 1688 This section contains practical examples of overriding the palette of 1689 the themes (*note Option for palette overrides: Palette overrides.). 1690 Here we demonstrate how to activate background coloration for completion 1691 matches. We show three different degrees of intensity. 1692 1693 *note Option for completion framework aesthetics: Completion UIs. 1694 1695 ;; These overrides are common to all Modus themes. We also provide 1696 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 1697 ;; 1698 ;; In general, the theme-specific overrides are better for overriding 1699 ;; color values, such as redefining what `blue-faint' looks like. The 1700 ;; common overrides are best used for changes to semantic color 1701 ;; mappings, as we show below. 1702 1703 ;; Add a nuanced background color to completion matches, while keeping 1704 ;; their foreground intact (foregrounds do not need to be specified in 1705 ;; this case, but we do it for didactic purposes). 1706 (setq modus-themes-common-palette-overrides 1707 '((fg-completion-match-0 blue) 1708 (fg-completion-match-1 magenta-warmer) 1709 (fg-completion-match-2 cyan) 1710 (fg-completion-match-3 red) 1711 (bg-completion-match-0 bg-blue-nuanced) 1712 (bg-completion-match-1 bg-magenta-nuanced) 1713 (bg-completion-match-2 bg-cyan-nuanced) 1714 (bg-completion-match-3 bg-red-nuanced))) 1715 1716 ;; Add intense background colors to completion matches and adjust the 1717 ;; foregrounds accordingly. 1718 (setq modus-themes-common-palette-overrides 1719 '((fg-completion-match-0 fg-main) 1720 (fg-completion-match-1 fg-main) 1721 (fg-completion-match-2 fg-main) 1722 (fg-completion-match-3 fg-main) 1723 (bg-completion-match-0 bg-blue-intense) 1724 (bg-completion-match-1 bg-yellow-intense) 1725 (bg-completion-match-2 bg-cyan-intense) 1726 (bg-completion-match-3 bg-red-intense))) 1727 1728 ;; Like the above, but with subtle backgrounds. 1729 (setq modus-themes-common-palette-overrides 1730 '((fg-completion-match-0 fg-main) 1731 (fg-completion-match-1 fg-main) 1732 (fg-completion-match-2 fg-main) 1733 (fg-completion-match-3 fg-main) 1734 (bg-completion-match-0 bg-blue-subtle) 1735 (bg-completion-match-1 bg-yellow-subtle) 1736 (bg-completion-match-2 bg-cyan-subtle) 1737 (bg-completion-match-3 bg-red-subtle))) 1738 1739 Adding to the above, it is possible to, say, reduce the number of 1740 colors to two: 1741 1742 ;; No backgrounds (like the default) and just use two colors. 1743 (setq modus-themes-common-palette-overrides 1744 '((fg-completion-match-0 blue) 1745 (fg-completion-match-1 yellow) 1746 (fg-completion-match-2 blue) 1747 (fg-completion-match-3 yellow) 1748 (bg-completion-match-0 unspecified) 1749 (bg-completion-match-1 unspecified) 1750 (bg-completion-match-2 unspecified) 1751 (bg-completion-match-3 unspecified))) 1752 1753 ;; Again, a two-color style but this time with backgrounds 1754 (setq modus-themes-common-palette-overrides 1755 '((fg-completion-match-0 blue) 1756 (fg-completion-match-1 yellow) 1757 (fg-completion-match-2 blue) 1758 (fg-completion-match-3 yellow) 1759 (bg-completion-match-0 bg-blue-nuanced) 1760 (bg-completion-match-1 bg-yellow-nuanced) 1761 (bg-completion-match-2 bg-blue-nuanced) 1762 (bg-completion-match-3 bg-yellow-nuanced))) 1763 1764 The user can mix and match to their liking. 1765 1766 1767 File: docGYh7V6.info, Node: Make comments yellow and strings green, Next: Make code syntax use the old alt-syntax style, Prev: Make completion matches more or less colorful, Up: Stylistic variants using palette overrides 1768 1769 5.2.8 Make comments yellow and strings green 1770 -------------------------------------------- 1771 1772 This is one of our practical examples to override the semantic colors of 1773 the Modus themes (*note Stylistic variants using palette overrides::). 1774 In previous versions of the themes, we provided an option for yellow-ish 1775 comments and green-ish strings. For some users, those were still not 1776 good enough, as the exact values were hardcoded. Here we show how to 1777 reproduce the effect, but also how to tweak it to one’s liking. 1778 1779 *note Make code syntax use the old alt-syntax style::. 1780 1781 *note Make use of alternative styles for code syntax::. 1782 1783 ;; These overrides are common to all Modus themes. We also provide 1784 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 1785 ;; 1786 ;; In general, the theme-specific overrides are better for overriding 1787 ;; color values, such as redefining what `blue-faint' looks like. The 1788 ;; common overrides are best used for changes to semantic color 1789 ;; mappings, as we show below. 1790 1791 ;; Yellow comments and green strings like older versions of the Modus 1792 ;; themes 1793 (setq modus-themes-common-palette-overrides 1794 '((comment yellow-cooler) 1795 (string green-cooler))) 1796 1797 ;; Faint yellow comments and a different shade of green for strings 1798 (setq modus-themes-common-palette-overrides 1799 '((comment yellow-faint) 1800 (string green-warmer))) 1801 1802 ;; Green comments and yellow strings, because now the user has the 1803 ;; freedom to do it 1804 (setq modus-themes-common-palette-overrides 1805 '((comment green) 1806 (string yellow-cooler))) 1807 1808 1809 File: docGYh7V6.info, Node: Make code syntax use the old alt-syntax style, Next: Make use of alternative styles for code syntax, Prev: Make comments yellow and strings green, Up: Stylistic variants using palette overrides 1810 1811 5.2.9 Make code syntax use the old alt-syntax style 1812 --------------------------------------------------- 1813 1814 This is one of our practical examples to override the semantic colors of 1815 the Modus themes (*note Stylistic variants using palette overrides::). 1816 In this section we show how to reproduce what previous versions of the 1817 Modus themes provided as a stylistic alternative for code syntax. The 1818 upside of using overrides for this purpose is that we can tweak the 1819 style to our liking, but first let’s start with its recreation: 1820 1821 ;; These overrides are common to all Modus themes. We also provide 1822 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 1823 ;; 1824 ;; In general, the theme-specific overrides are better for overriding 1825 ;; color values, such as redefining what `blue-faint' looks like. The 1826 ;; common overrides are best used for changes to semantic color 1827 ;; mappings, as we show below. 1828 1829 1830 ;; The old "alt-syntax" 1831 (setq modus-themes-common-palette-overrides 1832 '((builtin magenta) 1833 (comment fg-dim) 1834 (constant magenta-cooler) 1835 (docstring magenta-faint) 1836 (docmarkup green-faint) 1837 (fnname magenta-warmer) 1838 (keyword cyan) 1839 (preprocessor cyan-cooler) 1840 (string red-cooler) 1841 (type magenta-cooler) 1842 (variable blue-warmer) 1843 (rx-construct magenta-warmer) 1844 (rx-backslash blue-cooler))) 1845 1846 The “alt-syntax” could optionally use green strings and yellow 1847 comments (*note Make comments yellow and strings green::): 1848 1849 ;; Same as above, but with yellow comments and green strings 1850 (setq modus-themes-common-palette-overrides 1851 '((builtin magenta) 1852 (comment yellow-faint) 1853 (constant magenta-cooler) 1854 (docstring green-faint) 1855 (docmarkup magenta-faint) 1856 (fnname magenta-warmer) 1857 (keyword cyan) 1858 (preprocessor cyan-cooler) 1859 (string green-cooler) 1860 (type magenta-cooler) 1861 (variable blue-warmer) 1862 (rx-construct magenta-warmer) 1863 (rx-backslash blue-cooler))) 1864 1865 The standard “alt-syntax” has red strings. As such, it is 1866 interesting to experiment with faintly red colored comments: 1867 1868 ;; Like the old "alt-syntax" but with faint red comments 1869 (setq modus-themes-common-palette-overrides 1870 '((builtin magenta) 1871 (comment red-faint) 1872 (constant magenta-cooler) 1873 (docstring magenta-faint) 1874 (docmarkup green-faint) 1875 (fnname magenta-warmer) 1876 (keyword cyan) 1877 (preprocessor cyan-cooler) 1878 (string red-cooler) 1879 (type magenta-cooler) 1880 (variable blue-warmer) 1881 (rx-construct magenta-warmer) 1882 (rx-backslash blue-cooler))) 1883 1884 The user can always mix and match styles to their liking. 1885 1886 *note Make use of alternative styles for code syntax::. 1887 1888 1889 File: docGYh7V6.info, Node: Make use of alternative styles for code syntax, Next: Make matching parenthesis more or less intense, Prev: Make code syntax use the old alt-syntax style, Up: Stylistic variants using palette overrides 1890 1891 5.2.10 Make use of alternative styles for code syntax 1892 ----------------------------------------------------- 1893 1894 This is one of our practical examples to override the semantic colors of 1895 the Modus themes (*note Stylistic variants using palette overrides::). 1896 The idea here is to change how named colors are mapped to code syntax. 1897 Each of the following snippets give the ‘modus-themes’ a different feel 1898 while editing code. 1899 1900 Note that my ‘modus-themes’ and ‘ef-themes’ do not use the same 1901 palettes, so some things are different. If you copy from the latter to 1902 the former, double-check that the entries exist in the given Modus theme 1903 palette. 1904 1905 *note Make comments yellow and strings green::. 1906 1907 *note Make code syntax use the old alt-syntax style::. 1908 1909 ;; These overrides are common to all Modus themes. We also provide 1910 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 1911 ;; 1912 ;; In general, the theme-specific overrides are better for overriding 1913 ;; color values, such as redefining what `blue-faint' looks like. The 1914 ;; common overrides are best used for changes to semantic color 1915 ;; mappings, as we show below. 1916 1917 1918 ;; Mimic `ef-night' theme (from my `ef-themes') for code syntax 1919 ;; highlighting, while still using the Modus colors (and other 1920 ;; mappings). 1921 (setq modus-themes-common-palette-overrides 1922 '((builtin green-cooler) 1923 (comment yellow-faint) 1924 (constant magenta-cooler) 1925 (fnname cyan-cooler) 1926 (keyword blue-warmer) 1927 (preprocessor red-warmer) 1928 (docstring cyan-faint) 1929 (string blue-cooler) 1930 (type magenta-cooler) 1931 (variable cyan))) 1932 1933 ;; Mimic `ef-summer' theme (from my `ef-themes') for code syntax 1934 ;; highlighting, while still using the Modus colors (and other 1935 ;; mappings). 1936 (setq modus-themes-common-palette-overrides 1937 '((builtin magenta) 1938 (comment yellow-faint) 1939 (constant red-cooler) 1940 (fnname magenta-warmer) 1941 (keyword magenta-cooler) 1942 (preprocessor green-warmer) 1943 (docstring cyan-faint) 1944 (string yellow-warmer) 1945 (type cyan-warmer) 1946 (variable blue-warmer))) 1947 1948 ;; Mimic `ef-bio' theme (from my `ef-themes') for code syntax 1949 ;; highlighting, while still using the Modus colors (and other 1950 ;; mappings). 1951 (setq modus-themes-common-palette-overrides 1952 '((builtin green) 1953 (comment yellow-faint) 1954 (constant blue) 1955 (fnname green-warmer) 1956 (keyword green-cooler) 1957 (preprocessor green) 1958 (docstring green-faint) 1959 (string magenta-cooler) 1960 (type cyan-warmer) 1961 (variable blue-warmer))) 1962 1963 ;; Mimic `ef-trio-light' theme (from my `ef-themes') for code syntax 1964 ;; highlighting, while still using the Modus colors (and other 1965 ;; mappings). 1966 (setq modus-themes-common-palette-overrides 1967 '((builtin magenta-cooler) 1968 (comment yellow-faint) 1969 (constant magenta-warmer) 1970 (fnname blue-warmer) 1971 (keyword magenta) 1972 (preprocessor red-cooler) 1973 (docstring magenta-faint) 1974 (string green-cooler) 1975 (type cyan-cooler) 1976 (variable cyan-warmer))) 1977 1978 1979 File: docGYh7V6.info, Node: Make matching parenthesis more or less intense, Next: Make box buttons more or less gray, Prev: Make use of alternative styles for code syntax, Up: Stylistic variants using palette overrides 1980 1981 5.2.11 Make matching parenthesis more or less intense 1982 ----------------------------------------------------- 1983 1984 This is one of our practical examples to override the semantic colors of 1985 the Modus themes (*note Stylistic variants using palette overrides::). 1986 In this code block we show how to change the background of matching 1987 delimiters when ‘show-paren-mode’ is enabled. We also demonstrate how 1988 to enable underlines for those highlights. 1989 1990 ;; These overrides are common to all Modus themes. We also provide 1991 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 1992 ;; 1993 ;; In general, the theme-specific overrides are better for overriding 1994 ;; color values, such as redefining what `blue-faint' looks like. The 1995 ;; common overrides are best used for changes to semantic color 1996 ;; mappings, as we show below. 1997 1998 ;; Change the background to a shade of magenta 1999 (setq modus-themes-common-palette-overrides 2000 '((bg-paren-match bg-magenta-intense))) 2001 2002 ;; Enable underlines by applying a color to them 2003 (setq modus-themes-common-palette-overrides 2004 '((bg-paren-match bg-magenta-intense) 2005 (underline-paren-match fg-main))) 2006 2007 2008 File: docGYh7V6.info, Node: Make box buttons more or less gray, Next: Make TODO and DONE more or less intense, Prev: Make matching parenthesis more or less intense, Up: Stylistic variants using palette overrides 2009 2010 5.2.12 Make box buttons more or less gray 2011 ----------------------------------------- 2012 2013 This is one of our practical examples to override the semantic colors of 2014 the Modus themes (*note Stylistic variants using palette overrides::). 2015 By default, the boxed buttons that appear in ‘M-x customize’ and related 2016 are distinct shades of gray. The following set of overrides removes the 2017 gray from the active buttons and amplifies it for the inactive ones. 2018 2019 ;; These overrides are common to all Modus themes. We also provide 2020 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 2021 ;; 2022 ;; In general, the theme-specific overrides are better for overriding 2023 ;; color values, such as redefining what `blue-faint' looks like. The 2024 ;; common overrides are best used for changes to semantic color 2025 ;; mappings, as we show below. 2026 2027 (setq modus-themes-common-palette-overrides 2028 '((bg-button-active bg-main) 2029 (fg-button-active fg-main) 2030 (bg-button-inactive bg-inactive) 2031 (fg-button-inactive "gray50"))) 2032 2033 2034 File: docGYh7V6.info, Node: Make TODO and DONE more or less intense, Next: Make headings more or less colorful, Prev: Make box buttons more or less gray, Up: Stylistic variants using palette overrides 2035 2036 5.2.13 Make TODO and DONE more or less intense 2037 ---------------------------------------------- 2038 2039 This is one of our practical examples to override the semantic colors of 2040 the Modus themes (*note Stylistic variants using palette overrides::). 2041 Here we show how to affect just the ‘TODO’ and ‘DONE’ keywords that we 2042 encounter in Org buffers. The idea is to make those pop out more or to 2043 subdue them. 2044 2045 *note Make headings more or less colorful::. 2046 2047 *note Make inline code in prose use alternative styles::. 2048 2049 ;; These overrides are common to all Modus themes. We also provide 2050 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 2051 ;; 2052 ;; In general, the theme-specific overrides are better for overriding 2053 ;; color values, such as redefining what `blue-faint' looks like. The 2054 ;; common overrides are best used for changes to semantic color 2055 ;; mappings, as we show below. 2056 2057 ;; Increase intensity 2058 (setq modus-themes-common-palette-overrides 2059 '((prose-done green-intense) 2060 (prose-todo red-intense))) 2061 2062 ;; Tone down intensity 2063 (setq modus-themes-common-palette-overrides 2064 '((prose-done green-faint) ; OR replace `green-faint' with `olive' 2065 (prose-todo red-faint))) ; OR replace `red-faint' with `rust' 2066 2067 ;; Keep TODO at its default (so no override for it), but make DONE 2068 ;; gray. 2069 (setq modus-themes-common-palette-overrides 2070 '((prose-done fg-dim))) 2071 2072 2073 File: docGYh7V6.info, Node: Make headings more or less colorful, Next: Make Org agenda more or less colorful, Prev: Make TODO and DONE more or less intense, Up: Stylistic variants using palette overrides 2074 2075 5.2.14 Make headings more or less colorful 2076 ------------------------------------------ 2077 2078 This is one of our practical examples to override the semantic colors of 2079 the Modus themes (*note Stylistic variants using palette overrides::). 2080 Here we show how to alter the looks of headings, such as in Org mode. 2081 Using overrides here offers far more flexibility than what we could 2082 achieve with previous versions of the themes: the user can mix and match 2083 styles at will. 2084 2085 *note Make TODO and DONE more intense: Make TODO and DONE more or 2086 less intense. 2087 2088 ;; These overrides are common to all Modus themes. We also provide 2089 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 2090 ;; 2091 ;; In general, the theme-specific overrides are better for overriding 2092 ;; color values, such as redefining what `blue-faint' looks like. The 2093 ;; common overrides are best used for changes to semantic color 2094 ;; mappings, as we show below. 2095 2096 2097 ;; Apply more colorful foreground to some headings (headings 0-8). 2098 ;; Level 0 is for Org #+title and related. 2099 (setq modus-themes-common-palette-overrides 2100 '((fg-heading-1 blue-warmer) 2101 (fg-heading-2 yellow-cooler) 2102 (fg-heading-3 cyan-cooler))) 2103 2104 ;; Like the above, but with gradient colors 2105 (setq modus-themes-common-palette-overrides 2106 '((fg-heading-1 blue) 2107 (fg-heading-2 cyan) 2108 (fg-heading-3 green))) 2109 2110 ;; Add color to level 1 heading, but use the main foreground for 2111 ;; others 2112 (setq modus-themes-common-palette-overrides 2113 '((fg-heading-1 blue) 2114 (fg-heading-2 fg-main) 2115 (fg-heading-3 fg-main))) 2116 2117 ;; Apply colorful foreground, background, and overline (headings 0-8) 2118 (setq modus-themes-common-palette-overrides 2119 '((fg-heading-1 blue-warmer) 2120 (bg-heading-1 bg-blue-nuanced) 2121 (overline-heading-1 blue))) 2122 2123 ;; Apply gray scale foreground, background, and overline (headings 0-8) 2124 (setq modus-themes-common-palette-overrides 2125 '((fg-heading-1 fg-main) 2126 (bg-heading-1 bg-dim) 2127 (overline-heading-1 border))) 2128 2129 2130 File: docGYh7V6.info, Node: Make Org agenda more or less colorful, Next: Make inline code in prose use alternative styles, Prev: Make headings more or less colorful, Up: Stylistic variants using palette overrides 2131 2132 5.2.15 Make Org agenda more or less colorful 2133 -------------------------------------------- 2134 2135 This is one of our practical examples to override the semantic colors of 2136 the Modus themes (*note Stylistic variants using palette overrides::). 2137 Here we provide three distinct code blocks. The first adds alternative 2138 and more varied colors to the Org agenda (and related). The second uses 2139 faint coloration. The third makes the agenda use various shades of 2140 blue. Mix and match at will, while also combining these styles with 2141 what we show in the other chapters with practical stylistic variants. 2142 2143 ;; These overrides are common to all Modus themes. We also provide 2144 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 2145 ;; 2146 ;; In general, the theme-specific overrides are better for overriding 2147 ;; color values, such as redefining what `blue-faint' looks like. The 2148 ;; common overrides are best used for changes to semantic color 2149 ;; mappings, as we show below. 2150 2151 ;; Make the Org agenda use alternative and varied colors. 2152 (setq modus-themes-common-palette-overrides 2153 '((date-common cyan) ; default value (for timestamps and more) 2154 (date-deadline red-warmer) 2155 (date-event magenta-warmer) 2156 (date-holiday blue) ; for M-x calendar 2157 (date-now yellow-warmer) 2158 (date-scheduled magenta-cooler) 2159 (date-weekday cyan-cooler) 2160 (date-weekend blue-faint))) 2161 2162 An example with faint coloration: 2163 2164 ;; Make the Org agenda use faint colors. 2165 (setq modus-themes-common-palette-overrides 2166 '((date-common cyan-faint) ; for timestamps and more 2167 (date-deadline red-faint) 2168 (date-event fg-alt) ; default 2169 (date-holiday magenta) ; default (for M-x calendar) 2170 (date-now fg-main) ; default 2171 (date-scheduled yellow-faint) 2172 (date-weekday fg-dim) 2173 (date-weekend fg-dim))) 2174 2175 A third example that makes the agenda more blue: 2176 2177 ;; Make the Org agenda use more blue instead of yellow and red. 2178 (setq modus-themes-common-palette-overrides 2179 '((date-common cyan) ; default value (for timestamps and more) 2180 (date-deadline blue-cooler) 2181 (date-event blue-faint) 2182 (date-holiday blue) ; for M-x calendar 2183 (date-now blue-faint) 2184 (date-scheduled blue) 2185 (date-weekday fg-main) 2186 (date-weekend fg-dim))) 2187 2188 Yet another example that also affects ‘DONE’ and ‘TODO’ keywords: 2189 2190 ;; Change dates to a set of more subtle combinations. Deadlines are a 2191 ;; shade of magenta, scheduled dates are a shade of green that 2192 ;; complements that of the deadlines, weekday headings use the main 2193 ;; foreground color while weekends are a shade of gray. The DONE 2194 ;; keyword is a faint blue-gray while TODO is yellow. 2195 (setq modus-themes-common-palette-overrides 2196 '((date-deadline magenta-warmer) 2197 (date-scheduled green-cooler) 2198 (date-weekday fg-main) 2199 (date-event fg-dim) 2200 (date-now blue) 2201 (prose-done fg-alt) 2202 (prose-todo yellow))) 2203 2204 2205 File: docGYh7V6.info, Node: Make inline code in prose use alternative styles, Next: Make mail citations and headers more or less colorful, Prev: Make Org agenda more or less colorful, Up: Stylistic variants using palette overrides 2206 2207 5.2.16 Make inline code in prose use alternative styles 2208 ------------------------------------------------------- 2209 2210 This is one of our practical examples to override the semantic colors of 2211 the Modus themes (*note Stylistic variants using palette overrides::). 2212 In the following code block we show how to affect constructs such as 2213 Org’s verbatim, code, and macro entries. We also provide mappings for 2214 tables, property drawers, tags, and code block delimiters, though we do 2215 not show every possible permutation. 2216 2217 *note Make TODO and DONE more or less intense::. 2218 2219 ;; These overrides are common to all Modus themes. We also provide 2220 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 2221 ;; 2222 ;; In general, the theme-specific overrides are better for overriding 2223 ;; color values, such as redefining what `blue-faint' looks like. The 2224 ;; common overrides are best used for changes to semantic color 2225 ;; mappings, as we show below. 2226 2227 2228 ;; These are all the mappings at their default values for didactic 2229 ;; purposes 2230 (setq modus-themes-common-palette-overrides 2231 '((prose-block fg-dim) 2232 (prose-code green-cooler) 2233 (prose-done green) 2234 (prose-macro magenta-cooler) 2235 (prose-metadata fg-dim) 2236 (prose-metadata-value fg-alt) 2237 (prose-table fg-alt) 2238 (prose-tag magenta-faint) 2239 (prose-todo red) 2240 (prose-verbatim magenta-warmer))) 2241 2242 ;; Make code block delimiters use a shade of red, tone down verbatim, 2243 ;; code, and macro, and amplify the style of property drawers 2244 (setq modus-themes-common-palette-overrides 2245 '((prose-block red-faint) 2246 (prose-code fg-dim) 2247 (prose-macro magenta-faint) 2248 (prose-metadata cyan) 2249 (prose-metadata-value green-warmer) 2250 (prose-verbatim fg-dim))) 2251 2252 ;; Like the above but with more color variety for the inline code 2253 ;; elements 2254 (setq modus-themes-common-palette-overrides 2255 '((prose-block red-faint) 2256 (prose-code blue-cooler) 2257 (prose-macro yellow-warmer) 2258 (prose-metadata cyan) 2259 (prose-metadata-value green-warmer) 2260 (prose-verbatim red-warmer))) 2261 2262 2263 File: docGYh7V6.info, Node: Make mail citations and headers more or less colorful, Next: Make the region preserve text colors plus other styles, Prev: Make inline code in prose use alternative styles, Up: Stylistic variants using palette overrides 2264 2265 5.2.17 Make mail citations and headers more or less colorful 2266 ------------------------------------------------------------ 2267 2268 This is one of our practical examples to override the semantic colors of 2269 the Modus themes (*note Stylistic variants using palette overrides::). 2270 In this section we show how to change the coloration of email message 2271 headers and citations. Before we show the code, this is the anatomy of 2272 a message: 2273 2274 From: Protesilaos <info@protesilaos.com> 2275 To: Modus-Themes Development <~protesilaos/modus-themes@lists.sr.ht> 2276 Subject: Test subject 2277 --- Headers above this line; message and citations below --- 2278 This is some sample text 2279 2280 > > Older quote 2281 > Newer quote 2282 2283 We thus have the following: 2284 2285 ;; These overrides are common to all Modus themes. We also provide 2286 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 2287 ;; 2288 ;; In general, the theme-specific overrides are better for overriding 2289 ;; color values, such as redefining what `blue-faint' looks like. The 2290 ;; common overrides are best used for changes to semantic color 2291 ;; mappings, as we show below. 2292 2293 2294 ;; Reduce the intensity of mail citations and headers 2295 (setq modus-themes-common-palette-overrides 2296 '((mail-cite-0 cyan-faint) 2297 (mail-cite-1 yellow-faint) 2298 (mail-cite-2 green-faint) 2299 (mail-cite-3 red-faint) 2300 (mail-part olive) 2301 (mail-recipient indigo) 2302 (mail-subject maroon) 2303 (mail-other slate))) 2304 2305 ;; Make mail citations more intense; adjust the headers accordingly 2306 (setq modus-themes-common-palette-overrides 2307 '((mail-cite-0 blue) 2308 (mail-cite-1 yellow) 2309 (mail-cite-2 green) 2310 (mail-cite-3 magenta) 2311 (mail-part magenta-cooler) 2312 (mail-recipient cyan) 2313 (mail-subject red-warmer) 2314 (mail-other cyan-cooler))) 2315 2316 ;; Make all citations faint and neutral; make most headers green but 2317 ;; use red for the subject lie so that it stands out 2318 (setq modus-themes-common-palette-overrides 2319 '((mail-cite-0 fg-dim) 2320 (mail-cite-1 fg-alt) 2321 (mail-cite-2 fg-dim) 2322 (mail-cite-3 fg-alt) 2323 (mail-part yellow-cooler) 2324 (mail-recipient green-cooler) 2325 (mail-subject red-cooler) 2326 (mail-other green))) 2327 2328 2329 File: docGYh7V6.info, Node: Make the region preserve text colors plus other styles, Next: Make mouse highlights more or less colorful, Prev: Make mail citations and headers more or less colorful, Up: Stylistic variants using palette overrides 2330 2331 5.2.18 Make the region preserve text colors, plus other styles 2332 -------------------------------------------------------------- 2333 2334 This is one of our practical examples to override the semantic colors of 2335 the Modus themes (*note Stylistic variants using palette overrides::). 2336 Here we show how to make the region respect the underlying text colors 2337 or how to make the background more/less intense while combining it with 2338 an appropriate foreground value. 2339 2340 *note Do not extend the region background::. 2341 2342 ;; These overrides are common to all Modus themes. We also provide 2343 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 2344 ;; 2345 ;; In general, the theme-specific overrides are better for overriding 2346 ;; color values, such as redefining what `blue-faint' looks like. The 2347 ;; common overrides are best used for changes to semantic color 2348 ;; mappings, as we show below. 2349 2350 2351 ;; A background with no specific foreground (use foreground of 2352 ;; underlying text) 2353 (setq modus-themes-common-palette-overrides 2354 '((bg-region bg-ochre) ; try to replace `bg-ochre' with `bg-lavender', `bg-sage' 2355 (fg-region unspecified))) 2356 2357 ;; Subtle gray with a prominent blue foreground 2358 (setq modus-themes-common-palette-overrides 2359 '((bg-region bg-dim) 2360 (fg-region blue-cooler))) 2361 2362 ;; Intense magenta background combined with the main foreground 2363 (setq modus-themes-common-palette-overrides 2364 '((bg-region bg-magenta-intense) 2365 (fg-region fg-main))) 2366 2367 2368 File: docGYh7V6.info, Node: Make mouse highlights more or less colorful, Next: Make language underlines less colorful, Prev: Make the region preserve text colors plus other styles, Up: Stylistic variants using palette overrides 2369 2370 5.2.19 Make mouse highlights more or less colorful 2371 -------------------------------------------------- 2372 2373 This is one of our practical examples to override the semantic colors of 2374 the Modus themes (*note Stylistic variants using palette overrides::). 2375 In the following code block we show how to affect the semantic color 2376 mapping that covers mouse hover effects and related highlights: 2377 2378 ;; These overrides are common to all Modus themes. We also provide 2379 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 2380 ;; 2381 ;; In general, the theme-specific overrides are better for overriding 2382 ;; color values, such as redefining what `blue-faint' looks like. The 2383 ;; common overrides are best used for changes to semantic color 2384 ;; mappings, as we show below. 2385 2386 2387 ;; Make the background an intense yellow 2388 (setq modus-themes-common-palette-overrides 2389 '((bg-hover bg-yellow-intense))) 2390 2391 ;; Make the background subtle green 2392 (setq modus-themes-common-palette-overrides 2393 '((bg-hover bg-green-subtle))) 2394 2395 2396 File: docGYh7V6.info, Node: Make language underlines less colorful, Next: Make line numbers use alternative styles, Prev: Make mouse highlights more or less colorful, Up: Stylistic variants using palette overrides 2397 2398 5.2.20 Make language underlines less colorful 2399 --------------------------------------------- 2400 2401 This is one of our practical examples to override the semantic colors of 2402 the Modus themes (*note Stylistic variants using palette overrides::). 2403 Here we show how to affect the color of the underlines that are used by 2404 code linters and prose spell checkers. 2405 2406 ;; These overrides are common to all Modus themes. We also provide 2407 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 2408 ;; 2409 ;; In general, the theme-specific overrides are better for overriding 2410 ;; color values, such as redefining what `blue-faint' looks like. The 2411 ;; common overrides are best used for changes to semantic color 2412 ;; mappings, as we show below. 2413 2414 2415 ;; Make the underlines less intense 2416 (setq modus-themes-common-palette-overrides 2417 '((underline-err red-faint) 2418 (underline-warning yellow-faint) 2419 (underline-note cyan-faint))) 2420 2421 ;; Change the color-coding of the underlines 2422 (setq modus-themes-common-palette-overrides 2423 '((underline-err yellow-intense) 2424 (underline-warning magenta-intense) 2425 (underline-note green-intense))) 2426 2427 2428 File: docGYh7V6.info, Node: Make line numbers use alternative styles, Next: Make diffs use only a foreground, Prev: Make language underlines less colorful, Up: Stylistic variants using palette overrides 2429 2430 5.2.21 Make line numbers use alternative styles 2431 ----------------------------------------------- 2432 2433 This is one of our practical examples to override the semantic colors of 2434 the Modus themes (*note Stylistic variants using palette overrides::). 2435 In this section we show how to affect the ‘display-line-numbers-mode’. 2436 2437 ;; These overrides are common to all Modus themes. We also provide 2438 ;; theme-specific options, such as `modus-operandi-palette-overrides'. 2439 ;; 2440 ;; In general, the theme-specific overrides are better for overriding 2441 ;; color values, such as redefining what `blue-faint' looks like. The 2442 ;; common overrides are best used for changes to semantic color 2443 ;; mappings, as we show below. 2444 2445 2446 ;; Make line numbers less intense 2447 (setq modus-themes-common-palette-overrides 2448 '((fg-line-number-inactive "gray50") 2449 (fg-line-number-active fg-main) 2450 (bg-line-number-inactive unspecified) 2451 (bg-line-number-active unspecified))) 2452 2453 ;; Like the above, but use a shade of red for the current line number 2454 (setq modus-themes-common-palette-overrides 2455 '((fg-line-number-inactive "gray50") 2456 (fg-line-number-active red-cooler) 2457 (bg-line-number-inactive unspecified) 2458 (bg-line-number-active unspecified))) 2459 2460 ;; Make all numbers more intense, use a more pronounce gray 2461 ;; background, and make the current line have a colored background 2462 (setq modus-themes-common-palette-overrides 2463 '((fg-line-number-inactive fg-main) 2464 (fg-line-number-active fg-main) 2465 (bg-line-number-inactive bg-inactive) 2466 (bg-line-number-active bg-cyan-intense))) 2467 2468 2469 File: docGYh7V6.info, Node: Make diffs use only a foreground, Next: Make deuteranopia diffs red and blue instead of yellow and blue, Prev: Make line numbers use alternative styles, Up: Stylistic variants using palette overrides 2470 2471 5.2.22 Make diffs use only a foreground 2472 --------------------------------------- 2473 2474 This is one of our practical examples to override the semantic colors of 2475 the Modus themes (*note Stylistic variants using palette overrides::). 2476 In this section we show how to change diff buffers (e.g. in ‘magit’) to 2477 only use color-coded text without any added background. What we 2478 basically do is to disable the applicable backgrounds and then intensify 2479 the foregrounds. Since the deuteranopia-optimized themes do not use the 2480 red-green color coding, we make an extra set of adjustments for them by 2481 overriding their palettes directly instead of just using the “common” 2482 overrides. 2483 2484 ;; Diffs with only foreground colors. Word-wise ("refined") diffs 2485 ;; have a gray background to draw attention to themselves. 2486 (setq modus-themes-common-palette-overrides 2487 '((bg-added unspecified) 2488 (bg-added-faint unspecified) 2489 (bg-added-refine bg-inactive) 2490 (fg-added green) 2491 (fg-added-intense green-intense) 2492 2493 (bg-changed unspecified) 2494 (bg-changed-faint unspecified) 2495 (bg-changed-refine bg-inactive) 2496 (fg-changed yellow) 2497 (fg-changed-intense yellow-intense) 2498 2499 (bg-removed unspecified) 2500 (bg-removed-faint unspecified) 2501 (bg-removed-refine bg-inactive) 2502 (fg-removed red) 2503 (fg-removed-intense red-intense) 2504 2505 (bg-diff-context unspecified))) 2506 2507 ;; Because deuteranopia cannot use the typical red-yellow-green 2508 ;; combination, we need to arrange for a yellow-purple-blue sequence. 2509 ;; Notice that the above covers the "common" overrides, so we do not 2510 ;; need to reproduce the whole list of them. 2511 (setq modus-operandi-deuteranopia-palette-overrides 2512 '((fg-added blue) 2513 (fg-added-intense blue-intense) 2514 2515 (fg-changed magenta-cooler) 2516 (fg-changed-intense magenta-intense) 2517 2518 (fg-removed yellow-warmer) 2519 (fg-removed-intense yellow-intense))) 2520 2521 (setq modus-vivendi-deuteranopia-palette-overrides 2522 '((fg-added blue) 2523 (fg-added-intense blue-intense) 2524 2525 (fg-changed magenta-cooler) 2526 (fg-changed-intense magenta-intense) 2527 2528 (fg-removed yellow) 2529 (fg-removed-intense yellow-intense))) 2530 2531 2532 File: docGYh7V6.info, Node: Make deuteranopia diffs red and blue instead of yellow and blue, Next: Make the themes look like what the maintainer uses, Prev: Make diffs use only a foreground, Up: Stylistic variants using palette overrides 2533 2534 5.2.23 Make deuteranopia diffs red and blue instead of yellow and blue 2535 ---------------------------------------------------------------------- 2536 2537 This is one of our practical examples to override the semantic colors of 2538 the Modus themes (*note Stylistic variants using palette overrides::). 2539 In this section we show how to implement a red+blue color coding for 2540 diffs in the themes ‘modus-operandi-deuteranopia’ and 2541 ‘modus-vivendi-deuteranopia’. As those themes are optimized for users 2542 with red-green color deficiency, they do not use the typical red+green 2543 color coding for diffs, defaulting instead to yellow+blue which are 2544 discernible. Users with deuteranomaly or, generally, those who like a 2545 different aesthetic, can use the following to make diffs use the 2546 red+yellow+blue color coding for removed, changed, and added lines 2547 respectively. This is achieved by overriding the “changed” and 2548 “removed” entries to use the colors of regular ‘modus-operandi’ and 2549 ‘modus-vivendi’. 2550 2551 (setq modus-operandi-deuteranopia-palette-overrides 2552 '((bg-changed "#ffdfa9") 2553 (bg-changed-faint "#ffefbf") 2554 (bg-changed-refine "#fac090") 2555 (bg-changed-fringe "#d7c20a") 2556 (fg-changed "#553d00") 2557 (fg-changed-intense "#655000") 2558 2559 (bg-removed "#ffd8d5") 2560 (bg-removed-faint "#ffe9e9") 2561 (bg-removed-refine "#f3b5af") 2562 (bg-removed-fringe "#d84a4f") 2563 (fg-removed "#8f1313") 2564 (fg-removed-intense "#aa2222"))) 2565 2566 (setq modus-vivendi-deuteranopia-palette-overrides 2567 '((bg-changed "#363300") 2568 (bg-changed-faint "#2a1f00") 2569 (bg-changed-refine "#4a4a00") 2570 (bg-changed-fringe "#8a7a00") 2571 (fg-changed "#efef80") 2572 (fg-changed-intense "#c0b05f") 2573 2574 (bg-removed "#4f1119") 2575 (bg-removed-faint "#380a0f") 2576 (bg-removed-refine "#781a1f") 2577 (bg-removed-fringe "#b81a1f") 2578 (fg-removed "#ffbfbf") 2579 (fg-removed-intense "#ff9095"))) 2580 2581 2582 File: docGYh7V6.info, Node: Make the themes look like what the maintainer uses, Prev: Make deuteranopia diffs red and blue instead of yellow and blue, Up: Stylistic variants using palette overrides 2583 2584 5.2.24 Make the themes look like what the maintainer uses 2585 --------------------------------------------------------- 2586 2587 Based on what we have learnt from the previous sections of this manual, 2588 here is what Protesilaos uses: 2589 2590 ;; Always reload the theme for changes to take effect! 2591 2592 (setq modus-themes-custom-auto-reload nil 2593 modus-themes-to-toggle '(modus-operandi modus-vivendi) 2594 modus-themes-mixed-fonts t 2595 modus-themes-variable-pitch-ui nil 2596 modus-themes-italic-constructs t 2597 modus-themes-bold-constructs nil 2598 modus-themes-org-blocks nil 2599 modus-themes-completions '((t . (extrabold))) 2600 modus-themes-prompts nil 2601 modus-themes-headings 2602 '((agenda-structure . (variable-pitch light 2.2)) 2603 (agenda-date . (variable-pitch regular 1.3)) 2604 (t . (regular 1.15)))) 2605 2606 (setq modus-themes-common-palette-overrides 2607 '((cursor magenta-cooler) 2608 ;; Make the fringe invisible. 2609 (fringe unspecified) 2610 ;; Make line numbers less intense and add a shade of cyan 2611 ;; for the current line number. 2612 (fg-line-number-inactive "gray50") 2613 (fg-line-number-active cyan-cooler) 2614 (bg-line-number-inactive unspecified) 2615 (bg-line-number-active unspecified) 2616 ;; Make the current line of `hl-line-mode' a fine shade of 2617 ;; gray (though also see my `lin' package). 2618 (bg-hl-line bg-dim) 2619 ;; Make the region have a cyan-green background with no 2620 ;; specific foreground (use foreground of underlying text). 2621 ;; "bg-sage" refers to Salvia officinalis, else the common 2622 ;; sage. 2623 (bg-region bg-sage) 2624 (fg-region unspecified) 2625 ;; Make matching parentheses a shade of magenta. It 2626 ;; complements the region nicely. 2627 (bg-paren-match bg-magenta-intense) 2628 ;; Make email citations faint and neutral, reducing the 2629 ;; default four colors to two; make mail headers cyan-blue. 2630 (mail-cite-0 fg-dim) 2631 (mail-cite-1 blue-faint) 2632 (mail-cite-2 fg-dim) 2633 (mail-cite-3 blue-faint) 2634 (mail-part cyan-warmer) 2635 (mail-recipient blue-warmer) 2636 (mail-subject magenta-cooler) 2637 (mail-other cyan-warmer) 2638 ;; Change dates to a set of more subtle combinations. 2639 (date-deadline magenta-cooler) 2640 (date-scheduled magenta) 2641 (date-weekday fg-main) 2642 (date-event fg-dim) 2643 (date-now blue-faint) 2644 ;; Make tags (Org) less colorful and tables look the same as 2645 ;; the default foreground. 2646 (prose-done cyan-cooler) 2647 (prose-tag fg-dim) 2648 (prose-table fg-main) 2649 ;; Make headings less colorful (though I never use deeply 2650 ;; nested headings). 2651 (fg-heading-2 blue-faint) 2652 (fg-heading-3 magenta-faint) 2653 (fg-heading-4 blue-faint) 2654 (fg-heading-5 magenta-faint) 2655 (fg-heading-6 blue-faint) 2656 (fg-heading-7 magenta-faint) 2657 (fg-heading-8 blue-faint) 2658 ;; Make the active mode line a fine shade of lavender 2659 ;; (purple) and tone down the gray of the inactive mode 2660 ;; lines. 2661 (bg-mode-line-active bg-lavender) 2662 (border-mode-line-active bg-lavender) 2663 2664 (bg-mode-line-inactive bg-dim) 2665 (border-mode-line-inactive bg-inactive) 2666 ;; Make the prompts a shade of magenta, to fit in nicely with 2667 ;; the overall blue-cyan-purple style of the other overrides. 2668 ;; Add a nuanced background as well. 2669 (bg-prompt bg-magenta-nuanced) 2670 (fg-prompt magenta-cooler) 2671 ;; Tweak some more constructs for stylistic constistency. 2672 (name blue-warmer) 2673 (identifier magenta-faint) 2674 (keybind magenta-cooler) 2675 (accent-0 magenta-cooler) 2676 (accent-1 cyan-cooler) 2677 (accent-2 blue-warmer) 2678 (accent-3 red-cooler))) 2679 2680 ;; Make the active mode line have a pseudo 3D effect (this assumes 2681 ;; you are using the default mode line and not an extra package). 2682 (custom-set-faces 2683 '(mode-line ((t :box (:style released-button))))) 2684 2685 2686 File: docGYh7V6.info, Node: More accurate colors in terminal emulators, Next: Range of color with terminal emulators, Prev: Stylistic variants using palette overrides, Up: Advanced customization 2687 2688 5.3 More accurate colors in terminal emulators 2689 ============================================== 2690 2691 [ This is based on partial information. Please help verify and/or 2692 expand these findings. ] 2693 2694 The graphical version of Emacs can reproduce color values accurately. 2695 Whereas things get more tricky when Emacs is used in a terminal 2696 emulator, because the terminals’ own capabilities determine the number 2697 of colors that may be displayed: the Modus themes don’t look as good in 2698 that case. 2699 2700 There is, however, a way to instruct supported terminal emulators to 2701 use more accurate colors. In a shell prompt type ‘toe -a | grep direct’ 2702 to get a list of relevant terminfo entries. There should be items such 2703 as ‘xterm-direct’, ‘alacritty-direct’, ‘kitty-direct’. Once you find 2704 the one that corresponds to your terminal, call Emacs with an 2705 environment variable like ‘TERM=xterm-direct’. Example that can be 2706 adapted to shell aliases: 2707 2708 TERM=xterm-direct emacsclient -nw 2709 2710 Another example that can be bound to a key: 2711 2712 TERM=xterm-direct uxterm -e emacsclient -nw 2713 2714 2715 File: docGYh7V6.info, Node: Range of color with terminal emulators, Next: Preview theme colors, Prev: More accurate colors in terminal emulators, Up: Advanced customization 2716 2717 5.4 Range of color with terminal emulators 2718 ========================================== 2719 2720 [ This is based on partial information. Please help verify and/or 2721 expand these findings. ] 2722 2723 When Emacs runs in a non-windowed session its color reproduction 2724 capacity is framed or determined by the underlying terminal emulator 2725 (*note More accurate colors in terminal emulators::). Emacs cannot 2726 produce a color that lies outside the range of what the terminal’s color 2727 palette renders possible. 2728 2729 This is immediately noticeable when the terminal’s first 16 codes do 2730 not include a pure black value for the ‘termcol0’ entry and a pure white 2731 for ‘termcol15’. Emacs cannot set the correct background (white for 2732 ‘modus-operandi’; black for ‘modus-vivendi’) or foreground (inverse of 2733 the background). It thus falls back to the closest approximation, which 2734 seldom is appropriate for the purposes of the Modus themes. 2735 2736 In such a case, the user is expected to update their terminal’s color 2737 palette such as by adapting these resources (*note Preview theme 2738 colors::): 2739 2740 ! Theme: modus-operandi 2741 ! Description: XTerm port of modus-operandi (Modus themes for GNU Emacs) 2742 ! Author: Protesilaos Stavrou, <https://protesilaos.com> 2743 xterm*background: #ffffff 2744 xterm*foreground: #000000 2745 xterm*color0: #000000 2746 xterm*color1: #a60000 2747 xterm*color2: #005e00 2748 xterm*color3: #813e00 2749 xterm*color4: #0031a9 2750 xterm*color5: #721045 2751 xterm*color6: #00538b 2752 xterm*color7: #bfbfbf 2753 xterm*color8: #595959 2754 xterm*color9: #972500 2755 xterm*color10: #315b00 2756 xterm*color11: #70480f 2757 xterm*color12: #2544bb 2758 xterm*color13: #5317ac 2759 xterm*color14: #005a5f 2760 xterm*color15: #ffffff 2761 2762 ! Theme: modus-vivendi 2763 ! Description: XTerm port of modus-vivendi (Modus themes for GNU Emacs) 2764 ! Author: Protesilaos Stavrou, <https://protesilaos.com> 2765 xterm*background: #000000 2766 xterm*foreground: #ffffff 2767 xterm*color0: #000000 2768 xterm*color1: #ff8059 2769 xterm*color2: #44bc44 2770 xterm*color3: #d0bc00 2771 xterm*color4: #2fafff 2772 xterm*color5: #feacd0 2773 xterm*color6: #00d3d0 2774 xterm*color7: #bfbfbf 2775 xterm*color8: #595959 2776 xterm*color9: #ef8b50 2777 xterm*color10: #70b900 2778 xterm*color11: #c0c530 2779 xterm*color12: #79a8ff 2780 xterm*color13: #b6a0ff 2781 xterm*color14: #6ae4b9 2782 xterm*color15: #ffffff 2783 2784 2785 File: docGYh7V6.info, Node: Preview theme colors, Next: Per-theme customization settings, Prev: Range of color with terminal emulators, Up: Advanced customization 2786 2787 5.5 Preview theme colors 2788 ======================== 2789 2790 The command ‘modus-themes-list-colors’ uses minibuffer completion to 2791 select an item from the Modus themes and then produces a buffer with 2792 previews of its color palette entries. The buffer has a naming scheme 2793 that reflects the given choice, like ‘modus-operandi-list-colors’ for 2794 the ‘modus-operandi’ theme. 2795 2796 The command ‘modus-themes-list-colors-current’ skips the minibuffer 2797 selection process and just produces a preview for the current Modus 2798 theme. 2799 2800 When called with a prefix argument (‘C-u’ with the default key 2801 bindings), these commands will show a preview of the palette’s semantic 2802 color mappings instead of the named colors. In this context, “named 2803 colors” are entries that associate a symbol to a string color value, 2804 such as ‘(blue-warmer "#354fcf")’. Whereas “semantic color mappings” 2805 associate a named color to a symbol, like ‘(string blue-warmer)’, thus 2806 making the theme render all string constructs in the ‘blue-warmer’ color 2807 value (*note Option for palette overrides: Palette overrides.). 2808 2809 Aliases for those commands are ‘modus-themes-preview-colors’ and 2810 ‘modus-themes-preview-colors-current’. 2811 2812 Each row shows a foreground and background coloration using the 2813 underlying value it references. For example a line with ‘#a60000’ (a 2814 shade of red) will show red text followed by a stripe with that same 2815 color as a backdrop. 2816 2817 The name of the buffer describes the given Modus theme and what the 2818 contents are, such as ‘*modus-operandi-list-colors*’ for named colors 2819 and ‘=*modus-operandi-list-mappings*’ for the semantic color mappings. 2820 2821 2822 File: docGYh7V6.info, Node: Per-theme customization settings, Next: Get a single color from the palette, Prev: Preview theme colors, Up: Advanced customization 2823 2824 5.6 Per-theme customization settings 2825 ==================================== 2826 2827 If you prefer to maintain different customization options between the 2828 two themes, it is best you write your own functions that first set those 2829 options and then load the relevant theme. The following code does 2830 exactly that by simply differentiating the two themes on the choice of 2831 bold constructs in code syntax (enabled for one, disabled for the 2832 other). 2833 2834 (defun my-demo-modus-operandi () 2835 (interactive) 2836 (setq modus-themes-bold-constructs t) ; ENABLE bold 2837 (modus-themes-load-theme 'modus-operandi)) 2838 2839 (defun my-demo-modus-vivendi () 2840 (interactive) 2841 (setq modus-themes-bold-constructs nil) ; DISABLE bold 2842 (modus-themes-load-theme 'modus-vivendi)) 2843 2844 (defun my-demo-modus-themes-toggle () 2845 (if (eq (car custom-enabled-themes) 'modus-operandi) 2846 (my-demo-modus-vivendi) 2847 (my-demo-modus-operandi))) 2848 2849 Then assign ‘my-demo-modus-themes-toggle’ to a key instead of the 2850 equivalent the themes provide. 2851 2852 For a more elaborate design, it is better to inspect the source code 2853 of ‘modus-themes-toggle’ and relevant functions. 2854 2855 2856 File: docGYh7V6.info, Node: Get a single color from the palette, Next: Use theme colors in code with modus-themes-with-colors, Prev: Per-theme customization settings, Up: Advanced customization 2857 2858 5.7 Get a single color from the palette 2859 ======================================= 2860 2861 *note Use theme colors in code with modus-themes-with-colors::. 2862 2863 The fuction ‘modus-themes-get-color-value’ can be called from Lisp to 2864 return the value of a color from the active Modus theme palette. It 2865 takea a ‘COLOR’ argument and an optional ‘OVERRIDES’. 2866 2867 ‘COLOR’ is a symbol that represents a named color entry in the 2868 palette. 2869 2870 *note Preview theme colors::. 2871 2872 If the value is the name of another color entry in the palette (so a 2873 mapping), this function recurs until it finds the underlying color 2874 value. 2875 2876 With an optional ‘OVERRIDES’ argument as a non-‘nil’ value, it 2877 accounts for palette overrides. Else it reads only the default palette. 2878 2879 *note Option for palette overrides: Palette overrides. 2880 2881 With optional ‘THEME’ as a symbol among ‘modus-themes-items’ (alias 2882 ‘modus-themes-collection’), use the palette of that item. Else use the 2883 current Modus theme. 2884 2885 If ‘COLOR’ is not present in the palette, this function returns the 2886 ‘unspecified’ symbol, which is safe when used as a face attribute’s 2887 value. 2888 2889 An example with ‘modus-operandi’ to show how this function behaves 2890 with/without overrides and when recursive mappings are introduced. 2891 2892 ;; Here we show the recursion of palette mappings. In general, it is 2893 ;; better for the user to specify named colors to avoid possible 2894 ;; confusion with their configuration, though those still work as 2895 ;; expected. 2896 (setq modus-themes-common-palette-overrides 2897 '((cursor red) 2898 (fg-mode-line-active cursor) 2899 (border-mode-line-active fg-mode-line-active))) 2900 2901 ;; Ignore the overrides and get the original value. 2902 (modus-themes-get-color-value 'border-mode-line-active) 2903 ;; => "#5a5a5a" 2904 2905 ;; Read from the overrides and deal with any recursion to find the 2906 ;; underlying value. 2907 (modus-themes-get-color-value 'border-mode-line-active :overrides) 2908 ;; => "#a60000" 2909 2910 2911 File: docGYh7V6.info, Node: Use theme colors in code with modus-themes-with-colors, Next: Do not extend the region background, Prev: Get a single color from the palette, Up: Advanced customization 2912 2913 5.8 Use theme colors in code with modus-themes-with-colors 2914 ========================================================== 2915 2916 *note Get a single color from the palette::. 2917 2918 Note that users most probably do not need the following. Just rely 2919 on the comprehensive overrides we provide (*note Option for palette 2920 overrides: Palette overrides.). 2921 2922 Advanced users may want to apply colors from the palette of the 2923 active Modus theme in their custom code. The ‘modus-themes-with-colors’ 2924 macro supplies those to any form called inside of it. For example: 2925 2926 (modus-themes-with-colors 2927 (list blue-warmer magenta-cooler fg-added warning variable fg-heading-4)) 2928 ;; => ("#354fcf" "#531ab6" "#005000" "#884900" "#005e8b" "#721045") 2929 2930 The above return value is for ‘modus-operandi’ when that is the 2931 active theme. Switching to another theme and evaluating this code anew 2932 will give us the relevant results for that theme (remember that since 2933 version 4, the Modus themes consist of six items (*note Overview::)). 2934 The same with ‘modus-vivendi’ as the active theme: 2935 2936 (modus-themes-with-colors 2937 (list blue-warmer magenta-cooler fg-added warning variable fg-heading-4)) 2938 ;; => ("#79a8ff" "#b6a0ff" "#a0e0a0" "#fec43f" "#00d3d0" "#feacd0") 2939 2940 The ‘modus-themes-with-colors’ has access to the whole palette of the 2941 active theme, meaning that it can instantiate both (i) named colors like 2942 ‘blue-warmer’ and (ii) semantic color mappings like ‘warning’. We 2943 provide commands to inspect those (*note Preview theme colors::). 2944 2945 Others sections in this manual show how to use the aforementioned 2946 macro (*note Advanced customization::). 2947 2948 Because the ‘modus-themes-with-colors’ will most likely be used to 2949 customize faces, note that any function that calls it must be run at 2950 startup after the theme loads. The same function must also be assigned 2951 to the ‘modus-themes-after-load-theme-hook’ for its effects to persist 2952 and be updated when switching between Modus themes (e.g. to update the 2953 exact value of ‘blue-warmer’ when toggling between ‘modus-operandi’ to 2954 ‘modus-vivendi’. 2955 2956 2957 File: docGYh7V6.info, Node: Do not extend the region background, Next: Add padding to mode line, Prev: Use theme colors in code with modus-themes-with-colors, Up: Advanced customization 2958 2959 5.9 Do not extend the region background 2960 ======================================= 2961 2962 By the default, the background of the ‘region’ face extends from the end 2963 of the line to the edge of the window. To limit it to the end of the 2964 line, we need to override the face’s ‘:extend’ attribute. Adding this 2965 to the Emacs configuration file will suffice: 2966 2967 ;; Do not extend `region' background past the end of the line. 2968 (custom-set-faces 2969 '(region ((t :extend nil)))) 2970 2971 *note Make the region preserve text colors, plus other styles: Make 2972 the region preserve text colors plus other styles. 2973 2974 2975 File: docGYh7V6.info, Node: Add padding to mode line, Next: Remap face with local value, Prev: Do not extend the region background, Up: Advanced customization 2976 2977 5.10 Add padding to mode line 2978 ============================= 2979 2980 Emacs faces do not have a concept of “padding” for the space between the 2981 text and its box boundaries. We can approximate the effect by adding a 2982 ‘:box’ attribute, making its border several pixels thick, and using the 2983 mode line’s background color for it. This way the thick border will not 2984 stand out and will appear as a continuation of the mode line. 2985 2986 *note Use theme colors in code with modus-themes-with-colors::. 2987 2988 (defun my-modus-themes-custom-faces () 2989 (modus-themes-with-colors 2990 (custom-set-faces 2991 ;; Add "padding" to the mode lines 2992 `(mode-line ((,c :box (:line-width 10 :color ,bg-mode-line-active)))) 2993 `(mode-line-inactive ((,c :box (:line-width 10 :color ,bg-mode-line-inactive))))))) 2994 2995 (add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces) 2996 2997 The above has the effect of removing the border around the mode 2998 lines. In older versions of the themes, we provided the option for a 2999 padded mode line which could also have borders around it. Those were 3000 not real border, however, but an underline and an overline. Adjusting 3001 the above: 3002 3003 (defun my-modus-themes-custom-faces () 3004 (modus-themes-with-colors 3005 (custom-set-faces 3006 ;; Add "padding" to the mode lines 3007 `(mode-line ((,c :underline ,border-mode-line-active 3008 :overline ,border-mode-line-active 3009 :box (:line-width 10 :color ,bg-mode-line-active)))) 3010 `(mode-line-inactive ((,c :underline ,border-mode-line-inactive 3011 :overline ,border-mode-line-inactive 3012 :box (:line-width 10 :color ,bg-mode-line-inactive))))))) 3013 3014 ;; ESSENTIAL to make the underline move to the bottom of the box: 3015 (setq x-underline-at-descent-line t) 3016 3017 (add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces) 3018 3019 The reason we no longer provide this option is because it depends on 3020 a non-‘nil’ value for ‘x-underline-at-descent-line’. That variable 3021 affects ALL underlines, including those of links. The effect is 3022 intrusive and looks awkard in prose. 3023 3024 As such, the Modus themes no longer provide that option but instead 3025 offer this piece of documentation to make the user fully aware of the 3026 state of affairs. 3027 3028 3029 File: docGYh7V6.info, Node: Remap face with local value, Next: Font configurations for Org and others, Prev: Add padding to mode line, Up: Advanced customization 3030 3031 5.11 Remap face with local value 3032 ================================ 3033 3034 There are cases where we need to change the buffer-local attributes of a 3035 face. This might be because we have our own minor mode that re-uses a 3036 face for a particular purpose, such as a line selection tool that 3037 activates ‘hl-line-mode’, but we wish to keep it distinct from other 3038 buffers. This is where ‘face-remap-add-relative’ can be applied and may 3039 be combined with ‘modus-themes-with-colors’ to deliver consistent 3040 results. 3041 3042 *note Use theme colors in code with modus-themes-with-colors::. 3043 3044 In this example we will write a simple interactive function that 3045 adjusts the background color of the ‘region’ face. This is the sample 3046 code: 3047 3048 (defvar my-rainbow-region-colors 3049 (modus-themes-with-colors 3050 `((red . ,bg-red-subtle) 3051 (green . ,bg-green-subtle) 3052 (yellow . ,bg-yellow-subtle) 3053 (blue . ,bg-blue-subtle) 3054 (magenta . ,bg-magenta-subtle) 3055 (cyan . ,bg-cyan-subtle))) 3056 "Sample list of color values for `my-rainbow-region'.") 3057 3058 (defun my-rainbow-region (color) 3059 "Remap buffer-local attribute of `region' using COLOR." 3060 (interactive 3061 (list 3062 (completing-read "Pick a color: " my-rainbow-region-colors))) 3063 (face-remap-add-relative 3064 'region 3065 `( :background ,(alist-get (intern color) my-rainbow-region-colors) 3066 :foreground ,(face-attribute 'default :foreground)))) 3067 3068 When ‘my-rainbow-region’ is called interactively, it prompts for a 3069 color to use. The list of candidates is drawn from the car of each 3070 association in ‘my-rainbow-region-colors’ (so “red”, “green”, etc.). 3071 3072 To extend this principle, we may write wrapper functions that pass a 3073 color directly. Those can be useful in tandem with hooks. Consider 3074 this example: 3075 3076 (defun my-rainbow-region-magenta () 3077 (my-rainbow-region 'magenta)) 3078 3079 (add-hook 'diff-mode-hook #'my-rainbow-region-magenta) 3080 3081 Whenever we enter a ‘diff-mode’ buffer, we now get a magenta-colored 3082 region. 3083 3084 Perhaps you may wish to generalize those findings in to a set of 3085 functions that also accept an arbitrary face. We shall leave the 3086 experimentation up to you. 3087 3088 3089 File: docGYh7V6.info, Node: Font configurations for Org and others, Next: Configure bold and italic faces, Prev: Remap face with local value, Up: Advanced customization 3090 3091 5.12 Font configurations for Org and others 3092 =========================================== 3093 3094 The themes are designed to optionally cope well with mixed font 3095 configurations. This mostly concerns ‘org-mode’ and ‘markdown-mode’, 3096 though expect to find it elsewhere like in ‘Info-mode’. 3097 3098 *note Option for font mixing: Mixed fonts. 3099 3100 In practice it means that the user can safely opt for a more 3101 prose-friendly proportionately spaced typeface as their default, while 3102 spacing-sensitive elements like tables and inline code always use a 3103 monospaced font, by inheriting from the ‘fixed-pitch’ face. 3104 3105 Users can try the built-in ‘M-x variable-pitch-mode’ to see the 3106 effect in action. 3107 3108 To make everything use your desired font families, you need to 3109 configure the ‘variable-pitch’ (proportional spacing) and ‘fixed-pitch’ 3110 (monospaced) faces respectively. It may also be convenient to set your 3111 main typeface by configuring the ‘default’ face the same way. 3112 3113 [ The ‘fontaine’ package on GNU ELPA (by Protesilaos) is designed to 3114 handle this case. ] 3115 3116 Put something like this in your initialization file (also consider 3117 reading the doc string of ‘set-face-attribute’): 3118 3119 ;; Main typeface 3120 (set-face-attribute 'default nil :family "DejaVu Sans Mono" :height 110) 3121 3122 ;; Proportionately spaced typeface 3123 (set-face-attribute 'variable-pitch nil :family "DejaVu Serif" :height 1.0) 3124 3125 ;; Monospaced typeface 3126 (set-face-attribute 'fixed-pitch nil :family "DejaVu Sans Mono" :height 1.5) 3127 3128 Or employ the ‘face-attribute’ function to read an existing value, 3129 such as if you want to make ‘fixed-pitch’ use the font family of the 3130 ‘default’ face: 3131 3132 (set-face-attribute 'fixed-pitch nil :family (face-attribute 'default :family)) 3133 3134 The next section shows how to make those work in a more elaborate 3135 setup that is robust to changes between the Modus themes. 3136 3137 *note Configure bold and italic faces::. 3138 3139 Note the differences in the ‘:height’ property. The ‘default’ face 3140 must specify an absolute value, which is the point size × 10. So if you 3141 want to use a font at point size ‘11’, you set the height to ‘110’.(1) 3142 Whereas every other face must either not specify a height or have a 3143 value that is relative to the default, represented as a floating point. 3144 If you use an integer, then that means an absolute height. This is of 3145 paramount importance: it ensures that all fonts can scale gracefully 3146 when using something like the ‘text-scale-adjust’ command which only 3147 operates on the base font size (i.e. the ‘default’ face’s absolute 3148 height). 3149 3150 *note Note for EWW and Elfeed fonts: Note on SHR fonts. 3151 3152 ---------- Footnotes ---------- 3153 3154 (1) ‘:height’ values do not need to be rounded to multiples of ten: 3155 the likes of ‘115’ are perfectly valid—some typefaces will change to 3156 account for those finer increments. 3157 3158 3159 File: docGYh7V6.info, Node: Configure bold and italic faces, Next: Custom Org todo keyword and priority faces, Prev: Font configurations for Org and others, Up: Advanced customization 3160 3161 5.13 Configure bold and italic faces 3162 ==================================== 3163 3164 The Modus themes do not hardcode a ‘:weight’ or ‘:slant’ attribute in 3165 the thousands of faces they cover. Instead, they configure the generic 3166 faces called ‘bold’ and ‘italic’ to use the appropriate styles and then 3167 instruct all relevant faces that require emphasis to inherit from them. 3168 3169 This practically means that users can change the particularities of 3170 what it means for a construct to be bold/italic, by tweaking the ‘bold’ 3171 and ‘italic’ faces. Cases where that can be useful include: 3172 3173 • The default typeface does not have a variant with slanted glyphs 3174 (e.g. Fira Mono/Code as of this writing on 2021-07-07), so the 3175 user wants to add another family for the italics, such as Hack. 3176 3177 • The typeface of choice provides a multitude of weights and the user 3178 prefers the light one by default. To prevent the bold weight from 3179 being too heavy compared to the light one, they opt to make ‘bold’ 3180 use a semibold weight. 3181 3182 • The typeface distinguishes between oblique and italic forms by 3183 providing different font variants (the former are just slanted 3184 versions of the upright forms, while the latter have distinguishing 3185 features as well). In this case, the user wants to specify the 3186 font that applies to the ‘italic’ face. 3187 3188 To achieve those effects, one must first be sure that the fonts they 3189 use have support for those features. It then is a matter of following 3190 the instructions for all typeface tweaks. 3191 3192 *note Font configurations for Org and others::. 3193 3194 In this example, we set the default font family to Fira Code, while 3195 we choose to render italics in the Hack typeface (obviously you need to 3196 pick fonts that work well together): 3197 3198 (set-face-attribute 'default nil :family "Fira Code" :height 110) 3199 (set-face-attribute 'italic nil :family "Hack") 3200 3201 And here we play with different weights, using Source Code Pro: 3202 3203 (set-face-attribute 'default nil :family "Source Code Pro" :height 110 :weight 'light) 3204 (set-face-attribute 'bold nil :weight 'semibold) 3205 3206 To reset the font family, one can use this: 3207 3208 (set-face-attribute 'italic nil :family 'unspecified) 3209 3210 To ensure that the effects persist after switching between the Modus 3211 themes (such as with ‘M-x modus-themes-toggle’), the user needs to write 3212 their configurations to a function and pass it to the 3213 ‘modus-themes-after-load-theme-hook’. This is necessary because themes 3214 set the styles of faces upon activation, overriding prior values where 3215 conflicts occur between the previous and the current states (otherwise 3216 changing themes would not be possible). 3217 3218 *note A theme-agnostic hook for theme loading::. 3219 3220 This is a minimal setup to preserve font configurations across theme 3221 load phases. For a more permanent setup, it is better to rely on the 3222 ‘custom-set-faces’ function: ‘set-face-attribute’ works just fine, 3223 though it probably is better suited for quick previews or for smaller 3224 scale operations (‘custom-set-faces’ follows the format used in the 3225 source code of the themes, which can make it easier to redefine faces in 3226 bulk). 3227 3228 ;; our generic function 3229 (defun my-modes-themes-bold-italic-faces () 3230 (set-face-attribute 'default nil :family "Source Code Pro" :height 110) 3231 (set-face-attribute 'bold nil :weight 'semibold)) 3232 3233 ;; or use this if you configure a lot of face and attributes and 3234 ;; especially if you plan to use `modus-themes-with-colors', as shown 3235 ;; elsewhere in the manual 3236 (defun my-modes-themes-bold-italic-faces () 3237 (custom-set-faces 3238 '(default ((t :family "Source Code Pro" :height 110))) 3239 '(bold ((t :weight semibold))))) 3240 3241 ;; and here is the hook 3242 (add-hook 'modus-themes-after-load-theme-hook #'my-modes-themes-bold-italic-faces) 3243 3244 *note Use theme colors in code with modus-themes-with-colors::. 3245 3246 3247 File: docGYh7V6.info, Node: Custom Org todo keyword and priority faces, Next: Custom Org emphasis faces, Prev: Configure bold and italic faces, Up: Advanced customization 3248 3249 5.14 Custom Org todo keyword and priority faces 3250 =============================================== 3251 3252 Users of ‘org-mode’ have the option to configure various keywords and 3253 priority cookies to better match their workflow. User options are 3254 ‘org-todo-keyword-faces’ and ‘org-priority-faces’. 3255 3256 As those are meant to be custom faces, it is futile to have the 3257 themes guess what each user wants to use, which keywords to target, and 3258 so on. Instead, we can provide guidelines on how to customize things to 3259 one’s liking with the intent of retaining the overall aesthetic of the 3260 themes. 3261 3262 Please bear in mind that the end result of those is not controlled by 3263 the active Modus theme but by how Org maps faces to its constructs. 3264 Editing those while ‘org-mode’ is active requires re-initialization of 3265 the mode with ‘M-x org-mode-restart’ for changes to take effect. 3266 3267 Let us assume you wish to visually differentiate your keywords. You 3268 have something like this: 3269 3270 (setq org-todo-keywords 3271 '((sequence "TODO(t)" "|" "DONE(D)" "CANCEL(C)") 3272 (sequence "MEET(m)" "|" "MET(M)") 3273 (sequence "STUDY(s)" "|" "STUDIED(S)") 3274 (sequence "WRITE(w)" "|" "WROTE(W)"))) 3275 3276 You could then use a variant of the following to inherit from a face 3277 that uses the styles you want and also to preserve the attributes 3278 applied by the ‘org-todo’ face (in case there is a difference between 3279 the two): 3280 3281 (setq org-todo-keyword-faces 3282 '(("MEET" . (:inherit (bold org-todo))) 3283 ("STUDY" . (:inherit (warning org-todo))) 3284 ("WRITE" . (:inherit (shadow org-todo))))) 3285 3286 This will refashion the keywords you specify, while letting the other 3287 items in ‘org-todo-keywords’ use their original styles, which are 3288 defined in the ‘org-todo’ and ‘org-done’ faces. 3289 3290 If you want back the defaults, try specifying just the ‘org-todo’ 3291 face: 3292 3293 (setq org-todo-keyword-faces 3294 '(("MEET" . org-todo) 3295 ("STUDY" . org-todo) 3296 ("WRITE" . org-todo))) 3297 3298 Or set ‘org-todo-keyword-faces’ to ‘nil’. 3299 3300 When you inherit from multiple faces, you need to do it the way it is 3301 shown further above. The order is significant: the first entry is 3302 applied on top of the second, overriding any attributes that are 3303 explicitly set for both of them: any attribute that is not specified is 3304 not overridden, so, for example, if ‘org-todo’ has a background and a 3305 foreground, while ‘font-lock-type-face’ only has a foreground, the 3306 merged face will include the background of the former and the foreground 3307 of the latter. If you do not want to blend multiple faces, you only 3308 specify one by name without parentheses or an ‘:inherit’ keyword. A 3309 pattern of ‘keyword . face’ will suffice. 3310 3311 Both approaches can be used simultaneously, as illustrated in this 3312 configuration of the priority cookies: 3313 3314 (setq org-priority-faces 3315 '((?A . (:inherit (bold org-priority))) 3316 (?B . org-priority) 3317 (?C . (:inherit (shadow org-priority))))) 3318 3319 To find all the faces that are loaded in your current Emacs session, 3320 use ‘M-x list-faces-display’. Try ‘M-x describe-variable’ as well and 3321 then specify the name of each of those Org variables demonstrated above. 3322 Their documentation strings will offer you further guidance. 3323 3324 Recall that the themes let you retrieve a color from their palette. 3325 Do it if you plan to control face attributes. 3326 3327 *note Check color combinations: Measure color contrast. 3328 3329 3330 File: docGYh7V6.info, Node: Custom Org emphasis faces, Next: Update Org block delimiter fontification, Prev: Custom Org todo keyword and priority faces, Up: Advanced customization 3331 3332 5.15 Custom Org emphasis faces 3333 ============================== 3334 3335 Org provides the user option ‘org-emphasis-alist’ which associates a 3336 character with a face, list of faces, or face attributes. The default 3337 specification of that variable looks like this: 3338 3339 (setq org-emphasis-alist 3340 '(("*" bold) 3341 ("/" italic) 3342 ("_" underline) 3343 ("=" org-verbatim verbatim) 3344 ("~" org-code verbatim) 3345 ("+" (:strike-through t)))) 3346 3347 With the exception of ‘org-verbatim’ and ‘org-code’ faces, everything 3348 else uses the corresponding type of emphasis: a bold typographic weight, 3349 or italicised, underlined, and struck through text. 3350 3351 The best way for users to add some extra attributes, such as a 3352 foreground color, is to define their own faces and assign them to the 3353 given emphasis marker/character. 3354 3355 This is a custom face that extends the standard ‘bold’ face with a 3356 red foreground value (so it colorises the text in addition to the bold 3357 weight): 3358 3359 (defface my-org-emphasis-bold 3360 '((default :inherit bold) 3361 (((class color) (min-colors 88) (background light)) 3362 :foreground "#a60000") 3363 (((class color) (min-colors 88) (background dark)) 3364 :foreground "#ff8059")) 3365 "My bold emphasis for Org.") 3366 3367 This face definition reads as follows: 3368 3369 • Always inherit the ‘bold’ face (*note Configure bold and italic 3370 faces::). 3371 • For versions of Emacs that support at least 88 colors (graphical 3372 Emacs, for example) and use a light background, apply the ‘#a60000’ 3373 value. 3374 • For the same kind of Emacs that has a dark background use the 3375 ‘#ff8059’ color instead. 3376 3377 Same principle for how to extend ‘italic’ and ‘underline’ with, for 3378 example, green and yellow hues, respectively: 3379 3380 (defface my-org-emphasis-italic 3381 '((default :inherit italic) 3382 (((class color) (min-colors 88) (background light)) 3383 :foreground "#005e00") 3384 (((class color) (min-colors 88) (background dark)) 3385 :foreground "#44bc44")) 3386 "My italic emphasis for Org.") 3387 3388 (defface my-org-emphasis-underline 3389 '((default :inherit underline) 3390 (((class color) (min-colors 88) (background light)) 3391 :foreground "#813e00") 3392 (((class color) (min-colors 88) (background dark)) 3393 :foreground "#d0bc00")) 3394 "My underline emphasis for Org.") 3395 3396 In the case of a strike-through effect, we have no generic face to 3397 inherit from, so we can write it as follows to also change the 3398 foreground to a more subtle gray: 3399 3400 (defface my-org-emphasis-strike-through 3401 '((default :strike-through t) 3402 (((class color) (min-colors 88) (background light)) 3403 :foreground "#505050") 3404 (((class color) (min-colors 88) (background dark)) 3405 :foreground "#a8a8a8")) 3406 "My strike-through emphasis for Org.") 3407 3408 Or we can just change the color of the line that strikes through the 3409 text to, for example, a shade of red: 3410 3411 (defface my-org-emphasis-strike-through 3412 '((((class color) (min-colors 88) (background light)) 3413 :strike-through "#972500") 3414 (((class color) (min-colors 88) (background dark)) 3415 :strike-through "#ef8b50")) 3416 "My strike-through emphasis for Org.") 3417 3418 It is possible to combine those effects: 3419 3420 (defface my-org-emphasis-strike-through 3421 '((((class color) (min-colors 88) (background light)) 3422 :strike-through "#972500" :foreground "#505050") 3423 (((class color) (min-colors 88) (background dark)) 3424 :strike-through "#ef8b50" :foreground "#a8a8a8")) 3425 "My strike-through emphasis for Org.") 3426 3427 One may inspect the variables ‘modus-themes-operandi-colors’ and 3428 ‘modus-themes-vivendi-colors’ for possible color values. Or call the 3429 command ‘modus-themes-list-colors’ to show a buffer that previews each 3430 entry in the palette. 3431 3432 *note Visualize the active Modus theme’s palette: Preview theme 3433 colors. 3434 3435 Once we have defined the faces we need, we must update the 3436 ‘org-emphasis-alist’. Given that ‘org-verbatim’ and ‘org-code’ are 3437 already styled by the themes, it probably is best not to edit them: 3438 3439 (setq org-emphasis-alist 3440 '(("*" my-org-emphasis-bold) 3441 ("/" my-org-emphasis-italic) 3442 ("_" my-org-emphasis-underline) 3443 ("=" org-verbatim verbatim) 3444 ("~" org-code verbatim) 3445 ("+" my-org-emphasis-strike-through))) 3446 3447 That’s it! For changes to take effect in already visited Org files, 3448 invoke ‘M-x org-mode-restart’. 3449 3450 3451 File: docGYh7V6.info, Node: Update Org block delimiter fontification, Next: Measure color contrast, Prev: Custom Org emphasis faces, Up: Advanced customization 3452 3453 5.16 Update Org block delimiter fontification 3454 ============================================= 3455 3456 As noted in the section about ‘modus-themes-org-blocks’, Org contains a 3457 variable that determines whether the block’s begin and end lines are 3458 extended to the edge of the window (*note Option for org-mode block 3459 styles: Org mode blocks.). The variable is 3460 ‘org-fontify-whole-block-delimiter-line’. 3461 3462 Users who change the style of Org blocks from time to time may prefer 3463 to automatically update delimiter line fontification, such as with the 3464 following setup: 3465 3466 (defun my-modus-themes-org-fontify-block-delimiter-lines () 3467 "Match `org-fontify-whole-block-delimiter-line' to theme style. 3468 Run this function at the post theme load phase, such as with the 3469 `modus-themes-after-load-theme-hook'." 3470 (if (eq modus-themes-org-blocks 'gray-background) 3471 (setq org-fontify-whole-block-delimiter-line t) 3472 (setq org-fontify-whole-block-delimiter-line nil))) 3473 3474 (add-hook 'modus-themes-after-load-theme-hook 3475 #'my-modus-themes-org-fontify-block-delimiter-lines) 3476 3477 Then ‘M-x org-mode-restart’ for changes to take effect, though manual 3478 intervention can be circumvented by tweaking the function thus: 3479 3480 (defun my-modus-themes-org-fontify-block-delimiter-lines () 3481 "Match `org-fontify-whole-block-delimiter-line' to theme style. 3482 Run this function at the post theme load phase, such as with the 3483 `modus-themes-after-load-theme-hook'." 3484 (if (eq modus-themes-org-blocks 'gray-background) 3485 (setq org-fontify-whole-block-delimiter-line t) 3486 (setq org-fontify-whole-block-delimiter-line nil)) 3487 (when (derived-mode-p 'org-mode) 3488 (font-lock-flush))) 3489 3490 3491 File: docGYh7V6.info, Node: Measure color contrast, Next: Load theme depending on time of day, Prev: Update Org block delimiter fontification, Up: Advanced customization 3492 3493 5.17 Measure color contrast 3494 =========================== 3495 3496 The themes provide the functions ‘modus-themes-wcag-formula’ and 3497 ‘modus-themes-contrast’. The former is a direct implementation of the 3498 WCAG formula: <https://www.w3.org/TR/WCAG20-TECHS/G18.html>. It 3499 calculates the relative luminance of a color value that is expressed in 3500 hexadecimal RGB notation. While the latter function is just a 3501 convenient wrapper for comparing the relative luminance between two 3502 colors. 3503 3504 In practice, one needs to work only with ‘modus-themes-contrast’. It 3505 accepts two color values and returns their contrast ratio. Values range 3506 from 1 to 21 (lowest to highest). The themes are designed to always be 3507 equal or higher than 7 for each combination of background and foreground 3508 that they use (this is the WCAG AAA standard—the most demanding of its 3509 kind). 3510 3511 A couple of examples (rounded numbers): 3512 3513 ;; Pure white with pure green 3514 (modus-themes-contrast "#ffffff" "#00ff00") 3515 ;; => 1.37 3516 ;; That is an outright inaccessible combo 3517 3518 ;; Pure black with pure green 3519 (modus-themes-contrast "#000000" "#00ff00") 3520 ;; => 15.3 3521 ;; That is a highly accessible combo 3522 3523 It does not matter which color value comes first. The ratio is 3524 always the same. 3525 3526 If one does not wish to read all the decimal points, it is possible 3527 to try something like this: 3528 3529 (format "%0.2f" (modus-themes-contrast "#000000" "#00ff00")) 3530 3531 While it is fine to perform such calculations on a case-by-case 3532 basis, it is preferable to implement formulas and tables for more 3533 demanding tasks. Such instruments are provided by ‘org-mode’ or 3534 ‘orgtbl-mode’, both of which are built into Emacs. Below is such a 3535 table that derives the contrast ratio of all colors in the first column 3536 (pure red, green, blue) relative to the color specified in the first row 3537 of the second column (pure white) and rounds the results: 3538 3539 | | #ffffff | 3540 |---------+---------| 3541 | #ff0000 | 4.00 | 3542 | #00ff00 | 1.37 | 3543 | #0000ff | 8.59 | 3544 #+tblfm: $2='(modus-themes-contrast $1 @1$2);%0.2f 3545 3546 To measure color contrast one needs to start from a known value. 3547 This typically is the background. The Modus themes define an expanded 3548 palette in large part because certain colors are only meant to be used 3549 in combination with some others. Consult the source code for the 3550 minutia and relevant commentary. 3551 3552 Such knowledge may prove valuable while attempting to customize the 3553 theme’s color palette. 3554 3555 3556 File: docGYh7V6.info, Node: Load theme depending on time of day, Next: Backdrop for pdf-tools, Prev: Measure color contrast, Up: Advanced customization 3557 3558 5.18 Load theme depending on time of day 3559 ======================================== 3560 3561 While we do provide ‘modus-themes-toggle’ to manually switch between the 3562 themes, users may also set up their system to perform such a task 3563 automatically at sunrise and sunset. 3564 3565 This can be accomplished by specifying the coordinates of one’s 3566 location using the built-in ‘solar.el’ and then configuring the 3567 ‘circadian’ package: 3568 3569 (use-package solar ; built-in 3570 :config 3571 (setq calendar-latitude 35.17 3572 calendar-longitude 33.36)) 3573 3574 (use-package circadian ; you need to install this 3575 :ensure t 3576 :after solar 3577 :config 3578 (setq circadian-themes '((:sunrise . modus-operandi) 3579 (:sunset . modus-vivendi))) 3580 (circadian-setup)) 3581 3582 3583 File: docGYh7V6.info, Node: Backdrop for pdf-tools, Next: Toggle themes without reloading them, Prev: Load theme depending on time of day, Up: Advanced customization 3584 3585 5.19 Backdrop for pdf-tools 3586 =========================== 3587 3588 Most PDF files use a white background for their page, making it 3589 impossible to discern the file’s boundaries in the buffer while using 3590 the Modus Operandi theme. To introduce a distinction between the 3591 buffer’s backdrop and the PDF page’s background, the former must be 3592 rendered as some shade of gray. Ideally, ‘pdf-tools’ would provide a 3593 face that the themes could support directly, though this does not seem 3594 to be the case for the time being. We must thus employ the face 3595 remapping technique that is documented elsewhere in this document to 3596 change the buffer-local value of the ‘default’ face. 3597 3598 *note Remap face with local value::. 3599 3600 To remap the buffer’s backdrop, we start with a function like this 3601 one: 3602 3603 (defun my-pdf-tools-backdrop () 3604 (modus-themes-with-colors 3605 (face-remap-add-relative 3606 'default 3607 `(:background ,bg-dim)))) 3608 3609 (add-hook 'pdf-tools-enabled-hook #'my-pdf-tools-backdrop) 3610 3611 The idea is to assign that function to a hook that gets called when 3612 ‘pdf-tools’ renders the document: ‘pdf-tools-enabled-hook’. This is 3613 enough when you only use one theme. However it has the downside of 3614 setting the background color value only at render time. In other words, 3615 the face remapping function does not get evaluated anew whenever the 3616 theme changes, such as upon invoking ‘M-x modus-themes-toggle’. 3617 3618 To have our face remapping adapt gracefully while switching between 3619 the Modus themes, we need to also account for the current theme and 3620 control the activation of ‘pdf-view-midnight-minor-mode’. To which end 3621 we arrive at something like the following, which builds on the above 3622 example: 3623 3624 (defun my-pdf-tools-backdrop () 3625 (modus-themes-with-colors 3626 (face-remap-add-relative 3627 'default 3628 `(:background ,bg-dim)))) 3629 3630 (defun my-pdf-tools-midnight-mode-toggle () 3631 (when (derived-mode-p 'pdf-view-mode) 3632 (if (eq (car custom-enabled-themes) 'modus-vivendi) 3633 (pdf-view-midnight-minor-mode 1) 3634 (pdf-view-midnight-minor-mode -1)) 3635 (my-pdf-tools-backdrop))) 3636 3637 (defun my-pdf-tools-themes-toggle () 3638 (mapc 3639 (lambda (buf) 3640 (with-current-buffer buf 3641 (my-pdf-tools-midnight-mode-toggle))) 3642 (buffer-list))) 3643 3644 (add-hook 'pdf-tools-enabled-hook #'my-pdf-tools-midnight-mode-toggle) 3645 (add-hook 'modus-themes-after-load-theme-hook #'my-pdf-tools-themes-toggle) 3646 3647 With those in place, PDFs have a distinct backdrop for their page, 3648 while buffers with major-mode as ‘pdf-view-mode’ automatically switches 3649 to dark mode when ‘modus-themes-toggle’ is called. 3650 3651 3652 File: docGYh7V6.info, Node: Toggle themes without reloading them, Next: A theme-agnostic hook for theme loading, Prev: Backdrop for pdf-tools, Up: Advanced customization 3653 3654 5.20 Toggle themes without reloading them 3655 ========================================= 3656 3657 Users who have a stable setup and who only ever need to toggle between 3658 the themes without triggering a full reload, are better off defining 3659 their own command which calls ‘enable-theme’ instead of ‘load-theme’: 3660 3661 (defun my-modus-themes-toggle () 3662 "Toggle between `modus-operandi' and `modus-vivendi' themes. 3663 This uses `enable-theme' instead of the standard method of 3664 `load-theme'. The technicalities are covered in the Modus themes 3665 manual." 3666 (interactive) 3667 (pcase (modus-themes--current-theme) 3668 ('modus-operandi (progn (enable-theme 'modus-vivendi) 3669 (disable-theme 'modus-operandi))) 3670 ('modus-vivendi (progn (enable-theme 'modus-operandi) 3671 (disable-theme 'modus-vivendi))) 3672 (_ (error "No Modus theme is loaded; evaluate `modus-themes-load-themes' first")))) 3673 3674 *note Differences between loading and enabling::. 3675 3676 Recall that ‘modus-themes-toggle’ uses ‘load-theme’. 3677 3678 3679 File: docGYh7V6.info, Node: A theme-agnostic hook for theme loading, Next: Use more spacious margins or padding in Emacs frames, Prev: Toggle themes without reloading them, Up: Advanced customization 3680 3681 5.21 A theme-agnostic hook for theme loading 3682 ============================================ 3683 3684 The themes are designed with the intent to be useful to Emacs users of 3685 varying skill levels, from beginners to experts. This means that we try 3686 to make things easier by not expecting anyone reading this document to 3687 be proficient in Emacs Lisp or programming in general. 3688 3689 Such a case is with the use of ‘modus-themes-after-load-theme-hook’, 3690 which runs after the ‘modus-themes-load-theme’ function (used by the 3691 command ‘modus-themes-toggle’). We recommend using that hook for 3692 advanced customizations, because (1) we know for sure that it is 3693 available once the themes are loaded, and (2) anyone consulting this 3694 manual, especially the sections on enabling and loading the themes, will 3695 be in a good position to benefit from that hook. 3696 3697 Advanced users who have a need to switch between the Modus themes and 3698 other items will find that such a hook does not meet their requirements: 3699 it only works with the Modus themes and only with the aforementioned 3700 functions. 3701 3702 A theme-agnostic setup can be configured thus: 3703 3704 (defvar after-enable-theme-hook nil 3705 "Normal hook run after enabling a theme.") 3706 3707 (defun run-after-enable-theme-hook (&rest _args) 3708 "Run `after-enable-theme-hook'." 3709 (run-hooks 'after-enable-theme-hook)) 3710 3711 (advice-add 'enable-theme :after #'run-after-enable-theme-hook) 3712 3713 This creates the ‘after-enable-theme-hook’ and makes it run after 3714 each call to ‘enable-theme’, which means that it will work for all 3715 themes and also has the benefit that it does not depend on functions 3716 such as ‘modus-themes-toggle’ and the others mentioned above. 3717 ‘enable-theme’ is called internally by ‘load-theme’, so the hook works 3718 everywhere. 3719 3720 The downside of the theme-agnostic hook is that any functions added 3721 to it will likely not be able to benefit from macro calls that read the 3722 active theme, such as ‘modus-themes-with-colors’. Not all Emacs themes 3723 have the same capabilities. 3724 3725 In this document, we cover ‘modus-themes-after-load-theme-hook’ 3726 though the user can replace it with ‘after-enable-theme-hook’ should 3727 they need to (provided they understand the implications). 3728 3729 3730 File: docGYh7V6.info, Node: Use more spacious margins or padding in Emacs frames, Next: Custom hl-todo colors, Prev: A theme-agnostic hook for theme loading, Up: Advanced customization 3731 3732 5.22 Use more spacious margins or padding in Emacs frames 3733 ========================================================= 3734 3735 [ UPDATE 2023-06-25: Instead of following these instructions, you can 3736 simply install my ‘spacious-padding’ package from GNU ELPA. It 3737 implements the padding and provides relevant user options. ] 3738 3739 By default, Emacs frames try to maximize the number of characters 3740 that fit in the current visible portion of the buffer. Users may prefer 3741 to have some extra padding instead. This can make Emacs frames look 3742 more pleasant, but also make it easier to identify the currently active 3743 window. 3744 3745 The way to implement such padding is two-fold: 3746 3747 1. In the ‘early-init.el’ file instruct Emacs to use a higher value 3748 for the ‘internal-border-width’ of all frames, as well as for the 3749 ‘right-divider-width’. The former concerns the outer boundaries of 3750 Emacs frames, while the latter pertains to dividers between Emacs 3751 windows. 3752 3753 2. Make the relevant faces invisible by changing the value of their 3754 relevant attributes to that of the current theme’s main background. 3755 3756 The parameters of Emacs frames are specified in the variables 3757 ‘initial-frame-alist’ and ‘default-frame-alist’. The “initial frame” 3758 refers to the first frame that appears on Emacs startup. The “default” 3759 refers to the fallback values that apply to all other frames that Emacs 3760 creates (unless those are explicitly overridden by a bespoke 3761 ‘make-frame’ call). 3762 3763 In detail, first we use the same values for the two frame alist 3764 variables: 3765 3766 ;; This must go in the early-init.el so that it applies to the initial 3767 ;; frame. 3768 (dolist (var '(default-frame-alist initial-frame-alist)) 3769 (add-to-list var '(right-divider-width . 20)) 3770 (add-to-list var '(internal-border-width . 20))) 3771 3772 What the ‘dolist’ does is to call ‘add-to-list’ for the two variables 3773 we specify there. This economizes on typing. 3774 3775 Then we define a function that makes the relevant faces invisible. 3776 The reason we do this with a function is so we can hook it to the “post 3777 load” phase of a theme, thus applying the new background value 3778 (otherwise you keep the old background, which likely means that the 3779 faces will no longer be invisible). 3780 3781 (defun my-modus-themes-invisible-dividers () 3782 "Make window dividers invisible. 3783 Add this to the `modus-themes-post-load-hook'." 3784 (let ((bg (face-background 'default))) 3785 (custom-set-faces 3786 `(fringe ((t :background ,bg :foreground ,bg))) 3787 `(window-divider ((t :background ,bg :foreground ,bg))) 3788 `(window-divider-first-pixel ((t :background ,bg :foreground ,bg))) 3789 `(window-divider-last-pixel ((t :background ,bg :foreground ,bg)))))) 3790 3791 (add-hook 'modus-themes-post-load-hook #'my-modus-themes-invisible-dividers) 3792 3793 The above will work only for themes that belong to the Modus family. 3794 For users of Emacs version 29 or higher, there exists a theme-agnostic 3795 hook that takes a function with one argument—that of the theme—and calls 3796 in the the “post enable” phase of theme loading. Here is the above 3797 snippet, with the necessary tweaks: 3798 3799 (defun my-modus-themes-invisible-dividers (_theme) 3800 "Make window dividers for THEME invisible." 3801 (let ((bg (face-background 'default))) 3802 (custom-set-faces 3803 `(fringe ((t :background ,bg :foreground ,bg))) 3804 `(window-divider ((t :background ,bg :foreground ,bg))) 3805 `(window-divider-first-pixel ((t :background ,bg :foreground ,bg))) 3806 `(window-divider-last-pixel ((t :background ,bg :foreground ,bg)))))) 3807 3808 (add-hook 'enable-theme-functions #'my-modus-themes-invisible-dividers) 3809 3810 Users of older versions of Emacs can read the entry herein about 3811 defining their own theme-agnostic hook (*note A theme-agnostic hook for 3812 theme loading::). 3813 3814 3815 File: docGYh7V6.info, Node: Custom hl-todo colors, Next: Add support for solaire-mode, Prev: Use more spacious margins or padding in Emacs frames, Up: Advanced customization 3816 3817 5.23 Custom hl-todo colors 3818 ========================== 3819 3820 The ‘hl-todo’ package provides the user option ‘hl-todo-keyword-faces’: 3821 it specifies a pair of keyword and corresponding color value. The Modus 3822 themes configure that option in the interest of legibility. While this 3823 works for our purposes, users may still prefer to apply their custom 3824 values, in which case the following approach is necessary: 3825 3826 (defun my-modus-themes-hl-todo-faces () 3827 (setq hl-todo-keyword-faces '(("TODO" . "#ff0000") 3828 ("HACK" . "#ffff00") 3829 ("XXX" . "#00ffff") 3830 ("NOTE" . "#ff00ff")))) 3831 3832 (add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-hl-todo-faces) 3833 3834 Or include a ‘let’ form, if needed: 3835 3836 (defun my-modus-themes-hl-todo-faces () 3837 (let ((red "#ff0000") 3838 (blue "#0000ff")) 3839 (setq hl-todo-keyword-faces `(("TODO" . ,blue) 3840 ("HACK" . ,red) 3841 ("XXX" . ,red) 3842 ("NOTE" . ,blue))))) 3843 3844 (add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-hl-todo-faces) 3845 3846 Normally, we do not touch user options, though this is an exception: 3847 otherwise the defaults are not always legible. 3848 3849 3850 File: docGYh7V6.info, Node: Add support for solaire-mode, Prev: Custom hl-todo colors, Up: Advanced customization 3851 3852 5.24 Add support for solaire-mode 3853 ================================= 3854 3855 The ‘solaire-mode’ package dims the background of what it considers 3856 ancillary “UI” buffers, such as the minibuffer and Dired buffers. The 3857 Modus themes used to support Solaire on the premise that the user was 3858 (i) opting in to it, (ii) understood why certain buffers were more gray, 3859 and (iii) knew what other adjustments had to be made to prevent broken 3860 visuals (e.g. the default style of the ‘modus-themes-completions’ uses 3861 a subtle gray background for the selection, which with Solaire becomes 3862 practically invisible). 3863 3864 However, the assumption that users opt in to this feature does not 3865 always hold true. There are cases where it is enabled by defaultsuch as 3866 in the popular Doom Emacs configuration. Thus, the unsuspecting user 3867 who loads ‘modus-operandi’ or ‘modus-vivendi’ without the requisite 3868 customizations is getting a sub-par experience; an experience that we 3869 did not intend and cannot genuinely fix. 3870 3871 Because the Modus themes are meant to work everywhere, we cannot make 3872 an exception for Doom Emacs and/or Solaire users. Furthermore, we shall 3873 not introduce hacks, such as by adding a check in all relevant faces to 3874 be adjusted based on Solaire or whatever other package. Hacks of this 3875 sort are unsustainable and penalize the entire userbase. Besides, the 3876 themes are built into Emacs and we must keep their standard high. 3877 3878 The fundamental constraint with Solaire is that Emacs does not have a 3879 real distinction between “content” and “UI” buffers. For themes to work 3880 with Solaire, they need to be designed around that package. Such is an 3881 arrangement that compromises on our accessibility standards and/or 3882 hinders our efforts to provide the best possible experience while using 3883 the Modus themes. 3884 3885 As such, ‘solaire-mode’ is not—and will not be—supported by the Modus 3886 themes (or any other of my themes, for that matter). Users who want it 3887 must style the faces manually. Below is some sample code, based on what 3888 we cover at length elsewhere in this manual: 3889 3890 *note Advanced customization::. 3891 3892 *note Use theme colors in code with modus-themes-with-colors::. 3893 3894 (defun my-modus-themes-custom-faces () 3895 (modus-themes-with-colors 3896 (custom-set-faces 3897 `(solaire-default-face ((,c :inherit default :background ,bg-dim :foreground ,fg-dim))) 3898 `(solaire-line-number-face ((,c :inherit solaire-default-face :foreground ,fg-unfocused))) 3899 `(solaire-hl-line-face ((,c :background ,bg-active))) 3900 `(solaire-org-hide-face ((,c :background ,bg-dim :foreground ,bg-dim)))))) 3901 3902 (add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces) 3903 3904 As always, re-load the theme for changes to take effect. 3905 3906 3907 File: docGYh7V6.info, Node: Face coverage, Next: Notes on individual packages, Prev: Advanced customization, Up: Top 3908 3909 6 Face coverage 3910 *************** 3911 3912 The Modus themes try to provide as close to full face coverage as 3913 possible. This is necessary to ensure a consistently accessible reading 3914 experience across all available interfaces. 3915 3916 * Menu: 3917 3918 * Supported packages:: Full list of covered face groups 3919 * Indirectly covered packages:: 3920 3921 3922 File: docGYh7V6.info, Node: Supported packages, Next: Indirectly covered packages, Up: Face coverage 3923 3924 6.1 Full support for packages or face groups 3925 ============================================ 3926 3927 This list will always be updated to reflect the current state of the 3928 project. The idea is to offer an overview of the known status of all 3929 affected face groups. The items with an appended asterisk ‘*’ tend to 3930 have lots of extensions, so the “full support” may not be 100% true… 3931 3932 • ace-window 3933 • agda2-mode 3934 • all-the-icons 3935 • all-the-icons-dired 3936 • all-the-icons-ibuffer 3937 • annotate 3938 • ansi-color 3939 • anzu 3940 • auctex and TeX 3941 • auto-dim-other-buffers 3942 • avy 3943 • bbdb 3944 • binder 3945 • breadcrumb 3946 • bongo 3947 • boon 3948 • bookmark 3949 • calendar and diary 3950 • centaur-tabs 3951 • change-log and log-view (such as ‘vc-print-log’, 3952 ‘vc-print-root-log’) 3953 • chart 3954 • cider 3955 • circe 3956 • citar 3957 • clojure-mode 3958 • column-enforce-mode 3959 • company-mode* 3960 • compilation-mode 3961 • completions 3962 • consult 3963 • corfu 3964 • corfu-candidate-overlay 3965 • corfu-quick 3966 • counsel* 3967 • cperl-mode 3968 • crontab-mode 3969 • csv-mode 3970 • ctrlf 3971 • custom (what you get with ‘M-x customize’) 3972 • dashboard 3973 • deadgrep 3974 • deft 3975 • devdocs 3976 • dictionary 3977 • diff-hl 3978 • diff-mode 3979 • dim-autoload 3980 • dired 3981 • dired-async 3982 • dired-git 3983 • dired-git-info 3984 • dired-narrow 3985 • dired-subtree 3986 • diredfl 3987 • disk-usage 3988 • display-fill-column-indicator-mode 3989 • doom-modeline 3990 • ediff 3991 • ein (Emacs IPython Notebook) 3992 • eglot 3993 • el-search 3994 • eldoc-box 3995 • elfeed 3996 • elfeed-score 3997 • elpher 3998 • embark 3999 • ement 4000 • emms 4001 • enh-ruby-mode (enhanced-ruby-mode) 4002 • epa 4003 • erc 4004 • ert 4005 • erts-mode 4006 • eshell 4007 • eshell-fringe-status 4008 • evil* (evil-mode) 4009 • eww 4010 • exwm 4011 • eyebrowse 4012 • flycheck 4013 • flycheck-color-mode-line 4014 • flycheck-indicator 4015 • flymake 4016 • flyspell 4017 • flx 4018 • focus 4019 • fold-this 4020 • font-lock (generic syntax highlighting) 4021 • geiser 4022 • git-commit 4023 • git-gutter (and variants) 4024 • git-rebase 4025 • git-timemachine 4026 • gnus 4027 • gotest 4028 • golden-ratio-scroll-screen 4029 • helpful 4030 • highlight-numbers 4031 • highlight-parentheses (*note Note on highlight-parentheses.el: Note 4032 on highlight-parenthesesel.) 4033 • highlight-thing 4034 • hl-fill-column 4035 • hl-line-mode 4036 • hl-todo 4037 • hydra 4038 • ibuffer 4039 • icomplete 4040 • ido-mode 4041 • iedit 4042 • iflipb 4043 • image-dired 4044 • imenu-list 4045 • indium 4046 • info 4047 • info+ (info-plus) 4048 • info-colors 4049 • ioccur 4050 • isearch, occur, etc. 4051 • ivy* 4052 • ivy-posframe 4053 • japanese-holidays 4054 • jira (org-jira) 4055 • jit-spell 4056 • jinx 4057 • journalctl-mode 4058 • js2-mode 4059 • julia 4060 • kaocha-runner 4061 • keycast 4062 • ledger-mode 4063 • leerzeichen 4064 • line numbers (‘display-line-numbers-mode’ and global variant) 4065 • magit 4066 • make-mode 4067 • man 4068 • marginalia 4069 • markdown-mode 4070 • markup-faces (‘adoc-mode’) 4071 • messages 4072 • minimap 4073 • mode-line 4074 • mood-line 4075 • mpdel 4076 • mu4e 4077 • multiple-cursors 4078 • nerd-icons 4079 • nerd-icons-completion 4080 • nerd-icons-dired 4081 • nerd-icons-ibuffer 4082 • neotree 4083 • notmuch 4084 • num3-mode 4085 • nxml-mode 4086 • olivetti 4087 • orderless 4088 • org* 4089 • org-journal 4090 • org-noter 4091 • org-pomodoro 4092 • org-recur 4093 • org-roam 4094 • org-superstar 4095 • org-table-sticky-header 4096 • org-tree-slide 4097 • origami 4098 • outline-mode 4099 • outline-minor-faces 4100 • package (what you get with ‘M-x list-packages’) 4101 • page-break-lines 4102 • pandoc-mode 4103 • paren-face 4104 • pass 4105 • pdf-tools 4106 • persp-mode 4107 • perspective 4108 • popup 4109 • powerline 4110 • prism (*note Note for prism.el: Note for prism.) 4111 • prescient 4112 • proced 4113 • prodigy 4114 • pulse 4115 • pyim 4116 • quick-peek 4117 • rainbow-delimiters 4118 • rcirc 4119 • rcirc-color 4120 • recursion-indicator 4121 • regexp-builder (also known as ‘re-builder’) 4122 • rg (rg.el) 4123 • ripgrep 4124 • rmail 4125 • rst-mode 4126 • ruler-mode 4127 • sesman 4128 • shell-script-mode 4129 • shortdoc 4130 • show-paren-mode 4131 • shr 4132 • side-notes 4133 • sieve-mode 4134 • skewer-mode 4135 • slime (slbd) 4136 • sly 4137 • smart-mode-line 4138 • smerge 4139 • speedbar 4140 • spell-fu 4141 • stripes 4142 • suggest 4143 • switch-window 4144 • swiper 4145 • symbol-overlay 4146 • syslog-mode 4147 • tab-bar-mode 4148 • tab-line-mode 4149 • table (built-in ‘table.el’) 4150 • telega 4151 • terraform-mode 4152 • term 4153 • textsec 4154 • transient (pop-up windows such as Magit’s) 4155 • trashed 4156 • tree-sitter 4157 • tty-menu 4158 • tuareg 4159 • typescript 4160 • undo-tree 4161 • vc (‘vc-dir.el’, ‘vc-hooks.el’) 4162 • vertico 4163 • vertico-quick 4164 • vimish-fold 4165 • visible-mark 4166 • visual-regexp 4167 • vterm 4168 • vundo 4169 • wcheck-mode 4170 • web-mode 4171 • wgrep 4172 • which-function-mode 4173 • which-key 4174 • whitespace-mode 4175 • window-divider-mode 4176 • writegood-mode 4177 • woman 4178 • xah-elisp-mode 4179 • xterm-color (and ansi-colors) 4180 • yaml-mode 4181 • yasnippet 4182 4183 Plus many other miscellaneous faces that are provided by Emacs. 4184 4185 4186 File: docGYh7V6.info, Node: Indirectly covered packages, Prev: Supported packages, Up: Face coverage 4187 4188 6.2 Indirectly covered packages 4189 =============================== 4190 4191 These do not require any extra styles because they are configured to 4192 inherit from some basic faces or their dependencies which are directly 4193 supported by the themes. 4194 4195 • ag 4196 • apropos 4197 • apt-sources-list 4198 • bbdb 4199 • bm 4200 • breakpoint (provided by the built-in ‘gdb-mi.el’ library) 4201 • buffer-expose 4202 • bufler 4203 • counsel-notmuch 4204 • counsel-org-capture-string 4205 • css-mode 4206 • dashboard (emacs-dashboard) 4207 • define-word 4208 • denote 4209 • disk-usage 4210 • dtache 4211 • dynamic-ruler 4212 • easy-kill 4213 • ebdb 4214 • edit-indirect 4215 • egerrit 4216 • elfeed-summary 4217 • evil-owl 4218 • flyspell-correct 4219 • fortran-mode 4220 • freeze-it 4221 • forge 4222 • git-walktree 4223 • goggles 4224 • highlight-defined 4225 • highlight-escape-sequences (‘hes-mode’) 4226 • icomplete-vertical 4227 • i3wm-config-mode 4228 • lin 4229 • minibuffer-line 4230 • no-emoji 4231 • org-remark 4232 • parrot 4233 • perl-mode 4234 • php-mode 4235 • pulsar 4236 • rjsx-mode 4237 • side-hustle 4238 • spell-fu 4239 • swift-mode 4240 • tab-bar-echo-area 4241 • tide 4242 • undo-hl 4243 • vdiff 4244 • vertico-indexed 4245 • vertico-mouse 4246 • xref 4247 4248 4249 File: docGYh7V6.info, Node: Notes on individual packages, Next: Frequently Asked Questions, Prev: Face coverage, Up: Top 4250 4251 7 Notes on individual packages 4252 ****************************** 4253 4254 This section covers information that may be of interest to users of 4255 individual packages. 4256 4257 * Menu: 4258 4259 * Note on calendar.el weekday and weekend colors: Note on calendarel weekday and weekend colors. 4260 * Note on git-gutter in Doom Emacs:: 4261 * Note on php-mode multiline comments:: 4262 * Note on underlines in compilation buffers:: 4263 * Note on inline Latex in Org buffers:: 4264 * Note on dimmer.el: Note on dimmerel. 4265 * Note on display-fill-column-indicator-mode:: 4266 * Note on highlight-parentheses.el: Note on highlight-parenthesesel. 4267 * Note on mmm-mode.el background colors: Note on mmm-modeel background colors. 4268 * Note for prism:: 4269 * Note on company-mode overlay pop-up:: 4270 * Note on ERC escaped color sequences:: 4271 * Note on powerline or spaceline:: 4272 * Note on SHR colors:: 4273 * Note on SHR fonts:: 4274 * Note on Ement colors and fonts:: 4275 * Note on pdf-tools link hints:: 4276 * Note on the Notmuch logo:: 4277 * Note on goto-address-mode faces:: 4278 4279 4280 File: docGYh7V6.info, Node: Note on calendarel weekday and weekend colors, Next: Note on git-gutter in Doom Emacs, Up: Notes on individual packages 4281 4282 7.1 Note on calendar.el weekday and weekend colors 4283 ================================================== 4284 4285 By default, the ‘M-x calendar’ interface differentiates weekdays from 4286 weekends by applying a gray color to the former and a faint red to the 4287 latter. The idea for this approach is that the weekend should serve as 4288 a subtle warning that no work is supposed to be done on that day, per 4289 the design of traditional calendars. 4290 4291 Users who prefer all days to look the same can configure the variable 4292 ‘calendar-weekend-days’ to either use gray of weekdays or the faint red 4293 of weekends uniformly. 4294 4295 ;; All are treated like weekdays (gray color) 4296 (setq calendar-weekend-days nil) 4297 4298 ;; All are treated like weekends (red-faint color) 4299 (setq calendar-weekend-days (number-sequence 0 6)) 4300 4301 ;; The default marks the Saturday and Sunday as the weekend 4302 (setq calendar-weekend-days '(0 6)) 4303 4304 For changes to take effect, the Calendar buffer needs to be generated 4305 anew. 4306 4307 4308 File: docGYh7V6.info, Node: Note on git-gutter in Doom Emacs, Next: Note on php-mode multiline comments, Prev: Note on calendarel weekday and weekend colors, Up: Notes on individual packages 4309 4310 7.2 Note on git-gutter in Doom Emacs 4311 ==================================== 4312 4313 The ‘git-gutter’ and ‘git-gutter-fr’ packages default to drawing bitmaps 4314 for the indicators they display (e.g. bitmap of a plus sign for added 4315 lines). In Doom Emacs, these bitmaps are replaced with contiguous lines 4316 which may look nicer, but require a change to the foreground of the 4317 relevant faces to yield the desired color combinations. 4318 4319 Since this is Doom-specific, we urge users to apply changes in their 4320 local setup. Below is some sample code, based on what we cover at 4321 length elsewhere in this manual: 4322 4323 *note Advanced customization::. 4324 4325 *note Use theme colors in code with modus-themes-with-colors::. 4326 4327 (defun my-modus-themes-custom-faces () 4328 (modus-themes-with-colors 4329 (custom-set-faces 4330 ;; Make foreground the same as background for a uniform bar on 4331 ;; Doom Emacs. 4332 ;; 4333 ;; Doom should not be implementing such hacks because themes 4334 ;; cannot support them: 4335 ;; <https://protesilaos.com/codelog/2022-08-04-doom-git-gutter-modus-themes/>. 4336 `(git-gutter-fr:added ((,c :foreground ,bg-added-fringe))) 4337 `(git-gutter-fr:deleted ((,c :foreground ,bg-removed-fringe))) 4338 `(git-gutter-fr:modified ((,c :foreground ,bg-changed-fringe)))))) 4339 4340 (add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces) 4341 4342 As always, re-load the theme for changes to take effect. 4343 4344 If the above does not work, try this instead: 4345 4346 (after! modus-themes 4347 (modus-themes-with-colors 4348 (custom-set-faces 4349 ;; Make foreground the same as background for a uniform bar on 4350 ;; Doom Emacs. 4351 ;; 4352 ;; Doom should not be implementing such hacks because themes 4353 ;; cannot support them: 4354 ;; <https://protesilaos.com/codelog/2022-08-04-doom-git-gutter-modus-themes/>. 4355 `(git-gutter-fr:added ((,c :foreground ,bg-added-intense))) 4356 `(git-gutter-fr:deleted ((,c :foreground ,bg-removed-intense))) 4357 `(git-gutter-fr:modified ((,c :foreground ,bg-changed-intense)))))) 4358 4359 4360 File: docGYh7V6.info, Node: Note on php-mode multiline comments, Next: Note on underlines in compilation buffers, Prev: Note on git-gutter in Doom Emacs, Up: Notes on individual packages 4361 4362 7.3 Note on php-mode multiline comments 4363 ======================================= 4364 4365 Depending on your build of Emacs and/or the environment it runs in, 4366 multiline comments in PHP with the ‘php-mode’ package use the 4367 ‘font-lock-doc-face’ instead of ‘font-lock-comment-face’. 4368 4369 This seems to make all comments use the appropriate face: 4370 4371 (defun my-multine-comments () 4372 (setq-local c-doc-face-name 'font-lock-comment-face)) 4373 4374 (add-hook 'php-mode-hook #'my-multine-comments) 4375 4376 As always, re-load the theme for changes to take effect. 4377 4378 4379 File: docGYh7V6.info, Node: Note on underlines in compilation buffers, Next: Note on inline Latex in Org buffers, Prev: Note on php-mode multiline comments, Up: Notes on individual packages 4380 4381 7.4 Note on underlines in compilation buffers 4382 ============================================= 4383 4384 Various buffers that produce compilation results or run tests on code 4385 apply an underline to the file names they reference or to relevant 4386 messages. Users may consider this unnecessary or excessive. 4387 4388 To outright disable the effect, use this (buffers need to be 4389 generated anew): 4390 4391 (setq compilation-message-face nil) 4392 4393 If some element of differentiation is still desired, a good option is 4394 to render the affected text with the ‘italic’ face: 4395 4396 (setq compilation-message-face 'italic) 4397 4398 *note Configure bold and italic faces::. 4399 4400 4401 File: docGYh7V6.info, Node: Note on inline Latex in Org buffers, Next: Note on dimmerel, Prev: Note on underlines in compilation buffers, Up: Notes on individual packages 4402 4403 7.5 Note on inline Latex in Org buffers 4404 ======================================= 4405 4406 Org can work with inline latex and related syntax. To actually fontify 4407 those constructs, set the variable ‘org-highlight-latex-and-related’ to 4408 the desired list of values (per its doc string). For example: 4409 4410 (setq org-highlight-latex-and-related '(latex script)) 4411 4412 Remember to use ‘M-x org-mode-restart’ for changes to take effect. 4413 4414 4415 File: docGYh7V6.info, Node: Note on dimmerel, Next: Note on display-fill-column-indicator-mode, Prev: Note on inline Latex in Org buffers, Up: Notes on individual packages 4416 4417 7.6 Note on dimmer.el 4418 ===================== 4419 4420 The ‘dimmer.el’ library by Neil Okamoto can be configured to 4421 automatically dim the colors of inactive Emacs windows. To guarantee 4422 consistent results with the Modus themes, we suggest some tweaks to the 4423 default styles, such as in this minimal setup: 4424 4425 (use-package dimmer 4426 :config 4427 (setq dimmer-fraction 0.3) 4428 (setq dimmer-adjustment-mode :foreground) 4429 (setq dimmer-use-colorspace :rgb) 4430 4431 (dimmer-mode 1)) 4432 4433 Of the above, we strongly recommend the RGB color space because it is 4434 the one that remains faithful to the hueness of the colors used by the 4435 themes. Whereas the default CIELAB space has a tendency to distort 4436 colors in addition to applying the dim effect, which can be somewhat 4437 disorienting. 4438 4439 The value of the ‘dimmer-fraction’ has been selected empirically. 4440 Users might prefer to tweak it further (increasing it makes the dim 4441 effect more pronounced). 4442 4443 Changing the ‘dimmer-adjustment-mode’ is a matter of preference. 4444 Though because the Modus themes use black and white as their base 4445 colors, any other value for that variable will turn the main background 4446 gray. This inadvertently leads to the opposite of the intended utility 4447 of this package: it draws too much attention to unfocused windows. 4448 4449 4450 File: docGYh7V6.info, Node: Note on display-fill-column-indicator-mode, Next: Note on highlight-parenthesesel, Prev: Note on dimmerel, Up: Notes on individual packages 4451 4452 7.7 Note on display-fill-column-indicator-mode 4453 ============================================== 4454 4455 The ‘display-fill-column-indicator-mode’ uses a typographic character to 4456 draw its line. This has the downside of creating a dashed line. The 4457 dashes are further apart depending on how tall the font’s glyph height 4458 is and what integer the ‘line-spacing’ is set to. 4459 4460 At the theme level we eliminate this effect by making the character 4461 one pixel tall: the line is contiguous. Users who prefer the dashed 4462 line are advised to change the ‘fill-column-indicator’ face, as 4463 explained elsewhere in this document. For example: 4464 4465 (modus-themes-with-colors 4466 (custom-set-faces 4467 `(fill-column-indicator ((,c :foreground ,bg-active))))) 4468 4469 *note Use theme colors in code with modus-themes-with-colors::. 4470 4471 To make the line thicker, set the height to be equal to the base font 4472 size instead of the one pixel we use. This is done by specifying a rate 4473 instead of an absolute number, as in ‘:height 1.0’ versus ‘:height 1’. 4474 For example: 4475 4476 (modus-themes-with-colors 4477 (custom-set-faces 4478 `(fill-column-indicator ((,c :height 1.0 :background ,bg-inactive :foreground ,bg-inactive))))) 4479 4480 4481 File: docGYh7V6.info, Node: Note on highlight-parenthesesel, Next: Note on mmm-modeel background colors, Prev: Note on display-fill-column-indicator-mode, Up: Notes on individual packages 4482 4483 7.8 Note on highlight-parentheses.el 4484 ==================================== 4485 4486 The ‘highlight-parentheses’ package provides contextual coloration of 4487 surrounding parentheses, highlighting only those which are around the 4488 point. The package expects users to customize the applicable colors on 4489 their own by configuring certain variables. 4490 4491 To make the Modus themes work as expected with this, we need to use 4492 some of the techniques that are discussed at length in the various 4493 “Do-It-Yourself” (DIY) sections, which provide insight into the more 4494 advanced customization options of the themes. 4495 4496 *note Advanced customization::. 4497 4498 In the following example, we are assuming that the user wants to (i) 4499 re-use color variables provided by the themes, (ii) be able to retain 4500 their tweaks while switching between ‘modus-operandi’ and 4501 ‘modus-vivendi’, and (iii) have the option to highlight either the 4502 foreground of the parentheses or the background as well. 4503 4504 We start by defining our own variable, which will serve as a toggle 4505 between foreground and background coloration styles: 4506 4507 (defvar my-highlight-parentheses-use-background t 4508 "Prefer `highlight-parentheses-background-colors'.") 4509 4510 Then we can update our preference with this: 4511 4512 ;; Set to nil to disable backgrounds. 4513 (setq my-highlight-parentheses-use-background nil) 4514 4515 To re-use colors from the themes, we must wrap our code in the 4516 ‘modus-themes-with-colors’ macro. Our implementation must interface 4517 with the variables ‘highlight-parentheses-background-colors’ and/or 4518 ‘highlight-parentheses-colors’. 4519 4520 So we can have something like this (the doc string of 4521 ‘modus-themes-with-colors’ explains where the names of the colors can be 4522 found): 4523 4524 (modus-themes-with-colors 4525 ;; Our preference for setting either background or foreground 4526 ;; styles, depending on `my-highlight-parentheses-use-background'. 4527 (if my-highlight-parentheses-use-background 4528 4529 ;; Here we set color combinations that involve both a background 4530 ;; and a foreground value. 4531 (setq highlight-parentheses-background-colors (list bg-cyan-intense 4532 bg-magenta-intense 4533 bg-green-intense 4534 bg-yellow-intense) 4535 highlight-parentheses-colors (list cyan 4536 magenta 4537 green 4538 yellow)) 4539 4540 ;; And here we pass only foreground colors while disabling any 4541 ;; backgrounds. 4542 (setq highlight-parentheses-colors (list green-intense 4543 magenta-intense 4544 blue-intense 4545 red-intense) 4546 highlight-parentheses-background-colors nil))) 4547 4548 ;; Include this if you also want to make the parentheses bold: 4549 (set-face-attribute 'highlight-parentheses-highlight nil :inherit 'bold) 4550 4551 ;; Our changes must be evaluated before enabling the relevant mode, so 4552 ;; this comes last. 4553 (global-highlight-parentheses-mode 1) 4554 4555 For our changes to persist while switching between the Modus themes, 4556 we need to include them in a function which can then get passed to 4557 ‘modus-themes-after-load-theme-hook’. This is the complete 4558 implementation: 4559 4560 ;; Configurations for `highlight-parentheses': 4561 (require 'highlight-parentheses) 4562 4563 (defvar my-highlight-parentheses-use-background t 4564 "Prefer `highlight-parentheses-background-colors'.") 4565 4566 (setq my-highlight-parentheses-use-background nil) ; Set to nil to disable backgrounds 4567 4568 (defun my-modus-themes-highlight-parentheses () 4569 (modus-themes-with-colors 4570 ;; Our preference for setting either background or foreground 4571 ;; styles, depending on `my-highlight-parentheses-use-background'. 4572 (if my-highlight-parentheses-use-background 4573 4574 ;; Here we set color combinations that involve both a background 4575 ;; and a foreground value. 4576 (setq highlight-parentheses-background-colors (list bg-cyan-intense 4577 bg-magenta-intense 4578 bg-green-intense 4579 bg-yellow-intense) 4580 highlight-parentheses-colors (list cyan 4581 magenta 4582 green 4583 yellow)) 4584 4585 ;; And here we pass only foreground colors while disabling any 4586 ;; backgrounds. 4587 (setq highlight-parentheses-colors (list green-intense 4588 magenta-intense 4589 blue-intense 4590 red-intense) 4591 highlight-parentheses-background-colors nil))) 4592 4593 ;; Include this if you also want to make the parentheses bold: 4594 (set-face-attribute 'highlight-parentheses-highlight nil :inherit 'bold) 4595 4596 ;; Our changes must be evaluated before enabling the relevant mode, so 4597 ;; this comes last. 4598 (global-highlight-parentheses-mode 1)) 4599 4600 (add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-highlight-parentheses) 4601 4602 As always, re-load the theme for changes to take effect. 4603 4604 4605 File: docGYh7V6.info, Node: Note on mmm-modeel background colors, Next: Note for prism, Prev: Note on highlight-parenthesesel, Up: Notes on individual packages 4606 4607 7.9 Note on mmm-mode.el background colors 4608 ========================================= 4609 4610 The faces used by ‘mmm-mode.el’ are expected to have a colorful 4611 background, while they should not touch any foreground value. The idea 4612 is that they must not interfere with existing fontification. Those 4613 background colors need to be distinct from each other, such as an 4614 unambiguous red juxtaposed with a clear blue. 4615 4616 While this design may be internally consistent with the raison d’être 4617 of that library, it inevitably produces inaccessible color combinations. 4618 4619 There are two competing goals at play: 4620 4621 1. Legibility of the text, understood as the contrast ratio between 4622 the background and the foreground. 4623 4624 2. Semantic precision of each face which entails faithfulness to 4625 color-coding of the underlying background. 4626 4627 As the Modus themes are designed with the express purpose of 4628 conforming with the first point, we have to forgo the apparent 4629 color-coding of the background elements. Instead we use subtle colors 4630 that do not undermine the legibility of the affected text while they 4631 still offer a sense of added context. 4632 4633 Users who might prefer to fall below the minimum 7:1 contrast ratio 4634 in relative luminance (the accessibility target we conform with), can 4635 opt to configure the relevant faces on their own. 4636 4637 *note Use theme colors in code with modus-themes-with-colors::. 4638 4639 This example uses more vivid background colors, though it comes at 4640 the very high cost of degraded legibility. 4641 4642 (modus-themes-with-colors 4643 (custom-set-faces 4644 `(mmm-cleanup-submode-face ((,c :background ,bg-yellow-intense))) 4645 `(mmm-code-submode-face ((,c :background ,bg-inactive))) 4646 `(mmm-comment-submode-face ((,c :background ,bg-blue-intense))) 4647 `(mmm-declaration-submode-face ((,c :background ,bg-cyan-intense))) 4648 `(mmm-default-submode-face ((,c :background ,bg-dim))) 4649 `(mmm-init-submode-face ((,c :background ,bg-magenta-intense))) 4650 `(mmm-output-submode-face ((,c :background ,bg-red-intense))) 4651 `(mmm-special-submode-face ((,c :background ,bg-green-intense))))) 4652 4653 4654 File: docGYh7V6.info, Node: Note for prism, Next: Note on company-mode overlay pop-up, Prev: Note on mmm-modeel background colors, Up: Notes on individual packages 4655 4656 7.10 Note on prism.el 4657 ===================== 4658 4659 This package by Adam Porter, aka “alphapapa” or “github-alphapapa”, 4660 implements an alternative to the typical coloration of code. Instead of 4661 highlighting the syntactic constructs, it applies color to different 4662 levels of depth in the code structure. 4663 4664 As ‘prism.el’ offers a broad range of customizations, we cannot style 4665 it directly at the theme level: that would run contrary to the spirit of 4666 the package. Instead, we may offer preset color schemes. Those should 4667 offer a starting point for users to adapt to their needs. 4668 4669 In the following code snippets, we employ the 4670 ‘modus-themes-with-colors’ macro: *note Use theme colors in code with 4671 modus-themes-with-colors::. 4672 4673 These are the minimum recommended settings with 16 colors: 4674 4675 (setq prism-num-faces 16) 4676 4677 (prism-set-colors 4678 :desaturations '(0) ; do not change---may lower the contrast ratio 4679 :lightens '(0) ; same 4680 :colors (modus-themes-with-colors 4681 (list fg-main 4682 magenta 4683 cyan-cooler 4684 magenta-cooler 4685 blue 4686 magenta-warmer 4687 cyan-warmer 4688 red-cooler 4689 green 4690 fg-main 4691 cyan 4692 yellow 4693 blue-warmer 4694 red-warmer 4695 green-cooler 4696 yellow-faint))) 4697 4698 With 8 colors: 4699 4700 (setq prism-num-faces 8) 4701 4702 (prism-set-colors 4703 :desaturations '(0) ; do not change---may lower the contrast ratio 4704 :lightens '(0) ; same 4705 :colors (modus-themes-with-colors 4706 (list blue 4707 magenta 4708 magenta-cooler 4709 cyan-cooler 4710 fg-main 4711 blue-warmer 4712 red-cooler 4713 cyan))) 4714 4715 And this is with 4 colors, which produces results that are the 4716 closest to the themes’ default aesthetic: 4717 4718 (setq prism-num-faces 4) 4719 4720 (prism-set-colors 4721 :desaturations '(0) ; do not change---may lower the contrast ratio 4722 :lightens '(0) ; same 4723 :colors (modus-themes-with-colors 4724 (list blue 4725 magenta 4726 magenta-cooler 4727 green-warmer))) 4728 4729 If you need to apply desaturation and lightening, you can use what 4730 the ‘prism.el’ documentation recommends, like this (adapting to the 4731 examples with the 4, 8, 16 colors): 4732 4733 (prism-set-colors 4734 :desaturations (cl-loop for i from 0 below 16 collect (* i 2.5)) 4735 :lightens (cl-loop for i from 0 below 16 collect (* i 2.5)) 4736 :colors (modus-themes-with-colors 4737 (list fg-main 4738 cyan-cooler 4739 magenta-cooler 4740 magenta))) 4741 4742 4743 File: docGYh7V6.info, Node: Note on company-mode overlay pop-up, Next: Note on ERC escaped color sequences, Prev: Note for prism, Up: Notes on individual packages 4744 4745 7.11 Note on company-mode overlay pop-up 4746 ======================================== 4747 4748 By default, the ‘company-mode’ pop-up that lists completion candidates 4749 is drawn using an overlay. This creates alignment issues every time it 4750 is placed above a piece of text that has a different height than the 4751 default. 4752 4753 The solution recommended by the project’s maintainer is to use an 4754 alternative front-end for drawing the pop-up which draws child frames 4755 instead of overlays.(1)(2) 4756 4757 Also consider the ‘corfu’ package. 4758 4759 ---------- Footnotes ---------- 4760 4761 (1) <https://github.com/company-mode/company-mode/issues/1010> 4762 4763 (2) <https://github.com/tumashu/company-posframe/> 4764 4765 4766 File: docGYh7V6.info, Node: Note on ERC escaped color sequences, Next: Note on powerline or spaceline, Prev: Note on company-mode overlay pop-up, Up: Notes on individual packages 4767 4768 7.12 Note on ERC escaped color sequences 4769 ======================================== 4770 4771 The built-in IRC client ‘erc’ has the ability to colorize any text using 4772 escape sequences that start with ‘^C’ (inserted with ‘C-q C-c’) and are 4773 followed by a number for the foreground and background.(1) Possible 4774 numbers are 0-15, with the first entry being the foreground and the 4775 second the background, separated by a comma. Like this ‘^C1,6’. The 4776 minimum setup is this: 4777 4778 (add-to-list 'erc-modules 'irccontrols) 4779 (setq erc-interpret-controls-p t 4780 erc-interpret-mirc-color t) 4781 4782 As this allows users the chance to make arbitrary combinations, it is 4783 impossible to guarantee a consistently high contrast ratio. All we can 4784 we do is provide guidance on the combinations that satisfy the 4785 accessibility standard of the themes: 4786 4787 Modus Operandi 4788 Use foreground color 1 for all backgrounds from 2-15. Like so: 4789 ‘C-q C-c1’ where ‘N’ is the background. 4790 4791 Modus Vivendi 4792 Use foreground color 0 for all backgrounds from 2-13. Use 4793 foreground ‘1’ for backgrounds 14, 15. 4794 4795 Colors 0 and 1 are white and black respectively. So combine them 4796 together, if you must. 4797 4798 ---------- Footnotes ---------- 4799 4800 (1) This page explains the basics, though it is not specific to 4801 Emacs: <https://www.mirc.com/colors.html> 4802 4803 4804 File: docGYh7V6.info, Node: Note on powerline or spaceline, Next: Note on SHR colors, Prev: Note on ERC escaped color sequences, Up: Notes on individual packages 4805 4806 7.13 Note on powerline or spaceline 4807 =================================== 4808 4809 Both Powerline and Spaceline package users will likely need to use the 4810 command ‘powerline-reset’ whenever they make changes to their themes 4811 and/or mode line setup. 4812 4813 4814 File: docGYh7V6.info, Node: Note on SHR colors, Next: Note on SHR fonts, Prev: Note on powerline or spaceline, Up: Notes on individual packages 4815 4816 7.14 Note on SHR colors 4817 ======================= 4818 4819 Emacs’ HTML rendering library (‘shr.el’) may need explicit configuration 4820 to respect the theme’s colors instead of whatever specifications the 4821 webpage provides. 4822 4823 Consult the doc string of ‘shr-use-colors’. 4824 4825 4826 File: docGYh7V6.info, Node: Note on SHR fonts, Next: Note on Ement colors and fonts, Prev: Note on SHR colors, Up: Notes on individual packages 4827 4828 7.15 Note on SHR fonts 4829 ====================== 4830 4831 By default, packages that build on top of the Simple HTML Remember 4832 (‘shr’) use proportionately spaced fonts. This is controlled by the 4833 user option ‘shr-use-fonts’, which is set to non-‘nil’ by default. To 4834 use the standard font instead, set that variable to ‘nil’. 4835 4836 *note Font configurations for Org and others::. 4837 4838 Packages affected by this are: 4839 4840 • elfeed 4841 • ement 4842 • eww 4843 4844 This is a non-exhaustive list. 4845 4846 4847 File: docGYh7V6.info, Node: Note on Ement colors and fonts, Next: Note on pdf-tools link hints, Prev: Note on SHR fonts, Up: Notes on individual packages 4848 4849 7.16 Note on Ement colors and fonts 4850 =================================== 4851 4852 The ‘ement.el’ library by Adam Porter (also known as “alphapapa”) 4853 defaults to a method of colorizing usernames in a rainbow style. This 4854 is controlled by the user option ‘ement-room-prism’ and can be disabled 4855 with: 4856 4857 (setq ement-room-prism nil) 4858 4859 The contrast ratio of these colors is governed by another user 4860 option: ‘ement-room-prism-minimum-contrast’. By default, it is set to 6 4861 which is slightly below our nominal target. Try this instead: 4862 4863 (setq ement-room-prism-minimum-contrast 7) 4864 4865 With regard to fonts, Ement depends on ‘shr’ (*note Note on SHR 4866 fonts::). 4867 4868 Since we are here, here is an excerpt from Ement’s source code: 4869 4870 (defcustom ement-room-prism-minimum-contrast 6 4871 "Attempt to enforce this minimum contrast ratio for user faces. 4872 This should be a reasonable number from, e.g. 0-7 or so." 4873 ;; Prot would almost approve of this default. :) I would go all the way 4874 ;; to 7, but 6 already significantly dilutes the colors in some cases. 4875 :type 'number) 4876 4877 Yes, I do approve of that default. Even a 4.5 (the WCAG AA rating) 4878 would be a good baseline for many themes and/or user configurations. 4879 Our target is the highest of the sort, though we do not demand that 4880 everyone conforms with it. 4881 4882 4883 File: docGYh7V6.info, Node: Note on pdf-tools link hints, Next: Note on the Notmuch logo, Prev: Note on Ement colors and fonts, Up: Notes on individual packages 4884 4885 7.17 Note on pdf-tools link hints 4886 ================================= 4887 4888 Hints are drawn by ImageMagick (https://imagemagick.org/), not Emacs, 4889 i.e., ImageMagick doesn’t know about the hint face unless you tell 4890 ImageMagick about it. By default, only the foreground and background 4891 color attributes are passed. The below snippet adds to those the 4892 various font attributes. As it queries various faces, specifically 4893 ‘pdf-links-read-link’ and the faces it inherits, it needs to be added to 4894 your initialization file after you’ve customized any faces. 4895 4896 (use-package pdf-links 4897 :config 4898 (let ((spec 4899 (apply #'append 4900 (mapcar 4901 (lambda (name) 4902 (list name 4903 (face-attribute 'pdf-links-read-link 4904 name nil 'default))) 4905 '(:family :width :weight :slant))))) 4906 (setq pdf-links-read-link-convert-commands 4907 `("-density" "96" 4908 "-family" ,(plist-get spec :family) 4909 "-stretch" ,(let* ((width (plist-get spec :width)) 4910 (name (symbol-name width))) 4911 (replace-regexp-in-string "-" "" 4912 (capitalize name))) 4913 "-weight" ,(pcase (plist-get spec :weight) 4914 ('ultra-light "Thin") 4915 ('extra-light "ExtraLight") 4916 ('light "Light") 4917 ('semi-bold "SemiBold") 4918 ('bold "Bold") 4919 ('extra-bold "ExtraBold") 4920 ('ultra-bold "Black") 4921 (_weight "Normal")) 4922 "-style" ,(pcase (plist-get spec :slant) 4923 ('italic "Italic") 4924 ('oblique "Oblique") 4925 (_slant "Normal")) 4926 "-pointsize" "%P" 4927 "-undercolor" "%f" 4928 "-fill" "%b" 4929 "-draw" "text %X,%Y '%c'")))) 4930 4931 4932 File: docGYh7V6.info, Node: Note on the Notmuch logo, Next: Note on goto-address-mode faces, Prev: Note on pdf-tools link hints, Up: Notes on individual packages 4933 4934 7.18 Note on the Notmuch logo 4935 ============================= 4936 4937 By default, the “hello” buffer of Notmuch includes a header with the 4938 programs’ logo and a couple of buttons. The logo has the effect of 4939 enlarging the height of the line, which negatively impacts the shape of 4940 those buttons. Disabling the logo fixes the problem: 4941 4942 (setq notmuch-show-logo nil) 4943 4944 4945 File: docGYh7V6.info, Node: Note on goto-address-mode faces, Prev: Note on the Notmuch logo, Up: Notes on individual packages 4946 4947 7.19 Note on goto-address-mode faces 4948 ==================================== 4949 4950 The built-in ‘goto-address-mode’ uses heuristics to identify URLs and 4951 email addresses in the current buffer. It then applies a face to them 4952 to change their style. Some packages, such as ‘notmuch’, use this 4953 minor-mode automatically. 4954 4955 The faces are not declared with ‘defface’, meaning that it is better 4956 that the theme does not modify them. The user is thus encouraged to 4957 consider including (or equivalent) this in their setup: 4958 4959 (setq goto-address-url-face 'link 4960 goto-address-url-mouse-face 'highlight 4961 goto-address-mail-face 'link 4962 goto-address-mail-mouse-face 'highlight) 4963 4964 My personal preference is to set ‘goto-address-mail-face’ to ‘nil’, 4965 as it otherwise adds too much visual noise to the buffer (email 4966 addresses stand out more, due to the use of the uncommon ‘@’ character 4967 but also because they are often enclosed in angled brackets). 4968 4969 4970 File: docGYh7V6.info, Node: Frequently Asked Questions, Next: Contributing, Prev: Notes on individual packages, Up: Top 4971 4972 8 Frequently Asked Questions 4973 **************************** 4974 4975 In this section we provide answers related to some aspects of the Modus 4976 themes’ design and application. 4977 4978 * Menu: 4979 4980 * Is the contrast ratio about adjacent colors?:: 4981 * What does it mean to avoid exaggerations?:: 4982 * Why are colors mostly variants of blue, magenta, cyan?: Why are colors mostly variants of blue magenta cyan?. 4983 * What is the best setup for legibility?:: 4984 * Are these color schemes?:: 4985 * Port the Modus themes to other platforms?:: 4986 4987 4988 File: docGYh7V6.info, Node: Is the contrast ratio about adjacent colors?, Next: What does it mean to avoid exaggerations?, Up: Frequently Asked Questions 4989 4990 8.1 Is the contrast ratio about adjacent colors? 4991 ================================================ 4992 4993 The minimum contrast ratio in relative luminance that the themes conform 4994 with always refers to any given combination of background and foreground 4995 colors. If we have some blue colored text next to a magenta one, both 4996 against a white background, we do not mean to imply that blue:magenta is 4997 7:1 in terms of relative luminance. Rather, we state that blue:white 4998 and magenta:white each are 7:1 or higher. 4999 5000 The point of reference is always the background. Because colors have 5001 about the same minimum distance in luminance from their backdrop, they 5002 necessarily are fairly close to each other in this measure. A possible 5003 blue:magenta combination would naturally be around 1:1 in contrast of 5004 the sort here considered. 5005 5006 To differentiate between sequential colors, we rely on hueness by 5007 mapping contrasting hues to adjacent constructs, while avoiding 5008 exaggerations. A blue next to a magenta can be told apart regardless of 5009 their respective contrast ratio against their common background. 5010 Exceptions would be tiny characters in arguably not so realistic cases, 5011 such as two dots drawn side-by-side which for some reason would need to 5012 be colored differently. They would still be legible though, which is 5013 the primary objective of the Modus themes. 5014 5015 5016 File: docGYh7V6.info, Node: What does it mean to avoid exaggerations?, Next: Why are colors mostly variants of blue magenta cyan?, Prev: Is the contrast ratio about adjacent colors?, Up: Frequently Asked Questions 5017 5018 8.2 What does it mean to avoid exaggerations? 5019 ============================================= 5020 5021 The Modus themes are designed with restraint, so that their default 5022 looks do not overdo it with the application of color. 5023 5024 *note Customization Options: Customization options. 5025 5026 This is the non-quantifiable aspect of the themes’ design: the 5027 artistic part, if you will. There are a lot of cases where color can be 5028 used inconsiderately, without accounting for layout, typographic, or 5029 other properties of the presentation. For example, two headings with 5030 distinct markers, such as leading asterisks in Org buffers, do not have 5031 to have highly contrasting hues between them in order to be told apart: 5032 the added element of contrast in hueness does not contribute 5033 significantly more to the distinction between the headings than colors 5034 whose hues are relatively closer to each other in the color space. 5035 5036 Exaggerations can be hard to anticipate or identify. Multiple shades 5037 of blue and magenta in the same context may not seem optimal: one might 5038 think that it would be better to use highly contrasting hues to ensure 5039 that all colors stand out, such as by placing blue next to yellow, next 5040 to magenta, and green. That would, however, be a case of design for its 5041 own sake; a case where color is being applied without consideration of 5042 its end results in the given context. Too many contrasting hues in 5043 close proximity force an erratic rate to how the eye jumps from one 5044 piece of text to the next. Whereas multiple shades of, say, blue and 5045 magenta can suffice to tell things apart and avoid excess coloration: a 5046 harmonious rhythm. 5047 5048 5049 File: docGYh7V6.info, Node: Why are colors mostly variants of blue magenta cyan?, Next: What is the best setup for legibility?, Prev: What does it mean to avoid exaggerations?, Up: Frequently Asked Questions 5050 5051 8.3 Why are colors mostly variants of blue, magenta, cyan? 5052 ========================================================== 5053 5054 Due to the innate properties of color, some options are better than 5055 others for the accessibility purposes of the themes, the stylistic 5056 consistency between ‘modus-operandi’ and ‘modus-vivendi’, and the 5057 avoidance of exaggerations in design. 5058 5059 *note What does it mean to avoid exaggerations?:: 5060 5061 What we describe as color is a function of three distinct channels of 5062 light: red, green, blue. In hexadecimal RGB notation, a color value is 5063 read as three pairs of red, green, and blue light: ‘#RRGGBB’. Of those 5064 three, the most luminant is green, while the least luminant is blue. 5065 5066 The three basic colors represent each of the channels of light. They 5067 can be intermixed to give us six colors: red and green derive yellow, 5068 green and blue make cyan, red and blue turn into magenta. 5069 5070 We can test the luminance of each of those against white and black to 5071 get a sense of how not all colors are equally good for accessibility 5072 (white is ‘#ffffff’, which means that all three light channels are fully 5073 luminated, while black is ‘#000000’ meaning that no light is present 5074 (notwithstanding display technology)). 5075 5076 | Name | | #ffffff | #000000 | 5077 |---------+---------+---------+---------| 5078 | red | #ff0000 | 4.00 | 5.25 | 5079 | yellow | #ffff00 | 1.07 | 19.56 | 5080 | green | #00ff00 | 1.37 | 15.30 | 5081 | cyan | #00ffff | 1.25 | 16.75 | 5082 | blue | #0000ff | 8.59 | 2.44 | 5083 | magenta | #ff00ff | 3.14 | 6.70 | 5084 5085 *note Measure color contrast::. 5086 5087 By reading this table we learn that every color that has a high level 5088 of green light (green, yellow, cyan) is virtually unreadable against a 5089 white background and, conversely, can be easily read against black. 5090 5091 We can then infer that red and blue, in different combinations, with 5092 green acting as calibrator for luminance, will give us fairly moderate 5093 colors that pass the 7:1 target. Blue with a bit of green produce 5094 appropriate variants of cyan. Similarly, blue combined with some red 5095 and hints of green give us suitable shades of purple. 5096 5097 Due to the need of maintaining some difference in hueness between 5098 adjacent colors, it is not possible to make red, green, and yellow the 5099 main colors, because blue cannot be used to control their luminance and, 5100 thus the relevant space will shrink considerably. 5101 5102 *note Is the contrast ratio about adjacent colors?:: 5103 5104 This phenomenon is best illustrated by the following table that 5105 measures the relative luminance of shades of red, yellow, magenta 5106 against white: 5107 5108 | | #ffffff | 5109 |---------+---------| 5110 | #990000 | 8.92 | 5111 | #995500 | 5.75 | 5112 | #990099 | 7.46 | 5113 5114 We notice that equal values of red and blue light in ‘#990099’ 5115 (magenta shade) do not lead to a considerable change in luminance 5116 compared with ‘#990000’ (red variant). Whereas less amount of green 5117 light in ‘#995500’ leads to a major drop in luminance relative to white. 5118 It follows that using the green channel of light to calibrate the 5119 luminance of colors is more effective than trying to do the same with 5120 either red or blue (the latter is the least effective in that regard). 5121 5122 When we need to work with several colors, it is always better to have 5123 sufficient manoeuvring space, especially since we cannot pick arbitrary 5124 colors but only those that satisfy the accessibility objectives of the 5125 themes. 5126 5127 As for why we do not mostly use green, yellow, cyan for the dark 5128 theme, it is because those colors are far more luminant than their 5129 counterparts on the other side of the spectrum, so to ensure that they 5130 all have about the same contrast ratios we would have to alter their 5131 hueness considerably. In short, the effect would not be optimal as it 5132 would lead to exaggerations. Plus, it would make ‘modus-vivendi’ look 5133 completely different than ‘modus-operandi’, to the effect that the two 5134 could not be properly considered part of the same project. 5135 5136 5137 File: docGYh7V6.info, Node: What is the best setup for legibility?, Next: Are these color schemes?, Prev: Why are colors mostly variants of blue magenta cyan?, Up: Frequently Asked Questions 5138 5139 8.4 What is the best setup for legibility? 5140 ========================================== 5141 5142 The Modus themes can be conceptually simplified as combinations of color 5143 values that account for relative luminance and inner harmony. Those 5144 qualities do not guarantee that every end-user will have the same 5145 experience, due to differences between people, but also because of 5146 variances in hardware capabilities and configurations. For the purposes 5147 of this document, we may only provide suggestions pertaining to the 5148 latter case. 5149 5150 ‘modus-operandi’ is best used outdoors or in a room that either gets 5151 direct sunlight or has plenty of light. Whereas ‘modus-vivendi’ works 5152 better when there is not a lot of sunshine or the room has a source of 5153 light that is preferably a faint and/or warm one. It is possible to use 5154 ‘modus-operandi’ at night and ‘modus-vivendi’ during the day, though 5155 that will depend on several variables, such as one’s overall perception 5156 of color, the paint on the walls and how that contributes to the 5157 impression of lightness in the room, the sense of space within the eye’s 5158 peripheral vision, hardware specifications, and environmental factors. 5159 5160 In general, an additional source of light other than that of the 5161 monitor can help reduce eye strain: the eyes are more relaxed when they 5162 do not have to focus on one point to gather light. 5163 5164 The monitor’s display settings must be accounted for. Gamma values, 5165 in particular, need to be calibrated to neither amplify nor distort the 5166 perception of black. Same principle for sharpness, brightness, and 5167 contrast as determined by the hardware, which all have an effect on how 5168 text is read on the screen. 5169 5170 There are software level methods on offer, such as the XrandR utility 5171 for the X Window System (X.org), which can make gamma corrections for 5172 each of the three channels of light (red, green, blue). For example: 5173 5174 xrandr --output LVDS1 --brightness 1.0 --gamma 0.76:0.75:0.68 5175 5176 Typography is another variable. Some font families are blurry at 5177 small point sizes. Others may have a regular weight that is lighter 5178 (thiner) than that of their peers which may, under certain 5179 circumstances, cause a halo effect around each glyph. 5180 5181 The gist is that legibility cannot be fully solved at the theme 5182 level. The color combinations may have been optimized for 5183 accessibility, though the remaining contributing factors in each case 5184 need to be considered in full. 5185 5186 5187 File: docGYh7V6.info, Node: Are these color schemes?, Next: Port the Modus themes to other platforms?, Prev: What is the best setup for legibility?, Up: Frequently Asked Questions 5188 5189 8.5 Are these color schemes? 5190 ============================ 5191 5192 No, the Modus themes are not color schemes. 5193 5194 A color scheme is a collection of colors. A good color scheme is a 5195 combination of colors with an inner logic or abstract structure. 5196 5197 A theme is a set of patterns that are applied across different 5198 contexts. A good theme is one that does so with consistency, though not 5199 uniformity. 5200 5201 In practical terms, a color scheme is what one uses when, for 5202 example, they replace the first sixteen escape sequences of a terminal 5203 emulator with color values of their preference. The terminal offers the 5204 option to choose, say, the exact value of what counts as “red”, but does 5205 not provide the means to control where that is mapped to and whether it 5206 should also have other qualities such as a bold weight for the 5207 underlying text or an added background color. In contradistinction, 5208 Emacs uses constructs known as “faces” which allow the user/developer to 5209 specify where a given color will be used and whether it should be 5210 accompanied by other typographic or stylistic attributes. 5211 5212 By configuring the multitude of faces on offer we thus control both 5213 which colors are applied and how they appear in their context. When a 5214 package wants to render each instance of “foo” with the “bar” face, it 5215 is not requesting a specific color, which makes things considerably more 5216 flexible as we can treat “bar” in its own right without necessarily 5217 having to use some color value that we hardcoded somewhere. 5218 5219 Which brings us to the distinction between consistency and uniformity 5220 where our goal is always the former: we want things to look similar 5221 across all interfaces, but we must never force a visual identity where 5222 that runs contrary to the functionality of the given interface. For 5223 instance, all links are underlined by default yet there are cases such 5224 as when viewing listings of emails in Gnus (and Mu4e, Notmuch) where (i) 5225 it is already understood that one must follow the indicator or headline 5226 to view its contents and (ii) underlining everything would make the 5227 interface virtually unusable. 5228 5229 Again, one must exercise judgement in order to avoid discrimination, 5230 where “discrimination” refers to: 5231 5232 • The treatment of substantially different magnitudes as if they were 5233 of the same class. 5234 • Or the treatment of the same class of magnitudes as if they were of 5235 a different class. 5236 5237 (To treat similar things differently; to treat dissimilar things 5238 alike.) 5239 5240 If, in other words, one is to enforce uniformity without accounting 5241 for the particular requirements of each case—the contextual demands for 5242 usability beyond matters of color—they are making a not-so-obvious error 5243 of treating different cases as if they were the same. 5244 5245 The Modus themes prioritize “thematic consistency” over abstract 5246 harmony or regularity among their applicable colors. In concrete terms, 5247 we do not claim that, say, our yellows are the best complements for our 5248 blues because we generally avoid using complementary colors 5249 side-by-side, so it is wrong to optimize for a decontextualised 5250 blue+yellow combination. Not to imply that our colors do not work well 5251 together because they do, just to clarify that consistency of context is 5252 what themes must strive for, and that requires widening the scope of the 5253 design beyond the particularities of a color scheme. 5254 5255 Long story short: color schemes and themes have different 5256 requirements. Please do not conflate the two. 5257 5258 5259 File: docGYh7V6.info, Node: Port the Modus themes to other platforms?, Prev: Are these color schemes?, Up: Frequently Asked Questions 5260 5261 8.6 Port the Modus themes to other platforms? 5262 ============================================= 5263 5264 There is no plan to port the themes to other platforms or text editors. 5265 I (Protesilaos) only use GNU Emacs and thus cannot maintain code that 5266 targets software I am either not familiar with or am not using on a 5267 daily basis. 5268 5269 While it is possible to produce a simulacrum based on a given 5270 template, doing so would run contrary to how this project is maintained 5271 where details matter greatly. 5272 5273 Each program has its own requirements so it won’t always be 5274 possible—or indeed desirable—to have 1:1 correspondence between what 5275 applies to Emacs and what should be done elsewhere. No port should ever 5276 strive to be a copy of the Emacs implementation, as no other program is 5277 an Emacs equivalent, but instead try to follow the spirit of the design. 5278 For example, some of the customization options accept a list as their 5279 value, or an alist, which may not be possible to reproduce on other 5280 platforms. 5281 5282 *note Customization options::. 5283 5284 In other words, if something must be done differently on a certain 5285 editor then that is acceptable so long as (i) the accessibility 5286 standards are not compromised and (ii) the overall character of the 5287 themes remains consistent. 5288 5289 The former criterion should be crystal clear as it pertains to the 5290 scientific foundations of the themes: high legibility and taking care of 5291 the needs of users with red-green/blue-yellow color deficiency 5292 (deuteranopia and tritanopia) by avoiding red+green color coding 5293 paradigms and/or by providing yellow+blue variants for deuteranopia and 5294 red+cyan for tritanopia (*note Overview::). 5295 5296 The latter criterion is the “je ne sais quoi” of the artistic aspect 5297 of the themes, which is partially fleshed out in this manual. 5298 5299 *note Frequently Asked Questions::. 5300 5301 With regard to the artistic aspect (where “art” qua skill may amount 5302 to an imprecise science), there is no hard-and-fast rule in effect as it 5303 requires one to exercize discretion and make decisions based on 5304 context-dependent information or constraints. As is true with most 5305 things in life, when in doubt, do not cling on to the letter of the law 5306 but try to understand its spirit. 5307 5308 For a trivial example: the curly underline that Emacs draws for 5309 spelling errors is thinner than, e.g., what a graphical web browser has, 5310 so if I was to design for an editor than has a thicker curly underline I 5311 would make the applicable colors less intense to counterbalance the 5312 typographic intensity of the added thickness. 5313 5314 With those granted, if anyone is willing to develop a port of the 5315 themes, they are welcome to contact me and I will do my best to help 5316 them in their efforts. 5317 5318 5319 File: docGYh7V6.info, Node: Contributing, Next: Acknowledgements, Prev: Frequently Asked Questions, Up: Top 5320 5321 9 Contributing 5322 ************** 5323 5324 This section documents the canonical sources of the themes and the ways 5325 in which you can contribute to their ongoing development. 5326 5327 * Menu: 5328 5329 * Sources of the themes:: 5330 * Issues you can help with:: 5331 * Patches require copyright assignment to the FSF:: 5332 5333 5334 File: docGYh7V6.info, Node: Sources of the themes, Next: Issues you can help with, Up: Contributing 5335 5336 9.1 Sources of the themes 5337 ========================= 5338 5339 • Package name (GNU ELPA): ‘modus-themes’ 5340 • Official manual: <https://protesilaos.com/emacs/modus-themes> 5341 • Change log: <https://protesilaos.com/emacs/modus-themes-changelog> 5342 • Color palette: <https://protesilaos.com/emacs/modus-themes-colors> 5343 • Sample pictures: 5344 <https://protesilaos.com/emacs/modus-themes-pictures> 5345 • Git repo on SourceHut: 5346 <https://git.sr.ht/~protesilaos/modus-themes> 5347 • Mirrors: 5348 • GitHub: <https://github.com/protesilaos/modus-themes> 5349 • GitLab: <https://gitlab.com/protesilaos/modus-themes> 5350 • Mailing list: <https://lists.sr.ht/~protesilaos/modus-themes> 5351 • Backronym: My Old Display Unexpectedly Sharpened ... themes 5352 5353 5354 File: docGYh7V6.info, Node: Issues you can help with, Next: Patches require copyright assignment to the FSF, Prev: Sources of the themes, Up: Contributing 5355 5356 9.2 Issues you can help with 5357 ============================ 5358 5359 A few tasks you can help with by sending an email to the general 5360 modus-themes public mailing list 5361 (https://lists.sr.ht/~protesilaos/modus-themes). 5362 5363 • Suggest refinements to packages that are covered. 5364 • Report packages not covered thus far. 5365 • Report bugs, inconsistencies, shortcomings. 5366 • Help expand the documentation of covered-but-not-styled packages. 5367 • Suggest refinements to the color palette. 5368 • Help expand this document or any other piece of documentation. 5369 • Send patches for code refinements (if you need, ask me for help 5370 with Git—we all start out as beginners). 5371 5372 *note Patches require copyright assignment to the FSF::. 5373 5374 It is preferable that your feedback includes some screenshots, GIFs, 5375 or short videos, as well as further instructions to reproduce a given 5376 setup. Though this is not a requirement. 5377 5378 Whatever you do, bear in mind the overarching objective of the Modus 5379 themes: to keep a contrast ratio that is greater or equal to 7:1 between 5380 background and foreground colors. If a compromise is ever necessary 5381 between aesthetics and accessibility, it shall always be made in the 5382 interest of the latter. 5383 5384 5385 File: docGYh7V6.info, Node: Patches require copyright assignment to the FSF, Prev: Issues you can help with, Up: Contributing 5386 5387 9.3 Patches require copyright assignment to the FSF 5388 =================================================== 5389 5390 Code contributions are most welcome. For any major edit (more than 15 5391 lines, or so, in aggregate per person), you need to make a copyright 5392 assignment to the Free Software Foundation. This is necessary because 5393 the themes are part of the upstream Emacs distribution: the FSF must at 5394 all times be in a position to enforce the GNU General Public License. 5395 5396 Copyright assignment is a simple process. Check the request form 5397 below (please adapt it accordingly). You must write an email to the 5398 address mentioned in the form and then wait for the FSF to send you a 5399 legal agreement. Sign the document and file it back to them. This 5400 could all happen via email and take about a week. You are encouraged to 5401 go through this process. You only need to do it once. It will allow 5402 you to make contributions to Emacs in general. 5403 5404 Please email the following information to assign@gnu.org, and we 5405 will send you the assignment form for your past and future changes. 5406 5407 Please use your full legal name (in ASCII characters) as the subject 5408 line of the message. 5409 5410 REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES 5411 5412 [What is the name of the program or package you're contributing to?] 5413 5414 GNU Emacs 5415 5416 [Did you copy any files or text written by someone else in these changes? 5417 Even if that material is free software, we need to know about it.] 5418 5419 Copied a few snippets from the same files I edited. Their author, 5420 Protesilaos Stavrou, has already assigned copyright to the Free Software 5421 Foundation. 5422 5423 [Do you have an employer who might have a basis to claim to own 5424 your changes? Do you attend a school which might make such a claim?] 5425 5426 5427 [For the copyright registration, what country are you a citizen of?] 5428 5429 5430 [What year were you born?] 5431 5432 5433 [Please write your email address here.] 5434 5435 5436 [Please write your postal address here.] 5437 5438 5439 5440 5441 5442 [Which files have you changed so far, and which new files have you written 5443 so far?] 5444 5445 5446 5447 File: docGYh7V6.info, Node: Acknowledgements, Next: GNU Free Documentation License, Prev: Contributing, Up: Top 5448 5449 10 Acknowledgements 5450 ******************* 5451 5452 The Modus themes are a collective effort. Every bit of work matters. 5453 5454 Author/maintainer 5455 Protesilaos Stavrou. 5456 5457 Contributions to code or documentation 5458 Aleksei Gusev, Alex Griffin, Anders Johansson, Antonio Ruiz, Basil 5459 L. Contovounesios, Björn Lindström, Carlo Zancanaro, Christian 5460 Tietze, Daniel Mendler, David Edmondson, Eli Zaretskii, Fritz 5461 Grabo, Gautier Ponsinet, Illia Ostapyshyn, Kévin Le Gouguec, Koen 5462 van Greevenbroek, Kostadin Ninev, Madhavan Krishnan, Manuel Giraud, 5463 Markus Beppler, Matthew Stevenson, Mauro Aranda, Nacho Barrientos, 5464 Nicolas De Jaeghere, Paul David, Philip Kaludercic, Pierre 5465 Téchoueyres, Rudolf Adamkovič, Sergey Nichiporchik, Shreyas 5466 Ragavan, Stefan Kangas, Stephen Berman, Stephen Gildea, Steve 5467 Downey, Tomasz Hołubowicz, Utkarsh Singh, Vincent Murphy, Xinglu 5468 Chen, Yuanchen Xie, fluentpwn, okamsn. 5469 5470 Ideas and user feedback 5471 Aaron Jensen, Adam Porter, Adam Spiers, Adrian Manea, Aleksei 5472 Pirogov, Alex Griffin, Alex Koen, Alex Peitsinis, Alexey Shmalko, 5473 Alok Singh, Anders Johansson, André Alexandre Gomes, Andrew Tropin, 5474 Antonio Hernández Blas, Arif Rezai, Augusto Stoffel, Basil L. 5475 Contovounesios, Bernd Rellermeyer, Burgess Chang, Charlotte Van 5476 Petegem, Christian Tietze, Christopher Dimech, Christopher League, 5477 Damien Cassou, Daniel Mendler, Dario Gjorgjevski, David Edmondson, 5478 Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele Michele Alberto 5479 Monterosso, Farasha Euker, Feng Shu, Gautier Ponsinet, Gerry 5480 Agbobada, Gianluca Recchia, Gonçalo Marrafa, Guilherme Semente, 5481 Gustavo Barros, Hörmetjan Yiltiz, Ilja Kocken, Imran Khan, Iris 5482 Garcia, Ivan Popovych, James Ferguson, Jeremy Friesen, Jerry Zhang, 5483 Johannes Grødem, John Haman, Jonas Collberg, Jorge Morais, Joshua 5484 O’Connor, Julio C. Villasante, Kenta Usami, Kevin Fleming, Kévin 5485 Le Gouguec, Kevin Kainan Li, Kostadin Ninev, Laith Bahodi, Lasse 5486 Lindner, Len Trigg, Lennart C. Karssen, Luis Miguel Castañeda, 5487 Magne Hov, Manuel Giraud, Manuel Uberti, Mark Bestley, Mark Burton, 5488 Mark Simpson, Marko Kocic, Markus Beppler, Matt Armstrong, Matthias 5489 Fuchs, Mattias Engdegård, Mauro Aranda, Maxime Tréca, Michael 5490 Goldenberg, Morgan Smith, Morgan Willcock, Murilo Pereira, Nicky 5491 van Foreest, Nicolas De Jaeghere, Nicolas Semrau, Olaf Meeuwissen, 5492 Oliver Epper, Pablo Stafforini, Paul Poloskov, Pengji Zhang, Pete 5493 Kazmier, Peter Wu, Philip Kaludercic, Pierre Téchoueyres, 5494 Przemysław Kryger, Robert Hepple, Roman Rudakov, Russell Sim, Ryan 5495 Phillips, Rytis Paškauskas, Rudolf Adamkovič, Sam Kleinman, Samuel 5496 Culpepper, Saša Janiška, Shreyas Ragavan, Simon Pugnet, Steve 5497 Downey, Tassilo Horn, Thanos Apollo, Thibaut Verron, Thomas 5498 Heartman, Togan Muftuoglu, Tony Zorman, Trey Merkley, Tomasz 5499 Hołubowicz, Toon Claes, Uri Sharf, Utkarsh Singh, Vincent Foley, 5500 Zoltan Kiraly. As well as users: Ben, CsBigDataHub1, Emacs 5501 Contrib, Eugene, Fourchaux, Fredrik, Moesasji, Nick, Summer Emacs, 5502 TheBlob42, TitusMu, Trey, bepolymathe, bit9tream, bangedorrunt, 5503 derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn, 5504 pRot0ta1p, soaringbird, tumashu, wakamenod. 5505 5506 Packaging 5507 Basil L. Contovounesios, Eli Zaretskii, Glenn Morris, Mauro Aranda, 5508 Richard Stallman, Stefan Kangas (core Emacs), Stefan Monnier (GNU 5509 Elpa), André Alexandre Gomes, Andrew Tropin, Dimakakos Dimos, 5510 Morgan Smith, Nicolas Goaziou (Guix), Dhavan Vaidya (Debian). 5511 5512 Inspiration for certain features 5513 Bozhidar Batsov (zenburn-theme), Fabrice Niessen (leuven-theme). 5514 5515 Special thanks (from A-Z) to Daniel Mendler, Gustavo Barros, Manuel 5516 Uberti, Nicolas De Jaeghere, and Omar Antolín Camarena for their long 5517 time contributions and insightful commentary on key aspects of the 5518 themes’ design and/or aspects of their functionality. 5519 5520 All errors are my own. 5521 5522 5523 File: docGYh7V6.info, Node: GNU Free Documentation License, Next: Indices, Prev: Acknowledgements, Up: Top 5524 5525 Appendix A GNU Free Documentation License 5526 ***************************************** 5527 5528 Version 1.3, 3 November 2008 5529 5530 Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. 5531 <https://fsf.org/> 5532 5533 Everyone is permitted to copy and distribute verbatim copies 5534 of this license document, but changing it is not allowed. 5535 5536 0. PREAMBLE 5537 5538 The purpose of this License is to make a manual, textbook, or other 5539 functional and useful document “free” in the sense of freedom: to 5540 assure everyone the effective freedom to copy and redistribute it, 5541 with or without modifying it, either commercially or 5542 noncommercially. Secondarily, this License preserves for the 5543 author and publisher a way to get credit for their work, while not 5544 being considered responsible for modifications made by others. 5545 5546 This License is a kind of “copyleft”, which means that derivative 5547 works of the document must themselves be free in the same sense. 5548 It complements the GNU General Public License, which is a copyleft 5549 license designed for free software. 5550 5551 We have designed this License in order to use it for manuals for 5552 free software, because free software needs free documentation: a 5553 free program should come with manuals providing the same freedoms 5554 that the software does. But this License is not limited to 5555 software manuals; it can be used for any textual work, regardless 5556 of subject matter or whether it is published as a printed book. We 5557 recommend this License principally for works whose purpose is 5558 instruction or reference. 5559 5560 1. APPLICABILITY AND DEFINITIONS 5561 5562 This License applies to any manual or other work, in any medium, 5563 that contains a notice placed by the copyright holder saying it can 5564 be distributed under the terms of this License. Such a notice 5565 grants a world-wide, royalty-free license, unlimited in duration, 5566 to use that work under the conditions stated herein. The 5567 “Document”, below, refers to any such manual or work. Any member 5568 of the public is a licensee, and is addressed as “you”. You accept 5569 the license if you copy, modify or distribute the work in a way 5570 requiring permission under copyright law. 5571 5572 A “Modified Version” of the Document means any work containing the 5573 Document or a portion of it, either copied verbatim, or with 5574 modifications and/or translated into another language. 5575 5576 A “Secondary Section” is a named appendix or a front-matter section 5577 of the Document that deals exclusively with the relationship of the 5578 publishers or authors of the Document to the Document’s overall 5579 subject (or to related matters) and contains nothing that could 5580 fall directly within that overall subject. (Thus, if the Document 5581 is in part a textbook of mathematics, a Secondary Section may not 5582 explain any mathematics.) The relationship could be a matter of 5583 historical connection with the subject or with related matters, or 5584 of legal, commercial, philosophical, ethical or political position 5585 regarding them. 5586 5587 The “Invariant Sections” are certain Secondary Sections whose 5588 titles are designated, as being those of Invariant Sections, in the 5589 notice that says that the Document is released under this License. 5590 If a section does not fit the above definition of Secondary then it 5591 is not allowed to be designated as Invariant. The Document may 5592 contain zero Invariant Sections. If the Document does not identify 5593 any Invariant Sections then there are none. 5594 5595 The “Cover Texts” are certain short passages of text that are 5596 listed, as Front-Cover Texts or Back-Cover Texts, in the notice 5597 that says that the Document is released under this License. A 5598 Front-Cover Text may be at most 5 words, and a Back-Cover Text may 5599 be at most 25 words. 5600 5601 A “Transparent” copy of the Document means a machine-readable copy, 5602 represented in a format whose specification is available to the 5603 general public, that is suitable for revising the document 5604 straightforwardly with generic text editors or (for images composed 5605 of pixels) generic paint programs or (for drawings) some widely 5606 available drawing editor, and that is suitable for input to text 5607 formatters or for automatic translation to a variety of formats 5608 suitable for input to text formatters. A copy made in an otherwise 5609 Transparent file format whose markup, or absence of markup, has 5610 been arranged to thwart or discourage subsequent modification by 5611 readers is not Transparent. An image format is not Transparent if 5612 used for any substantial amount of text. A copy that is not 5613 “Transparent” is called “Opaque”. 5614 5615 Examples of suitable formats for Transparent copies include plain 5616 ASCII without markup, Texinfo input format, LaTeX input format, 5617 SGML or XML using a publicly available DTD, and standard-conforming 5618 simple HTML, PostScript or PDF designed for human modification. 5619 Examples of transparent image formats include PNG, XCF and JPG. 5620 Opaque formats include proprietary formats that can be read and 5621 edited only by proprietary word processors, SGML or XML for which 5622 the DTD and/or processing tools are not generally available, and 5623 the machine-generated HTML, PostScript or PDF produced by some word 5624 processors for output purposes only. 5625 5626 The “Title Page” means, for a printed book, the title page itself, 5627 plus such following pages as are needed to hold, legibly, the 5628 material this License requires to appear in the title page. For 5629 works in formats which do not have any title page as such, “Title 5630 Page” means the text near the most prominent appearance of the 5631 work’s title, preceding the beginning of the body of the text. 5632 5633 The “publisher” means any person or entity that distributes copies 5634 of the Document to the public. 5635 5636 A section “Entitled XYZ” means a named subunit of the Document 5637 whose title either is precisely XYZ or contains XYZ in parentheses 5638 following text that translates XYZ in another language. (Here XYZ 5639 stands for a specific section name mentioned below, such as 5640 “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) 5641 To “Preserve the Title” of such a section when you modify the 5642 Document means that it remains a section “Entitled XYZ” according 5643 to this definition. 5644 5645 The Document may include Warranty Disclaimers next to the notice 5646 which states that this License applies to the Document. These 5647 Warranty Disclaimers are considered to be included by reference in 5648 this License, but only as regards disclaiming warranties: any other 5649 implication that these Warranty Disclaimers may have is void and 5650 has no effect on the meaning of this License. 5651 5652 2. VERBATIM COPYING 5653 5654 You may copy and distribute the Document in any medium, either 5655 commercially or noncommercially, provided that this License, the 5656 copyright notices, and the license notice saying this License 5657 applies to the Document are reproduced in all copies, and that you 5658 add no other conditions whatsoever to those of this License. You 5659 may not use technical measures to obstruct or control the reading 5660 or further copying of the copies you make or distribute. However, 5661 you may accept compensation in exchange for copies. If you 5662 distribute a large enough number of copies you must also follow the 5663 conditions in section 3. 5664 5665 You may also lend copies, under the same conditions stated above, 5666 and you may publicly display copies. 5667 5668 3. COPYING IN QUANTITY 5669 5670 If you publish printed copies (or copies in media that commonly 5671 have printed covers) of the Document, numbering more than 100, and 5672 the Document’s license notice requires Cover Texts, you must 5673 enclose the copies in covers that carry, clearly and legibly, all 5674 these Cover Texts: Front-Cover Texts on the front cover, and 5675 Back-Cover Texts on the back cover. Both covers must also clearly 5676 and legibly identify you as the publisher of these copies. The 5677 front cover must present the full title with all words of the title 5678 equally prominent and visible. You may add other material on the 5679 covers in addition. Copying with changes limited to the covers, as 5680 long as they preserve the title of the Document and satisfy these 5681 conditions, can be treated as verbatim copying in other respects. 5682 5683 If the required texts for either cover are too voluminous to fit 5684 legibly, you should put the first ones listed (as many as fit 5685 reasonably) on the actual cover, and continue the rest onto 5686 adjacent pages. 5687 5688 If you publish or distribute Opaque copies of the Document 5689 numbering more than 100, you must either include a machine-readable 5690 Transparent copy along with each Opaque copy, or state in or with 5691 each Opaque copy a computer-network location from which the general 5692 network-using public has access to download using public-standard 5693 network protocols a complete Transparent copy of the Document, free 5694 of added material. If you use the latter option, you must take 5695 reasonably prudent steps, when you begin distribution of Opaque 5696 copies in quantity, to ensure that this Transparent copy will 5697 remain thus accessible at the stated location until at least one 5698 year after the last time you distribute an Opaque copy (directly or 5699 through your agents or retailers) of that edition to the public. 5700 5701 It is requested, but not required, that you contact the authors of 5702 the Document well before redistributing any large number of copies, 5703 to give them a chance to provide you with an updated version of the 5704 Document. 5705 5706 4. MODIFICATIONS 5707 5708 You may copy and distribute a Modified Version of the Document 5709 under the conditions of sections 2 and 3 above, provided that you 5710 release the Modified Version under precisely this License, with the 5711 Modified Version filling the role of the Document, thus licensing 5712 distribution and modification of the Modified Version to whoever 5713 possesses a copy of it. In addition, you must do these things in 5714 the Modified Version: 5715 5716 A. Use in the Title Page (and on the covers, if any) a title 5717 distinct from that of the Document, and from those of previous 5718 versions (which should, if there were any, be listed in the 5719 History section of the Document). You may use the same title 5720 as a previous version if the original publisher of that 5721 version gives permission. 5722 5723 B. List on the Title Page, as authors, one or more persons or 5724 entities responsible for authorship of the modifications in 5725 the Modified Version, together with at least five of the 5726 principal authors of the Document (all of its principal 5727 authors, if it has fewer than five), unless they release you 5728 from this requirement. 5729 5730 C. State on the Title page the name of the publisher of the 5731 Modified Version, as the publisher. 5732 5733 D. Preserve all the copyright notices of the Document. 5734 5735 E. Add an appropriate copyright notice for your modifications 5736 adjacent to the other copyright notices. 5737 5738 F. Include, immediately after the copyright notices, a license 5739 notice giving the public permission to use the Modified 5740 Version under the terms of this License, in the form shown in 5741 the Addendum below. 5742 5743 G. Preserve in that license notice the full lists of Invariant 5744 Sections and required Cover Texts given in the Document’s 5745 license notice. 5746 5747 H. Include an unaltered copy of this License. 5748 5749 I. Preserve the section Entitled “History”, Preserve its Title, 5750 and add to it an item stating at least the title, year, new 5751 authors, and publisher of the Modified Version as given on the 5752 Title Page. If there is no section Entitled “History” in the 5753 Document, create one stating the title, year, authors, and 5754 publisher of the Document as given on its Title Page, then add 5755 an item describing the Modified Version as stated in the 5756 previous sentence. 5757 5758 J. Preserve the network location, if any, given in the Document 5759 for public access to a Transparent copy of the Document, and 5760 likewise the network locations given in the Document for 5761 previous versions it was based on. These may be placed in the 5762 “History” section. You may omit a network location for a work 5763 that was published at least four years before the Document 5764 itself, or if the original publisher of the version it refers 5765 to gives permission. 5766 5767 K. For any section Entitled “Acknowledgements” or “Dedications”, 5768 Preserve the Title of the section, and preserve in the section 5769 all the substance and tone of each of the contributor 5770 acknowledgements and/or dedications given therein. 5771 5772 L. Preserve all the Invariant Sections of the Document, unaltered 5773 in their text and in their titles. Section numbers or the 5774 equivalent are not considered part of the section titles. 5775 5776 M. Delete any section Entitled “Endorsements”. Such a section 5777 may not be included in the Modified Version. 5778 5779 N. Do not retitle any existing section to be Entitled 5780 “Endorsements” or to conflict in title with any Invariant 5781 Section. 5782 5783 O. Preserve any Warranty Disclaimers. 5784 5785 If the Modified Version includes new front-matter sections or 5786 appendices that qualify as Secondary Sections and contain no 5787 material copied from the Document, you may at your option designate 5788 some or all of these sections as invariant. To do this, add their 5789 titles to the list of Invariant Sections in the Modified Version’s 5790 license notice. These titles must be distinct from any other 5791 section titles. 5792 5793 You may add a section Entitled “Endorsements”, provided it contains 5794 nothing but endorsements of your Modified Version by various 5795 parties—for example, statements of peer review or that the text has 5796 been approved by an organization as the authoritative definition of 5797 a standard. 5798 5799 You may add a passage of up to five words as a Front-Cover Text, 5800 and a passage of up to 25 words as a Back-Cover Text, to the end of 5801 the list of Cover Texts in the Modified Version. Only one passage 5802 of Front-Cover Text and one of Back-Cover Text may be added by (or 5803 through arrangements made by) any one entity. If the Document 5804 already includes a cover text for the same cover, previously added 5805 by you or by arrangement made by the same entity you are acting on 5806 behalf of, you may not add another; but you may replace the old 5807 one, on explicit permission from the previous publisher that added 5808 the old one. 5809 5810 The author(s) and publisher(s) of the Document do not by this 5811 License give permission to use their names for publicity for or to 5812 assert or imply endorsement of any Modified Version. 5813 5814 5. COMBINING DOCUMENTS 5815 5816 You may combine the Document with other documents released under 5817 this License, under the terms defined in section 4 above for 5818 modified versions, provided that you include in the combination all 5819 of the Invariant Sections of all of the original documents, 5820 unmodified, and list them all as Invariant Sections of your 5821 combined work in its license notice, and that you preserve all 5822 their Warranty Disclaimers. 5823 5824 The combined work need only contain one copy of this License, and 5825 multiple identical Invariant Sections may be replaced with a single 5826 copy. If there are multiple Invariant Sections with the same name 5827 but different contents, make the title of each such section unique 5828 by adding at the end of it, in parentheses, the name of the 5829 original author or publisher of that section if known, or else a 5830 unique number. Make the same adjustment to the section titles in 5831 the list of Invariant Sections in the license notice of the 5832 combined work. 5833 5834 In the combination, you must combine any sections Entitled 5835 “History” in the various original documents, forming one section 5836 Entitled “History”; likewise combine any sections Entitled 5837 “Acknowledgements”, and any sections Entitled “Dedications”. You 5838 must delete all sections Entitled “Endorsements.” 5839 5840 6. COLLECTIONS OF DOCUMENTS 5841 5842 You may make a collection consisting of the Document and other 5843 documents released under this License, and replace the individual 5844 copies of this License in the various documents with a single copy 5845 that is included in the collection, provided that you follow the 5846 rules of this License for verbatim copying of each of the documents 5847 in all other respects. 5848 5849 You may extract a single document from such a collection, and 5850 distribute it individually under this License, provided you insert 5851 a copy of this License into the extracted document, and follow this 5852 License in all other respects regarding verbatim copying of that 5853 document. 5854 5855 7. AGGREGATION WITH INDEPENDENT WORKS 5856 5857 A compilation of the Document or its derivatives with other 5858 separate and independent documents or works, in or on a volume of a 5859 storage or distribution medium, is called an “aggregate” if the 5860 copyright resulting from the compilation is not used to limit the 5861 legal rights of the compilation’s users beyond what the individual 5862 works permit. When the Document is included in an aggregate, this 5863 License does not apply to the other works in the aggregate which 5864 are not themselves derivative works of the Document. 5865 5866 If the Cover Text requirement of section 3 is applicable to these 5867 copies of the Document, then if the Document is less than one half 5868 of the entire aggregate, the Document’s Cover Texts may be placed 5869 on covers that bracket the Document within the aggregate, or the 5870 electronic equivalent of covers if the Document is in electronic 5871 form. Otherwise they must appear on printed covers that bracket 5872 the whole aggregate. 5873 5874 8. TRANSLATION 5875 5876 Translation is considered a kind of modification, so you may 5877 distribute translations of the Document under the terms of section 5878 4. Replacing Invariant Sections with translations requires special 5879 permission from their copyright holders, but you may include 5880 translations of some or all Invariant Sections in addition to the 5881 original versions of these Invariant Sections. You may include a 5882 translation of this License, and all the license notices in the 5883 Document, and any Warranty Disclaimers, provided that you also 5884 include the original English version of this License and the 5885 original versions of those notices and disclaimers. In case of a 5886 disagreement between the translation and the original version of 5887 this License or a notice or disclaimer, the original version will 5888 prevail. 5889 5890 If a section in the Document is Entitled “Acknowledgements”, 5891 “Dedications”, or “History”, the requirement (section 4) to 5892 Preserve its Title (section 1) will typically require changing the 5893 actual title. 5894 5895 9. TERMINATION 5896 5897 You may not copy, modify, sublicense, or distribute the Document 5898 except as expressly provided under this License. Any attempt 5899 otherwise to copy, modify, sublicense, or distribute it is void, 5900 and will automatically terminate your rights under this License. 5901 5902 However, if you cease all violation of this License, then your 5903 license from a particular copyright holder is reinstated (a) 5904 provisionally, unless and until the copyright holder explicitly and 5905 finally terminates your license, and (b) permanently, if the 5906 copyright holder fails to notify you of the violation by some 5907 reasonable means prior to 60 days after the cessation. 5908 5909 Moreover, your license from a particular copyright holder is 5910 reinstated permanently if the copyright holder notifies you of the 5911 violation by some reasonable means, this is the first time you have 5912 received notice of violation of this License (for any work) from 5913 that copyright holder, and you cure the violation prior to 30 days 5914 after your receipt of the notice. 5915 5916 Termination of your rights under this section does not terminate 5917 the licenses of parties who have received copies or rights from you 5918 under this License. If your rights have been terminated and not 5919 permanently reinstated, receipt of a copy of some or all of the 5920 same material does not give you any rights to use it. 5921 5922 10. FUTURE REVISIONS OF THIS LICENSE 5923 5924 The Free Software Foundation may publish new, revised versions of 5925 the GNU Free Documentation License from time to time. Such new 5926 versions will be similar in spirit to the present version, but may 5927 differ in detail to address new problems or concerns. See 5928 <https://www.gnu.org/licenses/>. 5929 5930 Each version of the License is given a distinguishing version 5931 number. If the Document specifies that a particular numbered 5932 version of this License “or any later version” applies to it, you 5933 have the option of following the terms and conditions either of 5934 that specified version or of any later version that has been 5935 published (not as a draft) by the Free Software Foundation. If the 5936 Document does not specify a version number of this License, you may 5937 choose any version ever published (not as a draft) by the Free 5938 Software Foundation. If the Document specifies that a proxy can 5939 decide which future versions of this License can be used, that 5940 proxy’s public statement of acceptance of a version permanently 5941 authorizes you to choose that version for the Document. 5942 5943 11. RELICENSING 5944 5945 “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any 5946 World Wide Web server that publishes copyrightable works and also 5947 provides prominent facilities for anybody to edit those works. A 5948 public wiki that anybody can edit is an example of such a server. 5949 A “Massive Multiauthor Collaboration” (or “MMC”) contained in the 5950 site means any set of copyrightable works thus published on the MMC 5951 site. 5952 5953 “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 5954 license published by Creative Commons Corporation, a not-for-profit 5955 corporation with a principal place of business in San Francisco, 5956 California, as well as future copyleft versions of that license 5957 published by that same organization. 5958 5959 “Incorporate” means to publish or republish a Document, in whole or 5960 in part, as part of another Document. 5961 5962 An MMC is “eligible for relicensing” if it is licensed under this 5963 License, and if all works that were first published under this 5964 License somewhere other than this MMC, and subsequently 5965 incorporated in whole or in part into the MMC, (1) had no cover 5966 texts or invariant sections, and (2) were thus incorporated prior 5967 to November 1, 2008. 5968 5969 The operator of an MMC Site may republish an MMC contained in the 5970 site under CC-BY-SA on the same site at any time before August 1, 5971 2009, provided the MMC is eligible for relicensing. 5972 5973 ADDENDUM: How to use this License for your documents 5974 ==================================================== 5975 5976 To use this License in a document you have written, include a copy of 5977 the License in the document and put the following copyright and license 5978 notices just after the title page: 5979 5980 Copyright (C) YEAR YOUR NAME. 5981 Permission is granted to copy, distribute and/or modify this document 5982 under the terms of the GNU Free Documentation License, Version 1.3 5983 or any later version published by the Free Software Foundation; 5984 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover 5985 Texts. A copy of the license is included in the section entitled ``GNU 5986 Free Documentation License''. 5987 5988 If you have Invariant Sections, Front-Cover Texts and Back-Cover 5989 Texts, replace the “with...Texts.” line with this: 5990 5991 with the Invariant Sections being LIST THEIR TITLES, with 5992 the Front-Cover Texts being LIST, and with the Back-Cover Texts 5993 being LIST. 5994 5995 If you have Invariant Sections without Cover Texts, or some other 5996 combination of the three, merge those two alternatives to suit the 5997 situation. 5998 5999 If your document contains nontrivial examples of program code, we 6000 recommend releasing these examples in parallel under your choice of free 6001 software license, such as the GNU General Public License, to permit 6002 their use in free software. 6003 6004 6005 File: docGYh7V6.info, Node: Indices, Prev: GNU Free Documentation License, Up: Top 6006 6007 B Indices 6008 ********* 6009 6010 * Menu: 6011 6012 * Function index:: 6013 * Variable index:: 6014 * Concept index:: 6015 6016 6017 File: docGYh7V6.info, Node: Function index, Next: Variable index, Up: Indices 6018 6019 B.1 Function index 6020 ================== 6021 6022 6023 * Menu: 6024 6025 * modus-themes-contrast: Measure color contrast. 6026 (line 6) 6027 * modus-themes-get-color-value: Get a single color from the palette. 6028 (line 8) 6029 * modus-themes-list-colors: Preview theme colors. (line 6) 6030 * modus-themes-list-colors-current: Preview theme colors. (line 12) 6031 * modus-themes-load-theme: Enable and load. (line 6) 6032 * modus-themes-preview-colors: Preview theme colors. (line 25) 6033 * modus-themes-preview-colors-current: Preview theme colors. (line 25) 6034 * modus-themes-toggle: Enable and load. (line 6) 6035 * modus-themes-wcag-formula: Measure color contrast. 6036 (line 6) 6037 * modus-themes-with-colors: Use theme colors in code with modus-themes-with-colors. 6038 (line 12) 6039 6040 6041 File: docGYh7V6.info, Node: Variable index, Next: Concept index, Prev: Function index, Up: Indices 6042 6043 B.2 Variable index 6044 ================== 6045 6046 6047 * Menu: 6048 6049 * modus-operandi-deuteranopia-palette-overrides: Palette overrides. 6050 (line 30) 6051 * modus-operandi-palette-overrides: Palette overrides. (line 28) 6052 * modus-operandi-tinted-palette-overrides: Palette overrides. (line 32) 6053 * modus-operandi-tritanopia-palette-overrides: Palette overrides. 6054 (line 34) 6055 * modus-themes-after-load-theme-hook: Enable and load. (line 6) 6056 * modus-themes-bold-constructs: Bold constructs. (line 6) 6057 * modus-themes-common-palette-overrides: Palette overrides. (line 22) 6058 * modus-themes-completions: Completion UIs. (line 6) 6059 * modus-themes-custom-auto-reload: Custom reload theme. (line 6) 6060 * modus-themes-disable-other-themes: Disable other themes. (line 6) 6061 * modus-themes-headings: Heading styles. (line 6) 6062 * modus-themes-italic-constructs: Italic constructs. (line 6) 6063 * modus-themes-mixed-fonts: Mixed fonts. (line 6) 6064 * modus-themes-org-blocks: Org mode blocks. (line 6) 6065 * modus-themes-preset-overrides-cooler: Palette override presets. 6066 (line 29) 6067 * modus-themes-preset-overrides-faint: Palette override presets. 6068 (line 16) 6069 * modus-themes-preset-overrides-intense: Palette override presets. 6070 (line 25) 6071 * modus-themes-preset-overrides-warmer: Palette override presets. 6072 (line 29) 6073 * modus-themes-prompts: Command prompts. (line 6) 6074 * modus-themes-variable-pitch-ui: UI typeface. (line 6) 6075 * modus-vivendi-deuteranopia-palette-overrides: Palette overrides. 6076 (line 38) 6077 * modus-vivendi-palette-overrides: Palette overrides. (line 36) 6078 * modus-vivendi-tinted-palette-overrides: Palette overrides. (line 40) 6079 * modus-vivendi-tritanopia-palette-overrides: Palette overrides. 6080 (line 42) 6081 6082 6083 File: docGYh7V6.info, Node: Concept index, Prev: Variable index, Up: Indices 6084 6085 B.3 Concept index 6086 ================= 6087 6088 6089 * Menu: 6090 6091 * Avoiding exaggerations in design: What does it mean to avoid exaggerations?. 6092 (line 6) 6093 * Bold and italic fonts: Configure bold and italic faces. 6094 (line 6) 6095 * Changelog: Learn about the latest changes. 6096 (line 6) 6097 * Color accuracy of terminal emulators: More accurate colors in terminal emulators. 6098 (line 6) 6099 * Color contrast: Measure color contrast. 6100 (line 6) 6101 * Contrast between adjacent colors: Is the contrast ratio about adjacent colors?. 6102 (line 6) 6103 * Contributing: Issues you can help with. 6104 (line 6) 6105 * Contributors: Acknowledgements. (line 6) 6106 * Essential configuration: Enable and load. (line 6) 6107 * Explicitly supported packages: Supported packages. (line 6) 6108 * Font configurations: Font configurations for Org and others. 6109 (line 6) 6110 * Fonts in EWW, Elfeed, Ement, and SHR: Note on SHR fonts. (line 6) 6111 * Frequently Asked Questions: Frequently Asked Questions. 6112 (line 6) 6113 * General setup for readability: What is the best setup for legibility?. 6114 (line 6) 6115 * Implicitly supported packages: Indirectly covered packages. 6116 (line 6) 6117 * Innate color qualities of the palette: Why are colors mostly variants of blue magenta cyan?. 6118 (line 6) 6119 * load-theme VS enable-theme: Differences between loading and enabling. 6120 (line 6) 6121 * Org custom emphasis faces: Custom Org emphasis faces. 6122 (line 6) 6123 * Org custom todo faces: Custom Org todo keyword and priority faces. 6124 (line 6) 6125 * Porting the themes to other editors: Port the Modus themes to other platforms?. 6126 (line 6) 6127 * Preview named colors or semantic color mappings: Preview theme colors. 6128 (line 6) 6129 * Pure white and pure black in terminal emulators: Range of color with terminal emulators. 6130 (line 6) 6131 * Remapping faces: Remap face with local value. 6132 (line 6) 6133 * Remapping pdf-tools backdrop: Backdrop for pdf-tools. 6134 (line 6) 6135 * sample configuration: Sample configuration with and without use-package. 6136 (line 6) 6137 * Screenshots: How do the themes look like. 6138 (line 6) 6139 * Sources of the themes: Sources of the themes. (line 6) 6140 * Switch themes without load-theme: Toggle themes without reloading them. 6141 (line 6) 6142 * Themes, not color schemes: Are these color schemes?. 6143 (line 6) 6144 * Use colors from the palette anywhere: Use theme colors in code with modus-themes-with-colors. 6145 (line 6) 6146 * use-package configuration: Sample configuration with and without use-package. 6147 (line 6) 6148 6149 6150 6151 Tag Table: 6152 Node: Top869 6153 Node: Overview8121 6154 Node: How do the themes look like10890 6155 Node: Learn about the latest changes11246 6156 Node: Installation11631 6157 Node: Install manually from source12558 6158 Node: Install from the archives13380 6159 Node: Install on GNU/Linux13976 6160 Node: Debian 11 Bullseye14466 6161 Node: GNU Guix14873 6162 Node: Dealing with byte compilation errors15153 6163 Node: Enable and load16308 6164 Node: The require-theme for built-in Emacs themes19159 6165 Node: Sample configuration with and without use-package20276 6166 Node: Differences between loading and enabling23184 6167 Node: Customization options25219 6168 Node: Custom reload theme28964 6169 Node: Disable other themes29881 6170 Node: Bold constructs31076 6171 Node: Italic constructs31910 6172 Node: Mixed fonts32678 6173 Node: Command prompts33671 6174 Node: Completion UIs35473 6175 Node: Org mode blocks38272 6176 Node: Heading styles40174 6177 Node: UI typeface44525 6178 Node: Palette overrides45453 6179 Node: Advanced customization49785 6180 Node: Palette override presets51445 6181 Node: Stylistic variants using palette overrides54234 6182 Node: Make the mode line borderless56143 6183 Node: Make the active mode line colorful57742 6184 Node: Make the tab bar more or less colorful59684 6185 Node: Make the fringe invisible or another color61912 6186 Node: Make links use subtle or no underlines63403 6187 Node: Make prompts more or less colorful64397 6188 Node: Make completion matches more or less colorful66058 6189 Node: Make comments yellow and strings green69955 6190 Node: Make code syntax use the old alt-syntax style71855 6191 Node: Make use of alternative styles for code syntax75133 6192 Node: Make matching parenthesis more or less intense78794 6193 Node: Make box buttons more or less gray80227 6194 Node: Make TODO and DONE more or less intense81530 6195 Node: Make headings more or less colorful83230 6196 Node: Make Org agenda more or less colorful85627 6197 Node: Make inline code in prose use alternative styles89084 6198 Node: Make mail citations and headers more or less colorful91622 6199 Node: Make the region preserve text colors plus other styles94314 6200 Node: Make mouse highlights more or less colorful96122 6201 Node: Make language underlines less colorful97426 6202 Node: Make line numbers use alternative styles98869 6203 Node: Make diffs use only a foreground100803 6204 Node: Make deuteranopia diffs red and blue instead of yellow and blue103570 6205 Node: Make the themes look like what the maintainer uses105989 6206 Node: More accurate colors in terminal emulators110684 6207 Node: Range of color with terminal emulators111973 6208 Node: Preview theme colors114684 6209 Node: Per-theme customization settings116526 6210 Node: Get a single color from the palette117869 6211 Node: Use theme colors in code with modus-themes-with-colors120114 6212 Node: Do not extend the region background122444 6213 Node: Add padding to mode line123239 6214 Node: Remap face with local value125800 6215 Node: Font configurations for Org and others128220 6216 Ref: Font configurations for Org and others-Footnote-1131126 6217 Node: Configure bold and italic faces131313 6218 Node: Custom Org todo keyword and priority faces135467 6219 Node: Custom Org emphasis faces139183 6220 Node: Update Org block delimiter fontification144003 6221 Node: Measure color contrast145917 6222 Node: Load theme depending on time of day148612 6223 Node: Backdrop for pdf-tools149619 6224 Node: Toggle themes without reloading them152515 6225 Node: A theme-agnostic hook for theme loading153788 6226 Node: Use more spacious margins or padding in Emacs frames156238 6227 Node: Custom hl-todo colors160325 6228 Node: Add support for solaire-mode161860 6229 Node: Face coverage164768 6230 Node: Supported packages165217 6231 Node: Indirectly covered packages170775 6232 Node: Notes on individual packages172141 6233 Node: Note on calendarel weekday and weekend colors173238 6234 Node: Note on git-gutter in Doom Emacs174383 6235 Node: Note on php-mode multiline comments176721 6236 Node: Note on underlines in compilation buffers177471 6237 Node: Note on inline Latex in Org buffers178305 6238 Node: Note on dimmerel178912 6239 Node: Note on display-fill-column-indicator-mode180394 6240 Node: Note on highlight-parenthesesel181790 6241 Node: Note on mmm-modeel background colors187765 6242 Node: Note for prism190062 6243 Node: Note on company-mode overlay pop-up193227 6244 Ref: Note on company-mode overlay pop-up-Footnote-1193954 6245 Ref: Note on company-mode overlay pop-up-Footnote-2194021 6246 Node: Note on ERC escaped color sequences194076 6247 Ref: Note on ERC escaped color sequences-Footnote-1195501 6248 Node: Note on powerline or spaceline195611 6249 Node: Note on SHR colors196022 6250 Node: Note on SHR fonts196443 6251 Node: Note on Ement colors and fonts197085 6252 Node: Note on pdf-tools link hints198592 6253 Node: Note on the Notmuch logo201049 6254 Node: Note on goto-address-mode faces201584 6255 Node: Frequently Asked Questions202699 6256 Node: Is the contrast ratio about adjacent colors?203327 6257 Node: What does it mean to avoid exaggerations?204831 6258 Node: Why are colors mostly variants of blue magenta cyan?206678 6259 Node: What is the best setup for legibility?210981 6260 Node: Are these color schemes?213623 6261 Node: Port the Modus themes to other platforms?217302 6262 Node: Contributing220143 6263 Node: Sources of the themes220537 6264 Node: Issues you can help with221428 6265 Node: Patches require copyright assignment to the FSF222816 6266 Node: Acknowledgements225033 6267 Node: GNU Free Documentation License229166 6268 Node: Indices254527 6269 Node: Function index254703 6270 Node: Variable index255883 6271 Node: Concept index258336 6272 6273 End Tag Table 6274 6275 6276 Local Variables: 6277 coding: utf-8 6278 End: