Setting solaire-mode-auto-swap-bg has no effect?
ianyepan opened this issue · 6 comments
My default face bg is #1E1E1E
, and here's the definition of my solaire-default-face:
`(solaire-default-face ((t (:inherit default :background "#252526"))))
I wish that solaire-mode assigns the original "#1E1E1E" to my coding background, and "#252526" to all other secondary backgrounds like neotree, vterm, magit etc. But now I have a brighter coding background instead...
Setting solaire-mode-auto-swap-bg to either true or nil makes no difference.
Here's the relevant config:
(use-package solaire-mode
:hook ((change-major-mode . turn-on-solaire-mode)
(after-revert . turn-on-solaire-mode)
(ediff-prepare-buffer . solaire-mode)
(minibuffer-setup . solaire-mode-in-minibuffer))
:config
(setq solaire-mode-auto-swap-bg t)
(solaire-global-mode +1))
(use-package vscode-dark-plus-theme
:config
(load-theme 'vscode-dark-plus t))
Any help is much appreciated!
@ianpan870102, I went through this too when starting to use your theme. It took a while to find, but b6cc22e added
(defcustom solaire-mode-themes-to-face-swap '("^doom-")
I had to change the value of the variable to include your theme. It seems like this probably breaks out of the box support for the themes solaire-mode lists in the Readme as having support, like Modus-themes, too.
I had to change the value of the variable to include your theme.
Can you please let us know the specific steps you did to finally make vscode-dark-plus play well with solaire mode? I'd love to know! Thanks.
I had to change the value of the variable to include your theme.
Can you please let us know the specific steps you did to finally make vscode-dark-plus play well with solaire mode? I'd love to know! Thanks.
Sorry for not being more specific. I added (setq solaire-mode-themes-to-face-swap '("^vscode-"))
to my config file. My e-lisp fu is pretty weak and I couldn't figure out how to get it to work for multiple themes/theme-prefixes.
I just tried this approach and it works! I guess we just need @hlissner to add more themes into the list of solaire-mode-themes-to-face-swap
by default?
Edit: this is the config that works now
(use-package solaire-mode
:hook ((change-major-mode . turn-on-solaire-mode)
(after-revert . turn-on-solaire-mode)
(ediff-prepare-buffer . solaire-mode)
(minibuffer-setup . solaire-mode-in-minibuffer))
:config
(add-to-list 'solaire-mode-themes-to-face-swap '"vscode-dark-plus")
(setq solaire-mode-auto-swap-bg t)
(solaire-global-mode +1))
(use-package vscode-dark-plus-theme
:after solaire-mode
:config
(load-theme 'vscode-dark-plus t))
I added (setq solaire-mode-themes-to-face-swap '("^vscode-")) to my config file. My e-lisp fu is pretty weak and I couldn't figure out how to get it to work for multiple themes/theme-prefixes.
I believe this is a bit better: (add-to-list 'solaire-mode-themes-to-face-swap '"vscode-dark-plus")
I've rewritten solaire-mode to change its strategy from activating solaire-mode in "real" buffers (e.g. file-visiting buffers), to actiating solaire-mode in "unreal" buffers (e.g. the minibuffer/sidebars/etc). I've done this to address a number of issues, including a performance issue with remapping default
.
Indirectly, this should have resolved this issue (as bg swapping behavior as been inverted). If that's not the case, then this will fix it:
(with-eval-after-load 'solaire-mode
(add-to-list 'solaire-mode-themes-to-face-swap 'vscode-dark-plus))