From 12b753c7a145f231c35c153e354f157bc3e9cd6d Mon Sep 17 00:00:00 2001 From: Arthur Gleckler Date: Sun, 8 Mar 1992 16:32:05 +0000 Subject: [PATCH] Make the notifier able to display the date. --- v7/src/edwin/notify.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/v7/src/edwin/notify.scm b/v7/src/edwin/notify.scm index 3d7837a11..e6d6eb042 100644 --- a/v7/src/edwin/notify.scm +++ b/v7/src/edwin/notify.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/notify.scm,v 1.6 1992/02/19 00:11:02 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/notify.scm,v 1.7 1992/03/08 16:32:05 arthur Exp $ ;;; ;;; Copyright (c) 1992 Massachusetts Institute of Technology ;;; @@ -63,6 +63,22 @@ (write-to-string minute) (if (< hour 12) "am" "pm"))))) +(define-variable notify-show-date + "If true, the notifier displays the current date." + false + boolean?) + +(define (notifier:date) + (let ((time (get-decoded-time))) + (string-append (vector-ref + '#("Mon " "Tue " "Wed " "Thu " "Fri " "Sat " "Sun ") + (decoded-time/day-of-week time)) + (write-to-string (decoded-time/day time)) + (vector-ref + '#(" Jan" " Feb" " Mar" " Apr" " May" " Jun" + " Jul" " Aug" " Sep" " Oct" " Nov" " Dec") + (decoded-time/month time))))) + (define-variable notify-show-load "If true, the notifier displays the load average." false @@ -122,6 +138,7 @@ Ignored if notify-show-mail is false." (define notifier-elements (list (cons (ref-variable-object notify-show-time) notifier:time) + (cons (ref-variable-object notify-show-date) notifier:date) (cons (ref-variable-object notify-show-load) notifier:load-average))) (define-command run-notifier -- 2.25.1