14
.TH XDaliClock 1 "11-Sep-2002" "X Version 11"
16
xdaliclock - melting digital clock
19
[-\fItoolkitoption\fP ...] [-\fIoption\fP ...]
21
The \fIxdaliclock\fP program displays a digital clock; when a digit
22
changes, it ``melts'' into its new shape.
24
This program was inspired by the Alto and Macintosh programs of the same
25
name, written by Steve Capps in 1983 or 1984.
28
accepts all of the standard toolkit options, and also accepts the
32
Print a brief summary of the allowed options on the standard error output.
35
Use a twelve hour clock.
38
Use a twenty-four hour clock.
44
Update once per minute; don't display seconds at all.
50
Don't do color-cycling.
52
.B \-font \fIfontname\fP
53
Specifies the X font to use; \fIxdaliclock\fP can correctly animate any font
54
that contains all the digits plus colon and slash, and in which the letters
55
aren't excessively curly.
57
The \fIxdaliclock\fP program also contains four builtin bitmapped fonts,
58
which are larger and more attractive than the standard X fonts. One of
59
these fonts will be used if the \fI-font\fP option is given one of the
60
fontnames \fBBUILTIN0\fP, \fBBUILTIN1\fP, \fBBUILTIN2\fP, or \fBBUILTIN3\fP.
63
This is the same as specifying \fI-font BUILTIN0\fP.
66
This is the same as specifying \fI-font BUILTIN1\fP.
68
.B \-builtin2\fP or \fB-builtin\fP
69
This is the same as specifying \fI-font BUILTIN2\fP.
72
This is the same as specifying \fI-font BUILTIN3\fP.
75
Make the window take up the whole screen. When \fI-fullscreen\fP is
76
specified, the displayed time will wander around a little, to prevent
77
any pixels from being on continuously and causing phosphor burn-in.
80
Display the clock on the root window instead of in its own window.
81
This makes the digits wander around too.
83
.B \-window-id \fIwindow\fP
84
Render the clock on a window created by some other program.
86
.B \-visual \fIvisual\fP
87
Specify which visual to use. Legal values are:
91
Use the screen's default visual (the visual of the root window.)
95
Use the visual which supports the most writable color cells.
98
One of \fBStaticGray\fP, \fBStaticColor\fP, \fBTrueColor\fP, \fBGrayScale\fP,
99
\fBPseudoColor\fP, or \fBDirectColor\fP. Selects the deepest visual of
103
A number (decimal or hex) is interpreted as a visual id number, as reported
106
program; in this way you can select a shallower visual if desired.
110
If you don't have a 24-bit system, using a visual other than the default
111
one may cause colormap flashing.
115
Causes the background of the window to be transparent, if possible.
117
If the server supports overlay planes, then they will be used (this is
118
the case on SGIs, and on certain HP, DEC, and IBM systems.)
120
If overlay planes are not available, but the server supports the Shape
121
extension, then that will be used instead. However, the Shape extension
122
is very inefficient: it will cause your X server to use up a lot of cycles.
124
Also, if the Shape extension is used, you will probably need to configure
125
your window manager to not put a titlebar on the XDaliClock window. (This
126
is the case at least with \fItwm\fP, \fItvtwm\fP, and \fImwm\fP.) If
127
you don't do this, then the window will flicker constantly, as the window
128
manager tries to add and remove the titlebar ten times each second.
130
None of these problems occur if overlay planes are used (or if
131
the \-transparent option is not requested.)
134
Don't make the window's background be transparent. This is the default.
137
Use high-bandwidth, low-memory mode. If you have a very fast connection
138
between the machine this program is running on and the X server it is
139
displaying on, then \fIxdaliclock\fP can work correctly by simply making
140
the drawing requests it needs when it needs them. This is \fIthe elegant
141
method.\fP However, the amount of data necessary to animate the display
142
ends up being a bit over 10 kilobytes worth of X Protocol per second. On a
143
fast machine with a local display, or over a fast network, that's almost
144
negligible, but (for example) an NCD X Terminal at 38.4 kbps can't
145
keep up. That is the reason for:
148
Use high-memory, low-bandwidth mode. In this mode, \fIxdaliclock\fP
149
precomputes most of the frames that it will ever need. This is \fIthe
150
sleazy copout method.\fP The bandwidth requirements are drastically
151
reduced, because instead of telling the server what bits to draw where,
152
it merely tells it what pixmaps to copy into the window. Aside from the
153
fact that I consider this to be \fIcheating,\fP the only downside of this
154
method is that those pixmaps (about 170 of them, each the size of one
155
character) are consuming server-memory. This probably isn't a very big deal,
156
unless you're using an exceptionally large font.
159
With \fImemory\fP set to \fIhigh\fP, the cache is twice as
160
large (the \fIn -> n+2\fP transitions are cached as well as the \fIn -> n+1\fP
161
ones). Even with memory set to \fImedium\fP, this program can seem sluggish
162
when using a large font over a very slow connection to the display server.
164
.B \-countdown \fIdate\fP
165
Instead of displaying the current time, display a countdown to the specified
166
date (if the date has already passed, count up from it.) The date can take
167
two forms: either a time_t (an integer, the number of seconds
168
past "Jan 1 00:00:00 GMT 1970"); or, a string of the form
169
"Mmm DD HH:MM:SS YYYY", for example, "Jan 1 00:00:00 2000". This string
170
is interpreted in the local time zone.
172
To count up from the current time, do this:
174
xdaliclock \-countdown "`date '+%b %d %T %Y'`"
177
The following standard X Toolkit command line arguments are commonly
178
used with \fIxdaliclock\fP:
180
.B \-display \fIhost:dpy\fP
181
This option specifies the X server to contact.
183
.B \-geometry \fIgeometry\fP
184
This option specifies the prefered size and position of the clock window.
187
This option specifies the color to use for the background of the window.
188
The default is ``white.''
191
This option specifies the color to use for the foreground of the window.
192
The default is ``black.''
195
This option specifies the color to use for the border of the window.
196
The default is the same as the foreground color.
199
This option indicates that reverse video should be simulated by swapping
200
the foreground and background colors.
203
This option specifies the width in pixels of the border surrounding
206
.B \-xrm \fIresourcestring\fP
207
This option specifies a resource string to be used.
209
Clicking and holding any mouse button in the \fIxdaliclock\fP window will
210
cause it to display the date while the button is held.
212
Typing ``space'' at the \fIxdaliclock\fP window will toggle between a
213
twelve hour and twenty-four hour display.
215
Typing ``q'' or ``^C'' at the window quits.
217
If the \fIxdaliclock\fP window is iconified or otherwise unmapped, it
218
will go to sleep until it is mapped again.
220
\fIxdaliclock\fP understands all of the core resource names and
225
.B mode (\fPclass\fB Mode)
226
Whether to display 12-hour or 24-hour time.
227
If \fB12\fP, this is the same as the \fI\-12\fP command line argument;
228
if \fB24\fP, this is the same as \fI\-24.\fP
230
.B datemode (\fPclass\fB DateMode)
231
Specifies how the date should be printed when a mouse button is held down.
232
This may be one of the strings \fBmm/dd/yy\fP, \fBdd/mm/yy\fP,
233
\fByy/mm/dd\fP, \fByy/dd/mm\fP, \fBmm/yy/dd\fP, or \fBdd/yy/mm\fP.
234
The default is \fBmm/dd/yy\fP. If seconds are not being displayed, then
235
only the first four digits will ever be displayed (\fBmm/dd\fP instead
236
of \fBmm/dd/yy\fP, for example.)
238
.B seconds (\fPclass\fB Seconds)
239
Whether to display seconds.
240
If true, this is the same as the \fI-seconds\fP command line argument;
241
if false, this is the same as \fI-noseconds.\fP
243
.B cycle (\fPclass\fB Cycle)
244
Whether to do color cycling.
245
If true, this is the same as the \fI-cycle\fP command line argument;
246
if false, this is the same as \fI-nocycle.\fP
248
.B font (\fPclass\fB Font)
249
The same as the \fI-font\fP command line option: the font to melt.
250
If this is one of the
251
strings \fBBUILTIN0\fP, \fBBUILTIN1\fP, \fBBUILTIN2\fP, or \fBBUILTIN3\fP,
252
then one of the large builtin fonts will be used. Otherwise, this must
253
be the name of a valid X font.
255
.B fullScreen (\fPclass\fB FullScreen)
256
The same as the \fI\-fullscreen\fP command-line option.
258
.B root (\fPclass\fB Root)
259
The same as the \fI\-root\fP command-line option.
261
.B visualID (\fPclass\fB VisualID)
262
The same as the \fI\-visual\fP command-line option.
264
.B transparent (\fPclass\fB Transparent)
265
Whether to make the window's background be transparent, if possible.
266
If true, this is the same as the \fI-transparent\fP command line argument;
267
if false, this is the same as \fI-nontransparent.\fP
269
.B memory (\fPclass\fB Memory)
270
This must be \fIhigh\fP, \fImedium\fP, or \fIlow\fP, the same as
271
the \fI-memory\fP command-line option.
273
.B countdown (\fPclass\fB Countdown)
274
Same as the \fI-countdown\fP command-line option.
279
to get the default host and display number.
282
to get the name of a resource file that overrides the global resources
283
stored in the RESOURCE_MANAGER property.
286
to get the current time zone. If you want to force the clock to display
287
some other time zone, set this variable before starting it. For example:
289
sh: TZ=GMT0 xdaliclock
290
csh: ( setenv TZ PST8PDT ; xdaliclock )
292
You may notice that the format of the TZ variable (which is used by the
297
routines) is not actually documented anywhere. The fourth character (the
298
digit) is the only thing that really matters: it is the offset in hours from
299
GMT. The first three characters are ignored. The last three characters are
300
used to flag daylight savings time: their presence effectively adds 1 to the
301
zone offset. (I am not making this up...)
303
Other system load will sometimes cause the second-display to increment
304
by more than one second at a time, in order to remain synchronized to
307
The \fI-memory\fP option is disgusting and shouldn't be necessary, but I'm
308
not clever enough to eliminate it. It has been said that hacking graphics
309
in X is like finding \fIsqrt(pi)\fP with roman numerals.
311
When using a small font (less than 48x56 or so) it's possible that shipping
312
a bitmap to the server would be more efficient than sending a DrawSegments
313
request (since the endpoints are specified using 16 bits each, when all that
314
we really need is 6 or 7 bits.)
316
Support for the Shared Memory Extension would be a good thing.
318
It should display the day of the week somewhere.
320
The color cycling should be less predictable; it should vary saturation and
321
intensity as well, and should be more careful that foreground and background
324
The correct default datemode should be extracted from the current locale.
326
Should have a \fI-analog\fP mode (maybe someday...)
328
The latest version can always be found at
329
http://www.jwz.org/xdaliclock/
331
There is a version of this program for PalmOS available there as well.
342
Copyright \(co 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002 by
343
Jamie Zawinski. Permission to use, copy, modify, distribute, and sell this
344
software and its documentation for any purpose is hereby granted without fee,
345
provided that the above copyright notice appear in all copies and that both
346
that copyright notice and this permission notice appear in supporting
347
documentation. No representations are made about the suitability of this
348
software for any purpose. It is provided "as is" without express or implied
351
Jamie Zawinski <jwz@jwz.org>, 18-sep-91.
353
Please let me know if you find any bugs or make any improvements.
355
Thanks to Ephraim Vishniac <ephraim@think.com> for explaining the format of
356
the bitmap resources in the Macintosh version of this, so that I could snarf
357
them for the \fI-builtin3\fP font.
359
And thanks to Steve Capps for the really great idea.