-
Notifications
You must be signed in to change notification settings - Fork 351
Emacs Theme #413
Description
I've been working on a full Emacs theme on this branch of theme-magic, an Emacs package designed to export Emacs' color scheme to Pywal. This is my attempt at having Emacs generate its colors from wal
.
Here are some results from the current version of the theme:
The theme is a single -theme.el
file, adapted from the Spacemacs themes (light and dark variants). I chose them because they're attractive, comprehensive, and their design principles were easy to reverse-engineer and emulate on-the-fly. I take the 16 Pywal colors, produce intermediate colors in a similar style to the Spacemacs themes, and apply them.
The theme currently follows two architectural principles that ensure it can be turned into a template file for Pywal:
- It should only take 16 named colors as input. Everything else should be generated dynamically.
- All logic is encapsulated within the theme. No additional files are needed. (Note that it does rely on the inbuilt Emacs library
color.el
. This can be changed.)
Currently, I'm pulling the colors from ~/.cache/wal/colors.json
each time the Emacs theme is loaded. Ideally, I want to have the theme file generated automatically by Pywal. I can then extend theme-magic
to subscribe to Pywal updates and handle updating the Emacs theme automatically.
This theme file is complex - it's not just a set of colors. It has a lot of logic embedded within it so it can produce something attractive and functional from a 16-color input. In PR #43, complexity was not preferred, but this is inherently challenging with Emacs. Themes are essentially written as functions, and good themes tend to be large and use a wide range of colors. Personally, I figure aesthetics are paramount. The point of Pywal is to be aesthetically pleasing. I didn't want to sacrifice that for simplicity.
So, basically, my question is what to do next. I've been co-ordinating with the ewal
maintainer and we've both taken different approaches, with some crossover. He wasn't sure how to proceed either.
- The code for the theme is very dirty at the moment (it's just a proof of concept), but once it's cleaned up, should I turn it into a template and open a pull request to include it in Pywal?
- Do you prefer the approach taken by
ewal
? - Would you prefer I integrate the theme into
theme-magic
and provide a function in the package that imports from Pywal and applies its colors?