📄 mclock.doc
字号:
Newsgroups: cwi.sgiSubject: Re: new clockDistribution: cwi.sgiReferences: <2246@charon.cwi.nl>Last week I wrote:>For your enjoyment I have implemented a colorful clock.The clock has now been extended with some new facilities: a menu, analarm and a gong. These may require some explanation beyond what's inthe usage message.Menu----The right mouse button now pops up a menu that allows you to turn theseconds hand on or off and to switch the alarm off.Alarm-----The left and middle buttons set the alarm. When it is on, the alarmtime is displayed as a time on a 24 hour clock in the bottom leftcorner. It is also indicated by two red triangles, corresponding to thelittle (hours) and big (minutes) hand. These hands can be moved around:the left mouse button moves the minutes hand, the middle button movesthe hourds hand. Watch out for differences of twelve hours (alwayscheck the digital display); these can be corrected by dragging the hourshand once around the dial.When the alarm goes off, two things happen: a shell command specified onthe command line with the -a option is executed (in the background), andthe clock's colors change every two seconds, for five minutes. You canalso turn the alarm off by using the menu accessible through the rightmouse button.There is no default command for the -a option; if it is not specified,only the changing of the colors happens. If you have an 8 ohm speakerconnected to the audio output of your Personal Iris, a suitable commandwould be: mclock -a '/ufs/guido/bin/sgi/play /ufs/guido/lib/sounds/alarm'Gong----Some people like a clock that makes noises every hour, or even moreoften. This is supported by the -g and -G options. With -g you specifya shell command to be executed to sound the gong; with -G you canspecify the interval between gong calls, in seconds (default is one hour).The shell command is executed in the background. It is given twoarguments: the hours (on a 24 hour clock!) and the minutes. Theexecutable Python script /ufs/guido/bin/sgi/chime is a suitable example.Again, this only works if you have installed a speaker (I bet 8 ohmspeakers are going to be in demand!)--Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdamguido@cwi.nl or ..!hp4nl!cwi.nl!guido or guido%cwi.nl@uunet.uu.net"A thing of beauty is a joy till sunrise"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -