|
|
|
@ -96,34 +96,37 @@
|
|
|
|
|
|
|
|
|
|
(defun insert-dashboard-cat () |
|
|
|
|
(let ((timestamp (local-time:now))) |
|
|
|
|
(cond ((and (>= (local-time:timestamp-hour timestamp) 6) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 10)) |
|
|
|
|
(cond ((and (= (local-time:timestamp-day timestamp) 8) |
|
|
|
|
(= (local-time:timestamp-month timestamp) 2)) |
|
|
|
|
(format nil "/images/icons/birthday-cat.png")) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 6) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 10)) |
|
|
|
|
(format nil "/images/icons/morning-cat.png")) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 10) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 12)) |
|
|
|
|
(format nil "/images/icons/coffee-cat.png")) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 12) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 14)) |
|
|
|
|
(format nil "/images/icons/dinner-cat.png")) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 14) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 18)) |
|
|
|
|
(format nil "/images/icons/study-cat.png")) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 18) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 20)) |
|
|
|
|
(cond |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 10) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 12)) |
|
|
|
|
(format nil "/images/icons/coffee-cat.png")) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 12) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 14)) |
|
|
|
|
(format nil "/images/icons/dinner-cat.png")) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 14) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 18)) |
|
|
|
|
(format nil "/images/icons/study-cat.png")) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 18) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 20)) |
|
|
|
|
(cond |
|
|
|
|
;; Sunday |
|
|
|
|
((= (local-time:timestamp-day-of-week timestamp) 0) |
|
|
|
|
(format nil "/images/icons/love-cat.png")) |
|
|
|
|
;; Monday - Friday |
|
|
|
|
((<= (local-time:timestamp-day-of-week timestamp) 5) |
|
|
|
|
(format nil "/images/icons/workout-cat.png")) |
|
|
|
|
;; Saturday |
|
|
|
|
((= (local-time:timestamp-day-of-week timestamp) 6) |
|
|
|
|
;; Saturday |
|
|
|
|
((= (local-time:timestamp-day-of-week timestamp) 6) |
|
|
|
|
(format nil "/images/icons/rock-star-cat.png")))) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 20) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 22)) |
|
|
|
|
(format nil "/images/icons/dinner-cat.png")) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 22) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 24)) |
|
|
|
|
(format nil "/images/icons/bed-time-cat.png")) |
|
|
|
|
(t (format nil "/images/icons/default-cat.png"))))) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 20) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 22)) |
|
|
|
|
(format nil "/images/icons/dinner-cat.png")) |
|
|
|
|
((and (>= (local-time:timestamp-hour timestamp) 22) |
|
|
|
|
(< (local-time:timestamp-hour timestamp) 24)) |
|
|
|
|
(format nil "/images/icons/bed-time-cat.png")) |
|
|
|
|
(t (format nil "/images/icons/default-cat.png"))))) |
|
|
|
|