[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Modus themes toggle (was: night-mode?)
From: |
Protesilaos Stavrou |
Subject: |
Modus themes toggle (was: night-mode?) |
Date: |
Sat, 21 Nov 2020 07:00:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On 2020-11-21, 08:06 +0530, Pankaj Jangid <pankaj@codeisgreat.org> wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> Based on previous discussions, I think we should add some way to toggle
>> the dark/light mode. I'm not completely sure what the interface should
>> look like, nor what'd be the better implementation, but see the patch
>> below for a first cut to add a `night-mode` command, which does
>> basically the "inverse video" by swapping the foreground and the
>> background of the default face (and then resetting the background-mode
>> accordingly, of course).
>
> Your's is a more generic solution I guess. But after inclusion of
> `modus-themes', I just use this snippet,
>
> (defun modus-theme-toggle ()
> "Toggle between modus-operandi and modus-vivendi themes."
> (interactive)
> (if (member 'modus-operandi custom-enabled-themes)
> (progn
> (disable-theme 'modus-operandi)
> (load-theme 'modus-vivendi t))
> (disable-theme 'modus-vivendi)
> (load-theme 'modus-operandi t)))
Just to note that I am in the process of refactoring aspects of the
Modus themes. There will be a toggle command on offer. Please find the
current version of it attached (note that I may still change things).
--
Protesilaos Stavrou
protesilaos.com
modus-themes-toggle-tentative.el
Description: Text document
- night-mode?, Stefan Monnier, 2020/11/20
- Re: night-mode?, Pankaj Jangid, 2020/11/20
- Modus themes toggle (was: night-mode?),
Protesilaos Stavrou <=
- Re: night-mode?, Juri Linkov, 2020/11/21
- Re: night-mode?, Stefan Monnier, 2020/11/21
- Re: night-mode?, Juri Linkov, 2020/11/22
- Re: night-mode?, Stefan Monnier, 2020/11/22
- Re: night-mode?, Eli Zaretskii, 2020/11/22
- Re: night-mode?, Arthur Miller, 2020/11/22
- Re: night-mode?, Jean Louis, 2020/11/22
- Re: night-mode?, Arthur Miller, 2020/11/23
- Re: night-mode?, Jean Louis, 2020/11/23