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: Sun, 11 Sep 2022 11:42:33 +0000

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> So we are thinking about something like a symbol property
>> `theme-variants' that each theme symbol may have attached.  This symbol
>> could point to a list representing a set of alternatives.  Let's say the
>> set might contain the theme itself (for the sake of convenience), so it
>> is remq'ed before we check if the set has more than one alternative.  If
>> it does we use a modified `load-theme'-like prompt, otherwise we toggle.
>> I think it would also make sense to silently remove non-existent themes
>> automatically, in case a variant theme is not part of the same package.
>
> I think that sounds correct, but I'm not 100% sure.  😀

Ok, I'll implement this then.

>>> And in addition, this tagging could be used for automatic dark/light OS
>>> changes, so it's at least three birds with one stone.
>>
>> OK, but that is a long-term plan, or do the means already exist for
>> detecting these kinds of changes?
>
> Code exists for both Windows and Macos in the bug tracker somewhere, but
> haven't been integrated yet because nobody has sat down to make a
> consistent interface across all the platforms.

What about GNU/Linux desktops?

>> Also, how to be distinguish between what is light and dark, and what do
>> we do when a theme has multiple variants?
>
> I'm not sure what you mean -- the proposal is to make the themes say
> whether they consider themselves to be light or dark.  And I don't think
> a theme would have multiple dark variants.

Stefans Gruvbox example had multiple dark and light variants.  E.g.
Would the new command toggle from `gruvbox-dark-soft' to
`gruvbox-dark-light' or prompt the user to select from all the gruvbox
themes?

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> I'm not sure what you mean -- the proposal is to make the themes say
>> whether they consider themselves to be light or dark.  And I don't think
>> a theme would have multiple dark variants.
>
> But now I see that you've pushed `toggle-theme'...  *sigh*

I'm very sorry about that, I've reverted those commits, since they were
accidentally pushed!





reply via email to

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