On 2020-11-21, 08:06 +0530, Pankaj Jangid wrote: > Stefan Monnier 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