bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57639: [PATCH] Add new command 'toggle-theme'


From: Philip Kaludercic
Subject: bug#57639: [PATCH] Add new command 'toggle-theme'
Date: Wed, 07 Sep 2022 08:33:08 +0000

Stefan Kangas <stefankangas@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Find below a patch for a command that a lot of custom themes
>> re-implement, whenever there exists a light and dark variant.
>
> Could/should this be generalized to more than two variants?

In principle the current implementation doesn't insist on there only
being two variants.  Each theme defines its dual, and these don't have
to be symmetrical.

> The gruvbox theme, for example, has these variants:
>
>     gruvbox-dark-hard
>     gruvbox-dark-medium
>     gruvbox-dark-soft
>     gruvbox-light-hard
>     gruvbox-light-medium
>     gruvbox-light-soft
>
> But I'm not sure what a reasonable user interface would look like.

E.g. in this case one could do:

(put 'gruvbox-dark-hard 'theme-dual 'gruvbox-dark-medium)
(put 'gruvbox-dark-medium 'theme-dual 'gruvbox-dark-soft)
(put 'gruvbox-dark-soft 'theme-dual 'gruvbox-light-hard)
(put 'gruvbox-light-hard 'theme-dual 'gruvbox-light-medium)
(put 'gruvbox-light-medium 'theme-dual 'gruvbox-light-soft)
(put 'gruvbox-light-soft 'theme-dual 'gruvbox-dark-hard)

But wouldn't just associating gruvbox-dark-hard with gruvbox-light-hard,
etc. be just as good?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]