reddit / emacs

Doom: Trying to tweak an existing theme, not having any luck

aqjo · 2022-08-14 18:18
I like [Steve Purcell's SanityInc Tomorrow themes](https://github.com/purcell/color-theme-sanityinc-tomorrow), but would like something between `night` and `bright`. I copied `emacs/.local/elpa/color-theme-sanityinc-tomorrow-20220412.1643/sanityinc-tomorrow-night-theme.el` and `./emacs/.local/elpa/color-theme-sanityinc-tomorrow-20220412.1643/color-theme-sanityinc-tomorrow.el` to `~/.config/doom/themes` and added `my-` to each. I then added a color definition I called `dusk` to `my-color-theme-sanityinc-tomorrow.el`: ``` 69c69,82 < '((night . ((background . "#1d1f21") --- > '((dusk . ((background . "#1d1f21") > (alt-background . "#151515151515") > (current-line . "#2a2a2a") > (selection . "#424242") > (foreground . "#eaeaea") > (comment . "#969896") > (red . "#d54e53") > (orange . "#e78c45") > (yellow . "#e7c547") > (green . "#b9ca4a") > (aqua . "#70c0b1") > (blue . "#7aa6da") > (purple . "#c397d8"))) > (night . ((background . "#1d1f21") 1651c1664 < (defun color-theme-sanityinc-tomorrow (mode) --- > (defun my-color-theme-sanityinc-tomorrow (mode) 1676a1690,1695 > (defun color-theme-sanityinc-tomorrow-dusk () > "Apply the tomorrow dusk theme." > (interactive) > (my-color-theme-sanityinc-tomorrow 'dusk)) > ``` And created this `my-sanityinc-tomorrow-dusk-theme.el`: ``` (add-load-path! "/Users/aqjo/.config/doom/themes") (require 'my-color-theme-sanityinc-tomorrow) (color-theme-sanityinc-tomorrow-dusk) ``` Despite my having defined it as shown above, the latest error I'm getting is `Symbol's function definition is void: color-theme-sanityinc-tomorrow-dusk`. I feel like I might be making this more difficult than it needs to be. Is there a simple way to define a theme with the colors I want without all the intricacies that are in this set of themes? In fact, I might use `afternoon` or `dark+` if I could make the alt-background (I think it is) more prominent. Thanks
shakkle · 2022-08-15 11:31
use M-x customize-create-theme instead of copying the files yourself
Err000r__1010 · 2022-08-29 06:47
if it's in $DOOMDIR/themes, you don't need `add-load-path` just use `(setq doom-theme 'my-sanityinc-tomorrow-dusk)` Yes omit the word "theme", and ".el" from the name. Also: change the name of the theme function in the edited files to avoid conflict (def-doom-theme my-blah-blah-blah ...)