• Stars
    star
    161
  • Rank 232,807 (Top 5 %)
  • Language
    Emacs Lisp
  • License
    MIT License
  • Created about 7 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Theme-switching for Emacs based on daytime

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


Logo

circadian

Theme-switching for Emacs based on daytime

Conception

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

Switching themes on time of day

Example usage featuring hemera-themes and nyx-theme (with use-package). Make sure to use :defer keyword. Omitting it may lead to broken colors (see issue 9):

;; Install additinal themes from melpa
;; make sure to use :defer keyword
(use-package hemera-theme :ensure :defer)
(use-package nyx-theme :ensure :defer)

(use-package circadian
  :ensure t
  :config
  (setq circadian-themes '(("8:00" . hemera)
                           ("19:30" . nyx)))
  (circadian-setup))
Switching themes on sunrise & sunset

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

;; Install additinal themes from melpa
;; make sure to use :defer keyword
(use-package apropospriate-theme :ensure :defer)
(use-package nord-theme :ensure :defer)

(use-package circadian
  :ensure t
  :config
  (setq calendar-latitude 49.0)
  (setq calendar-longitude 8.5)
  (setq circadian-themes '((:sunrise . apropospriate-light)
                           (:sunset  . nord)))
  (circadian-setup))

Hooks

circadian provides two hooks:

  • circadian-before-load-theme-hook
  • circadian-after-load-theme-hook

e.g. I like to override any themes cursor color to a very bright color via:

(add-hook 'circadian-after-load-theme-hook
          #'(lambda (theme)
              ;; Line numbers appearance
              (setq linum-format 'linum-format-func)
              ;; Cursor
              (set-default 'cursor-type 'box)
              (set-cursor-color "#F52503")))

Todos & Ideas


Development

Install Emacs cask environment. On macOS you canr use homebrew with: brew install cask.

  1. Clone the circadian.el repository: git clone [email protected]:guidoschmidt/circadian.el.git
  2. cd into the git project directory with cd circadian.el and install dependencies via cask
  3. Run test using make test

More Repositories

1

examples.lygia-threejs

Collection of three.js examples using lygia shader library
TypeScript
39
star
2

touchdesigner.camera-calibration

Camera calibration component for Touchdesigner based on OpenCV
C++
28
star
3

touchdesigner.components

Hodgepodge of .tox-components for Touchdesigner
23
star
4

touchdesigner.generative-meshes

Generative meshes in Touchdesigner using Python in ScriptSOP
Python
17
star
5

sketchbook.touchdesigner

Hodgepodge of .tox components and .toe files that arise while experimenting with Touchdesigner
14
star
6

moge

My Own Graphics Engine. Bachelor of science final project
C++
7
star
7

emacs.d

πŸƒ Personal Emacs configuration - using straight.el
Emacs Lisp
6
star
8

examples.cpp

C++ (C++11, C++14, C++17) examples of using std, concepts, data structures and patterns
C++
3
star
9

ofx.accessory

Utilities and tooling for openFrameworks
C++
3
star
10

nft.reaction-diffusion

Example implementation of an interactive OBJKT for hicetnunc.xyz featuring reaction diffusion algorithm
JavaScript
3
star
11

PortraitBooth

Generative art portrait photo booth built with openframeworks
C++
3
star
12

ofx.nature-of-code

Nature Of Code examples ported to Openframeworks
Makefile
3
star
13

sketchbook.vcv

VCV Rack sketchbook and learn modular synthesizer patching
3
star
14

advent-of-code.2021

Advent of Code #2021
JavaScript
2
star
15

zosc

zig OSC package
Zig
2
star
16

emacs-nyx-theme

Dark theme for Emacs
Emacs Lisp
2
star
17

ofNatureOfCode

Working through Daniel Shiffmans 'Nature Of Code' using openframeworks
C++
2
star
18

workshop.captcha2022.p5

Repository of my p5.js workshop 'Intro to Generative Illustrations' at Captcha Design Festival (captcha-mannheim.de) in Mannheim
JavaScript
2
star
19

potzblitz

Generative UI library for generative projects
TypeScript
2
star
20

examples.zig

Hodgepodge of examples collected while learning zig
Zig
2
star
21

sketchbook.houdini

Hodgepodge of Houdini examples
2
star
22

emacs-hemera-theme

Light Emacs theme
Emacs Lisp
2
star
23

guidoschmidt

Welcome to my profile
2
star
24

ubergang.js

Smooth site transitions for static html pages using javascript & SASS/CSS
CSS
1
star
25

vvvv.patches

Learning vvvv/vl
C#
1
star
26

nannou.sketches

Rust
1
star
27

clotho

Small design preference testing app
HTML
1
star
28

hicetnunc.wiki.backup

1
star
29

lib.shader

GLSL
1
star
30

bilderbuch

Next.js based image collector inspired by are.na and Pinterest
JavaScript
1
star
31

ziglings

Zig
1
star
32

alfontzo

Machine-dependant font configuration for Emacs
Emacs Lisp
1
star
33

urscript-mode

Major mode for editing URScript (www.universal-robots.com)
Emacs Lisp
1
star
34

fh-bielefeld.interface-interaction-2223

JavaScript
1
star
35

yasnippets

yasnippet collection for Emacs
YASnippet
1
star
36

sketchbook.pd

Pure data sketchbook
1
star
37

examples.javascript

Hodgepodge of examples gathered while learning Javascript
JavaScript
1
star
38

zipper

Experimental ziglang image sequence collection server
Zig
1
star
39

example.p5.iframe-communication

Code examples explaining how to send data from iframe p5 sketches to a host webpage
JavaScript
1
star