Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
RASE - Run At Sun Event | ||
|
||
This is an Emacs extension that allows user provided set of functions | ||
to be run at some sun events, right now - sunrise and sunset. | ||
|
||
Usage example: | ||
|
||
#+BEGIN_SRC emacs-lisp | ||
(require 'rase) | ||
|
||
;; create a one argument function to be invoked at sun events | ||
(defun switch-themes (sun-event) | ||
"Switch themes on sunrise and sunset." | ||
(cond ((eq sun-event 'sunrise) | ||
(ignore-errors | ||
(disable-theme 'wombat)) | ||
(enable-theme 'whiteboard)) | ||
((eq sun-event 'sunset) | ||
(ignore-errors | ||
(disable-theme 'whiteboard)) | ||
(enable-theme 'wombat)))) | ||
|
||
;; sign this function to be invoked on sun events | ||
(add-to-list rase-hook 'switch-themes) | ||
|
||
;; start the run-at-sun-event daemon | ||
(rase-start t) | ||
#+END_SRC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters