-._protesilaos-s-_modus_the.../README.org

319 lines
8.7 KiB
Org Mode
Raw Normal View History

2019-10-27 13:45:33 +01:00
#+TITLE: Modus Themes for GNU Emacs
#+AUTHOR: Protesilaos Stavrou
#+EMAIL: public@protesilaos.com
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:
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.
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
*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
earlier, "alpha" versions).
2019-10-27 13:45:33 +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
** 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
standalone packages in [[http://melpa.org/][MELPA]]. Assuming you have configured MELPA for
your package management needs, you can just run:
=M-x package-install RET modus-operandi-theme RET=
And/or:
=M-x package-install RET modus-vivendi-theme RET=
2019-12-01 17:57:37 +01:00
To be clear, that sequence means "press `Meta-X', then type
`package-install', hit the Return key, type the name of the package,
2019-12-01 17:57:37 +01:00
then hit Return to confirm your choice".
*** 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
** 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
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:
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
(load-theme 'modus-operandi t) ; Light theme
(load-theme 'modus-vivendi t) ; Dark theme
2019-10-27 13:45:33 +01:00
#+END_SRC
* 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:
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-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-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…
+ 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
+ avy
+ aw
2019-12-03 17:50:57 +01:00
+ column-enforce-mode
2019-10-29 16:29:10 +01:00
+ company-mode*
+ compilation-mode
+ completions
+ custom (M-x customize)
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
+ diff-mode
+ dired
+ 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
+ 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
+ eww
+ fancy-dabbrev
+ font-lock (generic syntax highlighting)
2019-12-05 08:48:12 +01:00
+ flycheck
2019-12-05 08:48:29 +01:00
+ flycheck-posframe
+ flyspell
+ git
+ git-gutter (and variants)
+ gnus
+ helm*
2019-11-24 14:34:43 +01:00
+ hydra
+ ido-mode
2019-12-03 17:49:54 +01:00
+ iedit
+ info pages
+ isearch, occur, etc.
2019-10-29 16:29:10 +01:00
+ ivy*
2019-12-04 21:43:53 +01:00
+ ivy-posframe
+ magit
+ markdown-mode
+ matching parentheses
+ messages
+ modeline
2019-12-02 17:40:37 +01:00
+ mood-line
+ mu4e
2019-11-24 09:10:26 +01:00
+ neotree
2019-10-29 16:29:10 +01:00
+ org-mode*
+ outline-mode
+ pass
2019-12-04 05:46:32 +01:00
+ prodigy
2019-11-24 14:35:14 +01:00
+ rainbow-blocks
+ rainbow-delimiters
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
+ swiper
+ sx
2019-10-29 08:43:58 +01:00
+ term
+ transient (pop-up windows like Magit's)
+ treemacs
+ undo-tree
+ visual-regexp
2019-12-06 10:44:52 +01:00
+ wgrep
+ 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-12-06 10:44:34 +01:00
Plus many other miscellaneous faces that are provided by the out-of-the-box
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:
These are face groups that I am aware of but do not know how to access
or do not actively use. I generally need to see how a face looks in its
context before assessing its aesthetics or specific requirements.
Use =M-x list-faces-display= to get these.
+ tty-menu
+ vc-{conflict-state,state-base}…
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-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:
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.
Whatever you do, please bear in mind the overarching objective of the
Modus themes: to keep a contrast ratio that is greater or equal to 7:1
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-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:
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]].