emacs-devel
[Top][All Lists]
Advanced

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

Re: night-mode?


From: Pankaj Jangid
Subject: Re: night-mode?
Date: Sat, 21 Nov 2020 08:06:05 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin)

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)))




reply via email to

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