GNU bug report logs -
#57639
[PATCH] Add new command 'toggle-theme'
Previous Next
Reported by: Philip Kaludercic <philipk <at> posteo.net>
Date: Wed, 7 Sep 2022 07:20:01 UTC
Severity: wishlist
Tags: patch
Done: Philip Kaludercic <philipk <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Philip Kaludercic <philipk <at> posteo.net> writes:
>
>> Do you think it would be better to less general, and instead of talking
>> about "dual" themes always assume we want to toggle between a light and
>> a dark variant? If not, this sounds like a separate feature (say that
>> could be handled by a different property `theme-variant').
>
> Well, if we had marking for "theme with variant", then we'd know which
> themes are "the same", but with a variant.
>
> So your command could instead be `theme-choose-variant', but since
> there's only two variants here, it'd toggle. If there were more, the
> user would be prompted for which variant to use, which would cover
> gruvbox, which Stefan mentioned.
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 it would make sense to alias the name, since most themes, if
they do have variants just come with dark and light where "toggle" is
a more intuitive term.
> 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?
Also, how to be distinguish between what is light and dark, and what do
we do when a theme has multiple variants?
This bug report was last modified 2 years and 215 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.