guidoschmidt / circadian.el

Theme-switching for Emacs based on daytime
https://guidoschmidt.github.io/circadian.el
MIT License
169 stars 8 forks source link

keep current theme if there is no time slot defintion #1

Closed avkoval closed 6 years ago

avkoval commented 6 years ago

I would like to suggest to keep current selected theme if the current time don't match time intervals. E.g. I've tried this:

(use-package circadian
  :load-path "~/.emacs.d/config/circadian/"
  :ensure t
  :config
  (setq circadian-themes '(("11:00" . avk-daylight)
                           ("18:30" . avk-darkblue-yellow)
                           ("22:00" . warm-night)))
  (circadian-setup))

but it fails with this error:

Error (use-package): circadian :config: Invalid theme name ‘nil’

... because it is 07.43 on clock so first time slot is not started

For this case there should be some workaround. I suggest to not switch theme, another idea is to get previous one.

guidoschmidt commented 6 years ago

Thanks for reporting, discovered that for myself yesterday 👍 Needs to be fixed indeed. I will have a look at it as soon as possible, unless you would like to help out 🙂

avkoval commented 6 years ago

No hurry, you have a great package, it really targets my needs (as I usually switch themes between dark/light as the light conditions differ a lot in my working environment), but I can wait until this bug is fixed. Thank you for publishing it! ;-)

guidoschmidt commented 6 years ago

Thanks 🙂 Issue should be fixed in the next version (0.2.3)