Hi Prot,
I've just switched to your standard-dark theme and really like it.
Great job!
The only thing which I'd like to change is the background color. Right
now it's as black as it gets but I'd like to use, e.g., gray5. How do I
achieve that?
Reading the docs, I think the standard-themes-with-colors business is
for extending the theme with its predefined faces and colors to faces
not covered yet but not for changing the theme's colors itself.
So I've thought I could sneak in a
(setf (alist-get 'bg-main standard-dark-palette) "gray5")
which indeed modifies the bg-main entry in standard-dark-palette to my
liking. However, since standard-dark-palette is a defconst (and not a
defvar), when I do standard-themes-toggle twice, the theme is loaded
again, the defconst is re-evaluated and gets the #000000 value again for
bg-main.
I guess I could just do
(set-face-background 'default "gray5")
but given that bg-main is used also in other face definitions, that
would only cover one case (although the most prominent).
Thanks,
Tassilo
PS: Please keep me in the Cc, I'm not subscribed.
> From: Tassilo Horn <tsdh@gnu.org>> Date: Thu, 22 Dec 2022 17:43:05 +0100>> Hi Prot,
Good day Tassilo,
> I've just switched to your standard-dark theme and really like it.> Great job!
Thank you!
> The only thing which I'd like to change is the background color. Right> now it's as black as it gets but I'd like to use, e.g., gray5. How do I> achieve that?
The current development version includes a way to override palette
entries by simply mirroring the original palette and then changing the
desired values. The variables are:
* standard-themes-common-palette-overrides
* standard-light-palette-overrides
* standard-dark-palette-overrides
Documented here:
<https://protesilaos.com/emacs/standard-themes#h:34fe0582-960b-45dc-af5d-23c8f3e9d724>.
> Reading the docs, I think the standard-themes-with-colors business is> for extending the theme with its predefined faces and colors to faces> not covered yet but not for changing the theme's colors itself.> [... 22 lines elided]
What you did here is now covered by the overrides. Maybe you can try
the standard-themes package from GNU-devel ELPA? I am not releasing a
new version just yet as I want to make sure that I covered all cases
where overrides can be applied.
All the best,
Prot
--
Protesilaos Stavrou
https://protesilaos.com
Protesilaos Stavrou <info@protesilaos.com> writes:
Hey Prot,
>> The only thing which I'd like to change is the background color.>> Right now it's as black as it gets but I'd like to use, e.g., gray5.>> How do I achieve that?>> The current development version includes a way to override palette> entries by simply mirroring the original palette and then changing the> desired values. The variables are:>> * standard-themes-common-palette-overrides> * standard-light-palette-overrides> * standard-dark-palette-overrides>> Documented here:> <https://protesilaos.com/emacs/standard-themes#h:34fe0582-960b-45dc-af5d-23c8f3e9d724>.
You've forced me to figure out how I can enable the gnu-devel archive,
but only for some specific package. Thank you! In the end, it were
your docs which explained it perfectly well. So now I have:
--8<---------------cut here---------------start------------->8---
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("gnu-devel" . "https://elpa.gnu.org/devel/") t)
(setq package-archive-priorities
'(("gnu" . 10)
("nongnu" . 10)
("melpa" . 10)
;; Lower priority because I want to explicitly define for a single
;; package that this archive is to be used.
("gnu-devel" . 0)))
(use-package standard-themes
:ensure t
:pin gnu-devel ;<== use the devel version
:init
;; ...
(setq standard-dark-palette-overrides '((bg-main "#1f182a")))
;; ...
)
--8<---------------cut here---------------end--------------->8---
Works like a charm.
Thanks a lot, Prot!
Tassilo
> From: Tassilo Horn <tsdh@gnu.org>> Date: Fri, 23 Dec 2022 07:22:57 +0100>> [... 16 lines elided]>>> Documented here:>> <https://protesilaos.com/emacs/standard-themes#h:34fe0582-960b-45dc-af5d-23c8f3e9d724>.>> You've forced me to figure out how I can enable the gnu-devel archive,> but only for some specific package. Thank you! In the end, it were> your docs which explained it perfectly well. So now I have:>> [... 21 lines elided]>> Works like a charm.
Very well! I am happy to be helpful in this way.
Please let me know if the overrides work for you and/or if we need some
other adjustments.
--
Protesilaos Stavrou
https://protesilaos.com
Protesilaos Stavrou <info@protesilaos.com> writes:
Hi Prot,
>> [... 21 lines elided]>>>> Works like a charm.>> Very well! I am happy to be helpful in this way.>> Please let me know if the overrides work for you and/or if we need> some other adjustments.
Yes, they work as advertised.
Maybe the docstrings for the overrides could be improved. The one for
standard-themes-common-palette-overrides is a bit hard to read due to
THEME-NAME which can be any value in standard-themes-items. Do you plan
to add more standard-themes? If not, I'd rather name the two specific
palette overrides so that a user can click on them. I'd also link back
from standard-dark-palette-overrides / standard-light-palette-overrides
to standard-themes-common-palette-overrides.
And an example wouldn't hurt. (I wonder what one might want to stick
into the common palette overrides given that the two themes are very
complementary.)
Bye,
Tassilo
> From: Tassilo Horn <tsdh@gnu.org>> Date: Fri, 23 Dec 2022 10:43:44 +0100>> Protesilaos Stavrou <info@protesilaos.com> writes:>> Hi Prot,
Hello Tassilo,
>>> [... 21 lines elided]>>>>>> Works like a charm.>>>> Very well! I am happy to be helpful in this way.>>>> Please let me know if the overrides work for you and/or if we need>> some other adjustments.>> Yes, they work as advertised.>> Maybe the docstrings for the overrides could be improved. The one for> standard-themes-common-palette-overrides is a bit hard to read due to> THEME-NAME which can be any value in standard-themes-items. Do you plan> to add more standard-themes? If not, I'd rather name the two specific> palette overrides so that a user can click on them. I'd also link back> from standard-dark-palette-overrides / standard-light-palette-overrides> to standard-themes-common-palette-overrides.
Very well! I just made a change. Please let me know if this helps.
> And an example wouldn't hurt. (I wonder what one might want to stick> into the common palette overrides given that the two themes are very> complementary.)
I will eventually add more examples to the manual. I will also convert
the overrides into defcustom forms. I just need to finalise this for
the modus-themes, as the plan is to expand it further (add more
mappings). I think it gives users all the power they could ask for.
In the modus-themes version-4 branch, I already have some examples in
the manual and also wrote two presets of common overrides. These help
demonstrate the feature. But I will do the same for the
standard-themes. If you have some specific style you want to achieve,
please let me know and we can have it as a sample or preset (depending
on what it is).
All the best,
Prot
--
Protesilaos Stavrou
https://protesilaos.com