Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!yale!cs.utexas.edu!uunet!bischeops!nick From: nick@bischeops.UUCP (Nick Bender) Newsgroups: comp.windows.x Subject: Re: xclock Summary: try xchrono Message-ID: <407@bischeops.UUCP> Date: 30 Jun 90 20:12:13 GMT References: <3576@auspex.auspex.com> Lines: 73 The following is an abbreviated README from a program called xchrono which I posted to comp.sources.x not long ago. Pick it up at your local archive... File: xchrono/README Xchrono is a multi-timezone, multi-face clock program for X Windows. It has been tested on a Sun 3 and an HP9000s300. STARTUP ------- Several cities have been compiled into xchrono, and can be invoked with command-line arguments, xchrono -help gives: Usage: xchrono [-analog] [-bw ] [-digital] [-fg ] [-bg ] [-hd ] [-hl ] [-bd ] [-fn ] [-help] [-padding ] [-rv] [-update ] [-display displayname] [-geometry geom] [-width clockWidth] [-height clockHeight] [-dayFirst] [-local localName] [-boston] [-newyork] [-chicago] [-denver] [-la] [-hawaii] [-tokyo] [-sydney] [-london] [-paris] [-frankfurt] [-rio] OK, OK, Hawaii isn't a city, but you get the point. The timezones used are taken from tztab in the SYSV case, and from /usr/lib/zoneinfo otherwise, and as such may or may not be correct (the TZ variable definitions or the city->timezone mappings). The AM/PM string in the lower left corner will have an asterisk ("AM*") if the timezone is currently under daylight savings time. The date string in the lower right is by default in month/day format, but can be switched by the -dayFirst flag. The -local option causes a clock labeled with using the value of TZ at startup as it's timezone. In addition, a GMT clock always appears. .......... IMPLEMENTAION ------------- Xchrono is yet another blatent hack of xclock. I modified the athena Clock widget to allow for one timer callback to update all instances of Clock widgets in a process. The class part of the clock widget maintains a list of all instances of Clock. The main window of xchrono is just a Box widget with an instance of Clock for every desired timezone. This is a hack. Hopefully it will inspire someone with more time and/or motivation to do it right (and include nice things like a dialog box to do dynamic configuration, etc...). I think Ansi has something to say about implementing timezones, but for now I just hacked in support for tztab (SYSV) and zoneinfo (BSD). Good enough for now. WARRANTY -------- Yeah, right. :-) Enjoy, Nick Bender nick%bischeops@uunet.uu.net