Emacs Lisp
Switch branches/tags

README.md

MELPA https://travis-ci.org/guidoschmidt/circadian.el


Logo

circadian

Theme-switching for Emacs based on daytime

Why?

Circadian tries to help reducing eye strain that may arise from difference of your display brightness and the surrounding light.

Inspired by color temperature shifting tools and brightness adaption software like:

Example usage

Example usage with default themes (leuven at 7:30, wombat at 19:30):

(use-package circadian
  :ensure t
  :config
  (circadian-setup))

Example usage featuring hemera-themes and nyx-theme (with use-package):

(use-package circadian
  :load-path "~/.emacs.d/config/circadian/"
  :ensure t
  :config
  (setq circadian-themes '(("8:00" . hemera)
                           ("19:30" . nyx)))
  (circadian-setup))

Switch themes on sunrise & sunset

Be sure to set your latitude and longitude (Get them e.g. at latlong.net):

(use-package circadian
  :load-path "~/.emacs.d/config/circadian/"
  :ensure t
  :config
  (setq calendar-latitude 49.0)
  (setq calendar-longitude 8.5)
  (setq circadian-themes '((:sunrise . apropospriate-light)
                           ("10:00"  . hemera)
                           ("19:30"  . nyx)
                           (:sunset  . nord)))
  (circadian-setup))

⚠️ The preceding example features the following themes - make sure to have them installed, before using them in circadian


Themes

Circadian features two themes - Nyx (nighttime) and Hemera (daytime)


TODOs & Ideas

  • Possible to interpolate colors of themes?
  • Query brightness sensors of laptops?
  • Extend tests
  • Load themes by mode reddit.com/r/emacs
  • Load themes by machine name reddit.com/r/emacs
  • Load themes by wifi/location? reddit.com/r/emacs
  • Use emacs builtin sunrise-sunset feature (see Issues)