blob: 2208f33fb39dd100a804b2b0b1679aabf6e04d57 [file] [log] [blame]
Guido van Rossum453bd401992-03-30 13:18:37 +00001Newsgroups: cwi.sgi
2Subject: Re: new clock
3Distribution: cwi.sgi
4References: <2246@charon.cwi.nl>
5
6Last week I wrote:
7
8>For your enjoyment I have implemented a colorful clock.
9
10The clock has now been extended with some new facilities: a menu, an
11alarm and a gong. These may require some explanation beyond what's in
12the usage message.
13
14Menu
15----
16The right mouse button now pops up a menu that allows you to turn the
17seconds hand on or off and to switch the alarm off.
18
19Alarm
20-----
21
22The left and middle buttons set the alarm. When it is on, the alarm
23time is displayed as a time on a 24 hour clock in the bottom left
24corner. It is also indicated by two red triangles, corresponding to the
25little (hours) and big (minutes) hand. These hands can be moved around:
26the left mouse button moves the minutes hand, the middle button moves
27the hourds hand. Watch out for differences of twelve hours (always
28check the digital display); these can be corrected by dragging the hours
29hand once around the dial.
30
31When the alarm goes off, two things happen: a shell command specified on
32the command line with the -a option is executed (in the background), and
33the clock's colors change every two seconds, for five minutes. You can
34also turn the alarm off by using the menu accessible through the right
35mouse button.
36
37There is no default command for the -a option; if it is not specified,
38only the changing of the colors happens. If you have an 8 ohm speaker
39connected to the audio output of your Personal Iris, a suitable command
40would be:
41
42 mclock -a '/ufs/guido/bin/sgi/play /ufs/guido/lib/sounds/alarm'
43
44Gong
45----
46
47Some people like a clock that makes noises every hour, or even more
48often. This is supported by the -g and -G options. With -g you specify
49a shell command to be executed to sound the gong; with -G you can
50specify the interval between gong calls, in seconds (default is one hour).
51The shell command is executed in the background. It is given two
52arguments: the hours (on a 24 hour clock!) and the minutes. The
53executable Python script /ufs/guido/bin/sgi/chime is a suitable example.
54Again, this only works if you have installed a speaker (I bet 8 ohm
55speakers are going to be in demand!)
56
57--
58Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam
59guido@cwi.nl or ..!hp4nl!cwi.nl!guido or guido%cwi.nl@uunet.uu.net
60"A thing of beauty is a joy till sunrise"