1XDaliClock(1)               General Commands Manual              XDaliClock(1)
2
3
4

NAME

6       xdaliclock - melting digital clock
7

SYNOPSIS

9       xdaliclock [-toolkitoption ...] [-option ...]
10

DESCRIPTION

12       The  xdaliclock program displays a digital clock; when a digit changes,
13       it ``melts'' into its new shape.
14
15       This program was inspired by the Alto and  Macintosh  programs  of  the
16       same name, written by Steve Capps in 1983 or 1984.
17

OPTIONS

19       xdaliclock  accepts  all  of  the  standard  toolkit  options, and also
20       accepts the following options:
21
22       -help   Print a brief summary of the allowed options  on  the  standard
23               error output.
24
25       -12     Use a twelve hour clock.
26
27       -24     Use a twenty-four hour clock.
28
29       -seconds
30               Update every second.
31
32       -noseconds
33               Update once per minute; don't display seconds at all.
34
35       -cycle  Do color-cycling.
36
37       -nocycle
38               Don't do color-cycling.
39
40       -font fontname
41               Specifies  the  X font to use; xdaliclock can correctly animate
42               any font that contains all the digits plus colon and slash, and
43               in which the letters aren't excessively curly.
44
45               The  xdaliclock  program  also  contains four builtin bitmapped
46               fonts, which are larger and more attractive than the standard X
47               fonts.   One of these fonts will be used if the -font option is
48               given one of the fontnames BUILTIN0,  BUILTIN1,   BUILTIN2,  or
49               BUILTIN3.
50
51       -builtin0
52               This is the same as specifying -font BUILTIN0.
53
54       -builtin1
55               This is the same as specifying -font BUILTIN1.
56
57       -builtin2 or -builtin
58               This is the same as specifying -font BUILTIN2.
59
60       -builtin3
61               This is the same as specifying -font BUILTIN3.
62
63       -fullscreen
64               Make  the window take up the whole screen.  When -fullscreen is
65               specified, the displayed time will wander around a  little,  to
66               prevent any pixels from being on continuously and causing phos‐
67               phor burn-in.
68
69       -root   Display the clock on the root window instead of in its own win‐
70               dow.  This makes the digits wander around too.
71
72       -window-id window
73               Render the clock on a window created by some other program.
74
75       -visual visual
76               Specify which visual to use.  Legal values are:
77
78               default Use the screen's default visual (the visual of the root
79                       window.)  This is the default.
80
81               best    Use the visual which supports the most  writable  color
82                       cells.
83
84               class   One  of  StaticGray, StaticColor, TrueColor, GrayScale,
85                       PseudoColor, or DirectColor.  Selects the deepest  vis‐
86                       ual of the given class.
87
88               number  A number (decimal or hex) is interpreted as a visual id
89                       number, as reported by the xdpyinfo(1) program; in this
90                       way you can select a shallower visual if desired.
91
92               If  you  don't  have a 24-bit system, using a visual other than
93               the default one may cause colormap flashing.
94
95       -transparent
96               Causes the background of the window to be transparent, if  pos‐
97               sible.
98
99               If  the  server supports overlay planes, then they will be used
100               (this is the case on SGIs, and on certain HP, DEC, and IBM sys‐
101               tems.)
102
103               If  overlay  planes  are not available, but the server supports
104               the Shape extension, then that will be used instead.   However,
105               the  Shape  extension is very inefficient: it will cause your X
106               server to use up a lot of cycles.
107
108               Also, if the Shape extension is used, you will probably need to
109               configure  your  window  manager  to  not put a titlebar on the
110               XDaliClock window.  (This is the case at least with twm, tvtwm,
111               and  mwm.)   If you don't do this, then the window will flicker
112               constantly, as the window manager tries to add and  remove  the
113               titlebar ten times each second.
114
115               None  of these problems occur if overlay planes are used (or if
116               the -transparent option is not requested.)
117
118       -nontransparent
119               Don't make the window's background be transparent.  This is the
120               default.
121
122       -memory low
123               Use  high-bandwidth,  low-memory mode.  If you have a very fast
124               connection between the machine this program is running  on  and
125               the X server it is displaying on, then xdaliclock can work cor‐
126               rectly by simply making the drawing requests it needs  when  it
127               needs  them.   This is the elegant method.  However, the amount
128               of data necessary to animate the display ends up  being  a  bit
129               over  10  kilobytes  worth of X Protocol per second.  On a fast
130               machine with a local display, or over a  fast  network,  that's
131               almost  negligible, but (for example) an NCD X Terminal at 38.4
132               kbps can't keep up.  That is the reason for:
133
134       -memory medium
135               Use high-memory, low-bandwidth mode.  In this mode,  xdaliclock
136               precomputes most of the frames that it will ever need.  This is
137               the sleazy copout method.  The bandwidth requirements are dras‐
138               tically  reduced,  because  instead  of telling the server what
139               bits to draw where, it merely tells it  what  pixmaps  to  copy
140               into  the  window.  Aside from the fact that I consider this to
141               be cheating, the only downside of this  method  is  that  those
142               pixmaps (about 170 of them, each the size of one character) are
143               consuming server-memory.  This probably isn't a very big  deal,
144               unless you're using an exceptionally large font.
145
146       -memory high
147               With  memory set to high, the cache is twice as large (the n ->
148               n+2 transitions are cached as well as the n -> n+1 ones).  Even
149               with  memory set to medium, this program can seem sluggish when
150               using a large font over a very slow connection to  the  display
151               server.
152
153       -countdown date
154               Instead  of displaying the current time, display a countdown to
155               the specified date (if the date has already  passed,  count  up
156               from  it.)   The  date  can take two forms: either a time_t (an
157               integer, the number of seconds past "Jan 1 00:00:00 GMT 1970");
158               or,  a  string of the form "Mmm DD HH:MM:SS YYYY", for example,
159               "Jan 1 00:00:00 2000".  This string is interpreted in the local
160               time zone.
161
162               To count up from the current time, do this:
163               xdaliclock -countdown "`date '+%b %d %T %Y'`"
164
165       The  following  standard  X Toolkit command line arguments are commonly
166       used with xdaliclock:
167
168       -display host:dpy
169               This option specifies the X server to contact.
170
171       -geometry geometry
172               This option specifies the preferred size and  position  of  the
173               clock window.
174
175       -bg color
176               This  option  specifies  the color to use for the background of
177               the window.  The default is ``white.''
178
179       -fg color
180               This option specifies the color to use for  the  foreground  of
181               the window.  The default is ``black.''
182
183       -bd color
184               This  option  specifies  the color to use for the border of the
185               window.  The default is the same as the foreground color.
186
187       -rv     This option indicates that reverse video should be simulated by
188               swapping the foreground and background colors.
189
190       -bw number
191               This  option  specifies  the width in pixels of the border sur‐
192               rounding the window.
193
194       -xrm resourcestring
195               This option specifies a resource string to be used.
196

COMMANDS

198       Clicking and holding any mouse button in  the  xdaliclock  window  will
199       cause it to display the date while the button is held.
200
201       Typing  ``space'' at the xdaliclock window will toggle between a twelve
202       hour and twenty-four hour display.
203
204       Typing ``q'' or ``^C'' at the window quits.
205
206       If the xdaliclock window is iconified or otherwise unmapped, it will go
207       to sleep until it is mapped again.
208

X RESOURCES

210       xdaliclock  understands  all  of the core resource names and classes as
211       well as:
212
213       mode (class Mode)
214               Whether to display 12-hour or 24-hour time.  If 12, this is the
215               same  as the -12 command line argument; if 24, this is the same
216               as -24.
217
218       datemode (class DateMode)
219               Specifies how the date should be printed when a mouse button is
220               held  down.  This may be one of the strings mm/dd/yy, dd/mm/yy,
221               yy/mm/dd, yy/dd/mm, mm/yy/dd,  or  dd/yy/mm.   The  default  is
222               mm/dd/yy.   If  seconds  are not being displayed, then only the
223               first four digits will ever  be  displayed  (mm/dd  instead  of
224               mm/dd/yy, for example.)
225
226       seconds (class Seconds)
227               Whether  to  display seconds.  If true, this is the same as the
228               -seconds command line argument; if false, this is the  same  as
229               -noseconds.
230
231       cycle (class Cycle)
232               Whether  to do color cycling.  If true, this is the same as the
233               -cycle command line argument; if false, this  is  the  same  as
234               -nocycle.
235
236       font (class Font)
237               The  same  as  the -font command line option: the font to melt.
238               If this is one of the strings BUILTIN0, BUILTIN1, BUILTIN2,  or
239               BUILTIN3,  then  one  of  the large builtin fonts will be used.
240               Otherwise, this must be the name of a valid X font.
241
242       fullScreen (class FullScreen)
243               The same as the -fullscreen command-line option.
244
245       root (class Root)
246               The same as the -root command-line option.
247
248       visualID (class VisualID)
249               The same as the -visual command-line option.
250
251       transparent (class Transparent)
252               Whether to make the window's background be transparent, if pos‐
253               sible.   If  true, this is the same as the -transparent command
254               line argument; if false, this is the same as -nontransparent.
255
256       memory (class Memory)
257               This must be high, medium, or low, the same as the -memory com‐
258               mand-line option.
259
260       countdown (class Countdown)
261               Same as the -countdown command-line option.
262

