[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs Themes
From: |
Jean Louis |
Subject: |
Re: Emacs Themes |
Date: |
Fri, 20 Nov 2020 07:20:49 +0300 |
User-agent: |
Mutt/2.0 (3d08634) (2020-11-07) |
* Jamie Beardslee <jdb@jamzattack.xyz> [2020-11-20 06:23]:
> Christopher Dimech <dimech@gmx.com> writes:
> > Have two themes and would like to cycle between the two using
> > a keybinding. How can I do it?
>
> Here's how I'd do it:
>
> (defun toggle-light-or-dark-theme ()
> (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)))
>
> And then of course you can bind it to a key with `global-set-key'.
Nice and simple, I will use it for my favorite themes.