Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.26 KB

README.md

File metadata and controls

33 lines (25 loc) · 1.26 KB

Clockicon

Using https://ocodo.github.io/ClockFace-font in Emacs

(require 'cl-lib)

(defun clockface-icons-unicode (hours minutes)
  "Return clock icon unicode for HOURS and MINUTES."
  (let* ((minute (- minutes (% minutes 5)))
         (offset (+ (* (% hours 12) 12) (* 12 (/ minute 60)))))
       (+ offset #xE800)))

(defun clockface-icons-now-unicode ()
  "Return clock icon unicode for the time now."
  (cl-destructuring-bind
      (_ _ hour minute &rest n) (decode-time)
    (clockicon-unicode hour minute)))
    
(defface clockface-icons '((t (:family ClockFace))) "ClockFace icons")
(defface clockface-icons-solid '((t (:family ClockFaceSolid))) "ClockFaceSolid icons")
(defface clockface-icons-rect '((t (:family ClockFaceRect))) "ClockFaceRect icons")
(defface clockface-icons-rect-solid '((t (:family ClockFaceRectSolid))) "ClockFaceRectSolid icons")