ENVIRONMENT

264       DISPLAY
265           to get the default host and display number.
266
267       XENVIRONMENT
268           to  get  the  name  of  a  resource  file that overrides the global
269           resources stored in the RESOURCE_MANAGER property.
270
271       TZ  to get the current time zone.  If you want to force  the  clock  to
272           display some other time zone, set this variable before starting it.
273           For example:
274            sh:   TZ=GMT0 xdaliclock
275           csh:   ( setenv TZ PST8PDT ; xdaliclock )
276           You may notice that the format of the TZ variable (which is used by
277           the  C  library ctime(3) and localtime(3) routines) is not actually
278           documented anywhere.  The fourth character (the digit) is the  only
279           thing that really matters: it is the offset in hours from GMT.  The
280           first three characters are ignored.  The last three characters  are
281           used to flag daylight savings time: their presence effectively adds
282           1 to the zone offset.  (I am not making this up...)
283

BUGS

285       Other system load will sometimes cause the second-display to  increment
286       by  more  than one second at a time, in order to remain synchronized to
287       the current time.
288
289       The -memory option is disgusting and shouldn't be  necessary,  but  I'm
290       not  clever  enough  to  eliminate  it.   It has been said that hacking
291       graphics in X is like finding sqrt(pi) with roman numerals.
292
293       When using a small font (less than 48x56  or  so)  it's  possible  that
294       shipping  a bitmap to the server would be more efficient than sending a
295       DrawSegments request (since the endpoints are specified using  16  bits
296       each, when all that we really need is 6 or 7 bits.)
297
298       Support for the Shared Memory Extension would be a good thing.
299
300       It should display the day of the week somewhere.
301
302       The color cycling should be less predictable; it should vary saturation
303       and intensity as well, and should be more careful that  foreground  and
304       background contrast well.
305
306       The  correct  default  datemode  should  be  extracted from the current
307       locale.
308
309       Should have a -analog mode (maybe someday...)
310

UPGRADES

312       The latest version can always  be  found  at  http://www.jwz.org/xdali
313       clock/
314
315       There is a version of this program for PalmOS available there as well.
316

SEE ALSO

318       X(1), xrdb(1), xlsfonts(1), xclock(1), dclock(1), oclock(1), tclock(1),
319       xscreensaver(1)
320
322       Copyright © 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,  2002
323       by  Jamie  Zawinski.   Permission to use, copy, modify, distribute, and
324       sell this software and its documentation  for  any  purpose  is  hereby
325       granted without fee, provided that the above copyright notice appear in
326       all copies and that both that  copyright  notice  and  this  permission
327       notice appear in supporting documentation.  No representations are made
328       about the suitability of this software for any purpose.  It is provided
329       "as is" without express or implied warranty.
330

AUTHOR

332       Jamie Zawinski <jwz@jwz.org>, 18-sep-91.
333
334       Please let me know if you find any bugs or make any improvements.
335
336       Thanks  to Ephraim Vishniac <ephraim@think.com> for explaining the for‐
337       mat of the bitmap resources in the Macintosh version of this, so that I
338       could snarf them for the -builtin3 font.
339
340       And thanks to Steve Capps for the really great idea.
341
342
343
344X Version 11                      11-Sep-2002                    XDaliClock(1)
Impressum