README.org
June 26, 2026 ยท View on GitHub
#+TITLE: Modus Ewal theme [[https://melpa.org/#/modus-ewal-theme][file:https://melpa.org/packages/modus-ewal-theme-badge.svg]]
- Description A theme that retrieves pywal colors and generates a theme using =modus-themes= theme generation functions.
- Screenshots [[file:screenshot-light.png]] [[file:screenshot-dark.png]]
- Installation The package is available on [[https://melpa.org/#/modus-ewal-theme][MELPA]], so you can install it with =package-install=, =use-package= or other package manager.
- Usage =load-theme= should work.
If you don't have the pywal cache file or it's not made right, the theme will not load, and you will be messaged about it. In such case, you may need to load the package again.
The theme loads new pywal colors on every load, so invoke =load-theme= after loading a new pywal colorscheme. You can automate it by adding a file watcher like this: #+begin_src emacs-lisp (file-notify-add-watch ewal-json-file '(change) (lambda (&rest _) (load-theme 'modus-ewal t))) #+end_src
- Example configuration
(load-theme modus-ewal t)will work if you don't use Emacs daemon. The colors will not look right though if Emacs is run as a daemon. Adding the =load-theme= to =server-after-make-frame-hook= will make it work. Here is an example configuration that covers both cases: #+begin_src emacs-lisp (use-package modus-ewal-theme :config (unless (daemonp) (load-theme 'modus-ewal t)) (defun custom-modus-ewal-theme-load-once () (and (not (member 'modus-ewal custom-enabled-themes)) (load-theme 'modus-ewal t)) ;; once run, it can be removed (remove-hook 'server-after-make-frame-hook #'custom-modus-ewal-theme-load-once)) (add-hook 'server-after-make-frame-hook #'custom-modus-ewal-theme-load-once)) #+end_src - Tips =modus-ewal-theme-custom-faces= can be used to customize certain faces. The changes will be visible after loading the theme again.
For example, to customize a face, you can add a face configuration like this: #+begin_src emacs-lisp (add-to-list 'modus-ewal-theme-custom-faces (quote `(show-paren-match ((,c :foreground "green"))))) #+end_src The =quote= function is neccessary as we don't want the =c= variable to be evaluated yet.
We can also change the values whether the theme is light or dark like this: #+begin_src emacs-lisp (add-to-list 'modus-ewal-theme-custom-faces (quote `(show-paren-match ((,c :foreground ,(if (modus-themes-color-dark-p bg-main) "red" "blue")))))) #+end_src
Instead of red, green, blue or other simple colors, you can use modus color variables that you can see in =modus-ewal-theme-modus-palette= variable.
- Credits
- The maintainers of [[https://github.com/cyruseuros/ewal][ewal]]
- Protesilaos Stavrou for adding theme generating functionality to [[https://protesilaos.com/emacs/modus-themes][Modus Themes]]