[[./celestial-mode-line.png]]
Screenshot: 5 days to full moon, sunset at 16:12.
** Quick start Install =celestial-mode-line= from melpa.
Set your coordinates, so that sunrise/sunset can be calculated correctly.
(setq calendar-longitude 25.5) (setq calendar-latitude 17.5) (setq calendar-location-name "Some place")
Add =celestial-mode-line-string= to the mode line, for example:
;; add to end of global-mode-string (if (null global-mode-string) (setq global-mode-string '("" celestial-mode-line-string)) (add-to-list 'global-mode-string 'celestial-mode-line-string t))
Start the timer, to update every few minutes:
(celestial-mode-line-start-timer)
If you don't like the default icons, just set alternatives, any unicode characters should work:
(defvar celestial-mode-line-phase-representation-alist '((0 . "○") (1 . "☽") (2 . "●") (3 . "☾"))) (defvar celestial-mode-line-sunrise-sunset-alist '((sunrise . "☀↑") (sunset . "☀↓")))