2019-10-27 13:45:33 +01:00
|
|
|
#+TITLE: Modus Themes for GNU Emacs
|
|
|
|
#+AUTHOR: Protesilaos Stavrou
|
|
|
|
#+EMAIL: public@protesilaos.com
|
2019-10-17 07:36:10 +02:00
|
|
|
|
2019-10-27 13:45:33 +01:00
|
|
|
* Overview
|
2019-11-03 20:06:16 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:d42d56a4-9252-4858-ac8e-3306cdd24e19
|
|
|
|
:END:
|
2019-10-17 07:36:10 +02:00
|
|
|
|
2019-12-01 10:01:17 +01:00
|
|
|
This is a set of accessible themes for GNU Emacs. The contrast ratio
|
|
|
|
between foreground and background values should always be >= 7:1, which
|
|
|
|
conforms with the WCAG AAA accessibility standard. This is the highest
|
|
|
|
standard of its kind.
|
2019-10-17 07:36:10 +02:00
|
|
|
|
2019-12-01 10:01:17 +01:00
|
|
|
The /Modus themes/ project consists of two standalone items, one where
|
|
|
|
dark text is cast on a light backdrop (Modus Operandi) and another where
|
|
|
|
light text is displayed against a dark background (Modus Vivendi).
|
2019-10-27 13:45:33 +01:00
|
|
|
|
2019-11-24 13:31:39 +01:00
|
|
|
*Check the [[https://gitlab.com/protesilaos/modus-themes/wikis/Screenshots][Wiki page with the screen shots]].* Also note that I demo these
|
2019-10-27 18:20:45 +01:00
|
|
|
themes in [[https://protesilaos.com/code-casts][my Emacs-related screen casts]] (though older videos contain
|
2019-12-01 10:01:17 +01:00
|
|
|
earlier, "alpha" versions).
|
2019-10-27 13:45:33 +01:00
|
|
|
|
2019-12-01 10:01:17 +01:00
|
|
|
* Install and auto-load
|
2019-11-03 20:06:16 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:25c3ecd3-8025-414c-9b96-e4d6266c6fe8
|
|
|
|
:END:
|
2019-10-27 13:45:33 +01:00
|
|
|
|
2019-12-01 10:01:17 +01:00
|
|
|
** Install the MELPA packages
|
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:c3e293e8-8464-4196-aefd-184027116ded
|
|
|
|
:END:
|
|
|
|
|
|
|
|
I maintain /Modus Operandi/ (light theme) and /Modus Vivendi/ (dark) as
|
2019-12-09 13:38:49 +01:00
|
|
|
standalone packages in [[http://melpa.org/][MELPA]] (and MELPA Stable). Assuming you have
|
|
|
|
configured that repository for your package management needs, you can
|
|
|
|
just run:
|
2019-12-01 10:01:17 +01:00
|
|
|
|
|
|
|
=M-x package-install RET modus-operandi-theme RET=
|
|
|
|
|
|
|
|
And/or:
|
|
|
|
|
|
|
|
=M-x package-install RET modus-vivendi-theme RET=
|
|
|
|
|
2019-12-09 13:38:49 +01:00
|
|
|
To be clear, that sequence means:
|
|
|
|
|
|
|
|
+ press `Meta-X'
|
|
|
|
+ type `package-install'
|
|
|
|
+ hit the Return key
|
|
|
|
+ type the name of the package
|
|
|
|
+ hit Return to confirm your choice
|
2019-12-01 10:01:17 +01:00
|
|
|
|
|
|
|
*** With `use-package'
|
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:3ab0ac39-38fb-405b-8a15-771cbd843b6d
|
|
|
|
:END:
|
|
|
|
|
|
|
|
For a declarative approach with =use-package=, you can write something
|
|
|
|
like this:
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package modus-operandi-theme
|
|
|
|
:ensure t)
|
|
|
|
|
|
|
|
(use-package modus-vivendi-theme
|
|
|
|
:ensure t)
|
|
|
|
#+END_SRC
|
2019-10-27 13:45:33 +01:00
|
|
|
|
2019-12-01 10:01:17 +01:00
|
|
|
** Manual installation method
|
2019-11-03 20:06:16 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:0317c29a-3ddb-4a0a-8ffd-16c781733ea2
|
|
|
|
:END:
|
2019-10-27 13:45:33 +01:00
|
|
|
|
2019-12-01 10:01:17 +01:00
|
|
|
Download the files in this repository ending in =*-theme.el= and place
|
|
|
|
them in an appropriate directory, such as =~/.emacs.d/themes/=. To make
|
|
|
|
sure the filesystem path of your choice is read by Emacs, insert the
|
|
|
|
following in your initialisation file:
|
2019-10-27 13:45:33 +01:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
** Load automatically
|
2019-11-03 20:06:16 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:ae978e05-526f-4509-a007-44a0925b8bce
|
|
|
|
:END:
|
2019-10-17 07:36:10 +02:00
|
|
|
|
2019-12-01 10:01:17 +01:00
|
|
|
To load the theme from your Emacs initialisation file use the relevant
|
|
|
|
snippet:
|
2019-10-27 13:45:33 +01:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2019-12-01 10:01:17 +01:00
|
|
|
(load-theme 'modus-operandi t) ; Light theme
|
|
|
|
(load-theme 'modus-vivendi t) ; Dark theme
|
2019-10-27 13:45:33 +01:00
|
|
|
#+END_SRC
|
|
|
|
|
2019-12-09 13:38:49 +01:00
|
|
|
Make sure to /remove any other theme/ that is being loaded, otherwise
|
|
|
|
you might run into unexpected issues.
|
|
|
|
|
2019-12-03 13:52:02 +01:00
|
|
|
* Customisation options
|
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:d414ca47-6dce-4905-9f2e-de1465bf23bb
|
|
|
|
:END:
|
|
|
|
|
|
|
|
Both of the Modus themes expose some variables that allow users to tweak
|
|
|
|
the look of the theme. By default, all variables are deactivated,
|
|
|
|
meaning that *you need to explicitly opt in*.
|
|
|
|
|
|
|
|
This is what is available right now (use the ones appropriate to the
|
|
|
|
theme of your choice):
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
;; Choose to render some code constructs in slanted text (italics). The
|
|
|
|
;; default, shown below, is to not use italics, unless it is absolutely
|
|
|
|
;; necessary.
|
|
|
|
(setq modus-operandi-theme-slanted-constructs nil)
|
|
|
|
|
|
|
|
(setq modus-vivendi-theme-slanted-constructs nil)
|
|
|
|
|
|
|
|
;; Use proportionately-spaced fonts (variable-pitch) for headings. The
|
|
|
|
;; default is to use whatever font the user has selected, typically a
|
|
|
|
;; monospaced typeface.
|
|
|
|
(setq modus-operandi-theme-proportional-fonts nil)
|
|
|
|
|
|
|
|
(setq modus-vivendi-theme-proportional-fonts nil)
|
|
|
|
|
|
|
|
;; Whether headings should be scaled or have the same height as body
|
|
|
|
;; text. The default is to keep everything the same as the base size.
|
|
|
|
(setq modus-operandi-theme-scale-headings nil)
|
|
|
|
|
|
|
|
(setq modus-vivendi-theme-scale-headings nil)
|
|
|
|
|
|
|
|
;; Font scale that should apply to headings. These are the default values.
|
|
|
|
(setq modus-operandi-theme-scale-1 1.05)
|
|
|
|
(setq modus-operandi-theme-scale-2 1.1)
|
|
|
|
(setq modus-operandi-theme-scale-3 1.15)
|
|
|
|
(setq modus-operandi-theme-scale-4 1.2)
|
|
|
|
|
|
|
|
(setq modus-vivendi-theme-scale-1 1.05)
|
|
|
|
(setq modus-vivendi-theme-scale-2 1.1)
|
|
|
|
(setq modus-vivendi-theme-scale-3 1.15)
|
|
|
|
(setq modus-vivendi-theme-scale-4 1.2)
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
*NOTE* that all customisation options must be declared /before/ loading
|
|
|
|
the theme, else they will not be parsed and have no effect.
|
|
|
|
|
2019-10-27 13:45:33 +01:00
|
|
|
* Face coverage
|
2019-11-03 20:06:16 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:944a3bdf-f545-40a0-a26c-b2cec8b2b316
|
|
|
|
:END:
|
2019-10-17 07:36:10 +02:00
|
|
|
|
2019-12-01 10:01:17 +01:00
|
|
|
This list will always be updated to reflect the current state of the
|
|
|
|
project. The idea is to offer an overview of the /known status/ of all
|
|
|
|
affected face groups.
|
2019-10-17 07:36:10 +02:00
|
|
|
|
2019-10-27 13:45:33 +01:00
|
|
|
** Full support
|
2019-11-03 20:06:16 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:5ea98392-1376-43a4-8080-2d42a5b690ef
|
|
|
|
:END:
|
2019-10-17 07:36:10 +02:00
|
|
|
|
2019-12-06 10:44:34 +01:00
|
|
|
The items with an appended asterisk =*= tend to have lots of extensions, so
|
2019-10-29 16:29:10 +01:00
|
|
|
the "full support" may not be 100% true…
|
|
|
|
|
2019-10-23 18:32:48 +02:00
|
|
|
+ all-the-icons
|
2019-12-03 16:50:15 +01:00
|
|
|
+ annotate
|
2019-10-18 09:18:18 +02:00
|
|
|
+ anzu
|
2019-11-15 05:15:40 +01:00
|
|
|
+ artbollocks-mode
|
2019-11-24 13:43:03 +01:00
|
|
|
+ auto-dim-other-buffers
|
2019-10-17 07:36:10 +02:00
|
|
|
+ avy
|
2019-12-14 06:13:15 +01:00
|
|
|
+ ace-window
|
2019-12-03 17:50:57 +01:00
|
|
|
+ column-enforce-mode
|
2019-10-29 16:29:10 +01:00
|
|
|
+ company-mode*
|
2019-12-08 14:01:15 +01:00
|
|
|
+ company-posframe
|
2019-11-22 10:34:39 +01:00
|
|
|
+ compilation-mode
|
|
|
|
+ completions
|
2019-11-22 10:35:37 +01:00
|
|
|
+ custom (M-x customize)
|
2019-12-14 14:34:12 +01:00
|
|
|
+ dashboard (emacs-dashboard)
|
2019-10-23 21:47:36 +02:00
|
|
|
+ deadgrep
|
2019-12-03 17:51:56 +01:00
|
|
|
+ define-word
|
2019-11-03 17:01:11 +01:00
|
|
|
+ diff-hl
|
2019-11-03 17:01:37 +01:00
|
|
|
+ diff-mode
|
2019-12-05 08:55:31 +01:00
|
|
|
+ dired
|
2019-10-17 07:36:10 +02:00
|
|
|
+ dired-async
|
|
|
|
+ dired-subtree
|
|
|
|
+ diredfl
|
2019-12-03 04:54:35 +01:00
|
|
|
+ doom-modeline
|
2019-12-03 20:17:38 +01:00
|
|
|
+ easy-jekyll
|
2019-12-03 17:52:19 +01:00
|
|
|
+ easy-kill
|
2019-11-24 17:43:05 +01:00
|
|
|
+ ediff
|
2019-12-03 20:18:26 +01:00
|
|
|
+ eldoc-box
|
2019-10-17 07:36:10 +02:00
|
|
|
+ elfeed
|
|
|
|
+ emms
|
2019-11-24 14:18:46 +01:00
|
|
|
+ epa
|
2019-11-25 05:40:10 +01:00
|
|
|
+ erc
|
2019-10-29 08:43:31 +01:00
|
|
|
+ eshell
|
2019-12-14 18:59:17 +01:00
|
|
|
+ evil* (evil-mode)
|
2019-12-14 18:59:57 +01:00
|
|
|
+ evil-goggles
|
2019-10-17 07:36:10 +02:00
|
|
|
+ eww
|
2019-12-08 05:21:13 +01:00
|
|
|
+ eyebrowse
|
2019-10-17 07:36:10 +02:00
|
|
|
+ fancy-dabbrev
|
2019-12-05 08:55:31 +01:00
|
|
|
+ font-lock (generic syntax highlighting)
|
2019-12-05 08:48:12 +01:00
|
|
|
+ flycheck
|
2019-12-05 08:48:29 +01:00
|
|
|
+ flycheck-posframe
|
2019-10-17 07:36:10 +02:00
|
|
|
+ flyspell
|
2019-11-24 16:11:23 +01:00
|
|
|
+ git
|
2019-11-24 14:19:39 +01:00
|
|
|
+ git-gutter (and variants)
|
2019-10-17 07:36:10 +02:00
|
|
|
+ gnus
|
2019-10-29 16:28:43 +01:00
|
|
|
+ helm*
|
2019-11-24 14:34:43 +01:00
|
|
|
+ hydra
|
2019-10-17 07:36:10 +02:00
|
|
|
+ ido-mode
|
2019-12-03 17:49:54 +01:00
|
|
|
+ iedit
|
2019-10-17 07:36:10 +02:00
|
|
|
+ info pages
|
|
|
|
+ isearch, occur, etc.
|
2019-10-29 16:29:10 +01:00
|
|
|
+ ivy*
|
2019-12-04 21:43:53 +01:00
|
|
|
+ ivy-posframe
|
2019-12-18 16:53:15 +01:00
|
|
|
+ keycast
|
2019-11-24 16:11:23 +01:00
|
|
|
+ magit
|
2019-10-17 07:36:10 +02:00
|
|
|
+ markdown-mode
|
|
|
|
+ matching parentheses
|
|
|
|
+ messages
|
|
|
|
+ modeline
|
2019-12-02 17:40:37 +01:00
|
|
|
+ mood-line
|
2019-10-17 07:36:10 +02:00
|
|
|
+ mu4e
|
2019-11-24 09:10:26 +01:00
|
|
|
+ neotree
|
2019-10-29 16:29:10 +01:00
|
|
|
+ org-mode*
|
2019-10-17 07:36:10 +02:00
|
|
|
+ outline-mode
|
2019-12-18 14:54:41 +01:00
|
|
|
+ paren-face
|
2019-11-03 20:05:03 +01:00
|
|
|
+ pass
|
2019-12-12 15:52:11 +01:00
|
|
|
+ persp-mode
|
2019-12-08 05:21:13 +01:00
|
|
|
+ perspective
|
2019-12-18 13:44:39 +01:00
|
|
|
+ powerline
|
2019-12-04 05:46:32 +01:00
|
|
|
+ prodigy
|
2019-11-24 14:35:14 +01:00
|
|
|
+ rainbow-blocks
|
2019-10-17 07:36:10 +02:00
|
|
|
+ rainbow-delimiters
|
2019-12-18 08:41:43 +01:00
|
|
|
+ ruler-mode
|
2019-12-04 06:09:10 +01:00
|
|
|
+ smart-mode-line
|
2019-11-30 04:06:25 +01:00
|
|
|
+ smartparens
|
2019-11-13 21:02:25 +01:00
|
|
|
+ smerge
|
2019-10-26 13:08:06 +02:00
|
|
|
+ speedbar
|
2019-10-17 07:36:10 +02:00
|
|
|
+ swiper
|
2019-11-24 18:53:01 +01:00
|
|
|
+ sx
|
2019-10-29 08:43:58 +01:00
|
|
|
+ term
|
2019-11-24 16:58:24 +01:00
|
|
|
+ transient (pop-up windows like Magit's)
|
2019-10-17 07:36:10 +02:00
|
|
|
+ treemacs
|
|
|
|
+ undo-tree
|
|
|
|
+ visual-regexp
|
2019-12-06 10:44:52 +01:00
|
|
|
+ wgrep
|
2019-10-17 07:36:10 +02:00
|
|
|
+ which-key
|
|
|
|
+ whitespace-mode
|
2019-11-15 04:58:51 +01:00
|
|
|
+ writegood-mode
|
2019-11-24 11:35:27 +01:00
|
|
|
+ xterm-color (and ansi-colors)
|
2019-11-24 13:30:46 +01:00
|
|
|
+ ztree
|
2019-10-17 07:36:10 +02:00
|
|
|
|
2019-12-06 10:44:34 +01:00
|
|
|
Plus many other miscellaneous faces that are provided by the out-of-the-box
|
2019-12-05 08:55:31 +01:00
|
|
|
Emacs distribution.
|
|
|
|
|
2019-10-27 13:45:33 +01:00
|
|
|
** Covered but not styled explicitly
|
2019-11-03 20:06:16 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:8ada963d-046d-4c67-becf-eee18595f902
|
|
|
|
:END:
|
2019-10-27 13:45:33 +01:00
|
|
|
|
|
|
|
These do not require any extra styles because they are configured to
|
|
|
|
inherit from some basic faces. Please confirm.
|
|
|
|
|
|
|
|
+ calendar
|
|
|
|
+ change-log
|
|
|
|
+ comint
|
|
|
|
+ bongo
|
|
|
|
+ log-edit
|
|
|
|
+ package menu
|
|
|
|
+ rmail
|
|
|
|
|
|
|
|
** Help needed
|
2019-11-03 20:06:16 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:bcc3f6f9-7ace-4e2a-8dbb-2bf55574dae5
|
|
|
|
:END:
|
2019-10-17 07:36:10 +02:00
|
|
|
|
|
|
|
These are face groups that I am aware of but do not know how to access
|
2019-10-24 17:23:18 +02:00
|
|
|
or do not actively use. I generally need to see how a face looks in its
|
|
|
|
context before assessing its aesthetics or specific requirements.
|
2019-10-17 07:36:10 +02:00
|
|
|
|
|
|
|
Use =M-x list-faces-display= to get these.
|
|
|
|
|
|
|
|
+ tty-menu
|
|
|
|
+ vc-{conflict-state,state-base}…
|
|
|
|
|
2019-10-24 17:23:18 +02:00
|
|
|
Note that the themes do provide support for =org-mode=, but some of
|
|
|
|
these interfaces have been decided based on indirect experience. If you
|
|
|
|
encounter anything that does not "feel right", please let me know.
|
2019-10-17 07:36:10 +02:00
|
|
|
|
2019-11-24 15:37:40 +01:00
|
|
|
** Will NOT be supported
|
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:46756fcc-0d85-4f77-b0e3-64f890e1c2ea
|
|
|
|
:END:
|
|
|
|
|
|
|
|
I have thus far identified a single package that does fit into the
|
|
|
|
overarching objective of this project: [[https://github.com/hlissner/emacs-solaire-mode][solaire]]. It basically tries to
|
|
|
|
cast a less intense background on the main file-visiting buffers, so
|
|
|
|
that secondary elements like sidebars can have the default (pure
|
|
|
|
white/black) background.
|
|
|
|
|
|
|
|
/I will only support this package if it ever supports the inverse
|
|
|
|
effect/: less intense colours (but still accessible) for supportive
|
|
|
|
interfaces and the intended styles for the content you are actually
|
|
|
|
working on.
|
|
|
|
|
2019-10-27 13:45:33 +01:00
|
|
|
* Contributing
|
2019-11-03 20:06:16 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:25ba8d6f-6604-4338-b774-bbe531d467f6
|
|
|
|
:END:
|
2019-10-17 07:36:10 +02:00
|
|
|
|
|
|
|
A few tasks you can help me with, sorted from the most probable to the
|
|
|
|
least likely:
|
|
|
|
|
|
|
|
+ Suggest refinements to packages that are covered.
|
|
|
|
+ Report packages not covered thus far.
|
|
|
|
+ Report bugs, inconsistencies, shortcomings.
|
|
|
|
+ Help expand the documentation of covered-but-not-styled packages.
|
|
|
|
+ Suggest refinements to the colour palette.
|
|
|
|
+ Help expand this document or any other piece of documentation.
|
|
|
|
|
|
|
|
It would be great if your feedback also includes some screenshots, GIFs,
|
|
|
|
or short videos. Though this is not a requirement.
|
|
|
|
|
2019-10-31 16:41:20 +01:00
|
|
|
Whatever you do, please bear in mind the overarching objective of the
|
2019-10-17 07:36:10 +02:00
|
|
|
Modus themes: to keep a contrast ratio that is greater or equal to 7:1
|
2019-10-31 16:41:20 +01:00
|
|
|
between background and foreground colours. If a compromise is ever
|
|
|
|
necessary between aesthetics and accessibility, it shall always be made
|
|
|
|
in the interest of latter.
|
2019-10-17 07:36:10 +02:00
|
|
|
|
2019-10-27 13:45:33 +01:00
|
|
|
* COPYING
|
2019-11-03 20:06:16 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: h:66652183-2fe0-46cd-b4bb-4121bad78d57
|
|
|
|
:END:
|
2019-10-17 07:36:10 +02:00
|
|
|
|
|
|
|
The Modus Themes are distributed under the terms of the GNU General
|
|
|
|
Public License version 3 or, at your choice, any later version. See the
|
|
|
|
COPYING file distributed in the [[https://gitlab.com/protesilaos/modus-themes][project's Git repository]].
|