Skip to content
Emacs light/dark theme toggler
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Friendlify Contribution section of readme Apr 22, 2018
logo.jpg (#1) - add logo of appropriate size Apr 11, 2018

Heaven and Hell Emacs Emacs Emacs MELPA MELPA Stable


Heaven and Hell - emacs package for easy toggling of light/dark color themes.




I constantly switch light and dark theme. When it's sunny outside, or I work in a very light room - I use the light theme. Otherwise, I prefer dark one. So I wrote a bunch of helpers which helped me with this and one day I decided to make a package out of it. Hope it'll be useful to anybody else. Cheers!


  • Define your favorite light and dark themes
  • Choose which one to run by default
  • Switch between them with a single keypress
  • Easily roll back to default emacs theme in case of messed faces


heaven-and-hell is available in Melpa.

With use-package

With use-package (including example config):

(use-package heaven-and-hell
  :ensure t
  (setq heaven-and-hell-theme-type 'dark) ;; Omit to use light by default
  (setq heaven-and-hell-themes
        '((light . tsdh-light)
          (dark . tsdh-dark))) ;; Themes can be the list: (dark . (tsdh-dark wombat))
  :hook (after-init . heaven-and-hell-init-hook)
  :bind (("C-c <f6>" . heaven-and-hell-load-default-theme)
         ("<f6>" . heaven-and-hell-toggle-theme)))

With straight.el

(straight-use-package 'heaven-and-hell)


First clone the repo:

git clone your/site/elisp/path

Then add this in your init.el:

(require 'heaven-and-hell "your/site/elisp/path/heaven-and-hell/heaven-and-hell.el")

Example configuration

For use-package configuration look above in installation section

;; Default is 'light
(setq heaven-and-hell-theme-type 'dark)

;; Set preferred light and dark themes
;; default light is emacs default theme, default dark is wombat
;; Themes can be the list: (dark . (tsdh-dark tango-dark))
(setq heaven-and-hell-themes
      '((light . tsdh-light)
        (dark . tsdh-dark)))

;; Add init-hook so heaven-and-hell can load your theme
(add-hook 'after-init-hook 'heaven-and-hell-init-hook)

;; Set keys to toggle theme and return to default emacs theme
(global-set-key (kbd "C-c <f6>") 'heaven-and-hell-load-default-theme)
(global-set-key (kbd "<f6>") 'heaven-and-hell-toggle-theme)


Have trouble with installation? Found a bug? Want a new feature? Feel free to open an issue!

Want to fix a bug or add something new yourself? Feel free to submit pull request!

Also, don't hesitate to share it anywhere in the Internet :)



You can’t perform that action at this time.