.TH xdaliclock "" "" "X Application"
.PC "Melting digital clock"
.B xdaliclock [-\fItoolkitoption\fB ...] [-\fIoption\fB ...]\fR
.PP
.B xdaliclock
displays a digital clock whose digits ``melt'' into one another.
.SH Options
.B xdaliclock
accepts all of the standard X toolkit options.
It also recognizes the following options:
.IP \fB\-12\fR
Use a 12-hour clock.
.IP \fB\-24\fR
Use a 24-hour clock.
.IP \fB\-builtin\fR
This is the same as specifying
.BR "\-font BUILTIN" .
.IP \fB\-builtin2\fR
This is the same as specifying
.BR "\fB\-font BUILTIN2" .
.IP \fB\-cycle\fR
Do color-cycling.
.IP "\fB\-font \fIname\fR"
Use
.IR font .
.B xdaliclock
can correctly animate any font that contains all the digits plus colon
and slash and whose the letters are not excessively curly.
.IP
.B xdaliclock
program contains a pair of built-in bitmapped fonts,
which are larger and more attractive than the standard X fonts.
.B xdaliclock
uses one of these fonts if you set the
.B \-font
option to
.B BUILTIN
or
.BR BUILTIN2 .
.IP \fB\-fullscreen\fR
Make the window take up the whole screen.
With this option,
the displayed time will wander around a little to prevent
any pixels from being on continuously and ``burning in'' the screen.
.IP \fB\-help\fR
Print a brief summary of the allowed options on the standard error output.
.IP "\fB\-memory low\fR"
Use high-bandwidth, low-memory mode.
If you have a very fast connection between the machine this program
is running on and the X server it is displaying on,
then
.B xdaliclock
can work correctly by simply making the drawing requests
it needs when it needs them.
This is \fIthe elegant method.\fR
However, the amount of data necessary to animate the display
ends up exceeding ten kilobytes' worth of X Protocol per second.
On a fast machine with a local display, or over a fast network, that is almost
negligible, but (for example) an NCD X Terminal at 38.4 kilobaud cannot
keep up.  That is the reason for:
.IP "\fB\-memory medium\fR"
Use high-memory, low-bandwidth mode.
In this mode,
.B xdaliclock
precomputes most of the frames that it will ever need.
This is \fIthe sleazy copout method.\fR
This method drastically reduces the bandwidth requirements,
because instead of telling the server what bits to draw where,
it merely tells it what pixmaps to copy into the window.
Aside from the fact that I consider this to be
.IR cheating ,
the only downside of this method is that those pixmaps
(about 170 of them, each the size of one character)
are consuming server-memory.
This probably is not a very big deal unless you're using
an exceptionally large font.
.IP "\fB\-memory high\fR"
This method doubles the size of the cache:
.B xdaliclock
caches the \fIn -> n+2\fR transitions as well as the \fIn -> n+1\fR ones.
Even with memory set to
.BR medium ,
this program can seem sluggish  when using the builtin font
over a very slow connection to the display server.
.IP \fB\-nocycle\fR
Do not do color-cycling.
This is the default.
.IP \fB\-noseconds\fR
Update once per minute:
do not display seconds at all.
.IP \fB\-noshape\fRn
Do not use the
.BR "Shape Extension" .
.IP \fB\-onroot\fR
Display the clock on the root window instead of in its own window.
This makes the digits wander around too.
.IP \fB\-seconds\fR
Update every second.
This is the default.
.IP \fB\-shape\fR
Use the Shape Extension, if it is available, to make the window background
transparent.
.IP
This does not interact well with the window managers
.B twm
or
.BR tvtwm ,
unless they have been configured to not put a titlebar on the window
.BR xdaliclock .
If this is not specified in files
.B .twmrc
or
.BR .tvtwmrc ,
the window will flicker constantly as the window manager
tries to add and remove the titlebar ten times each second.
.IP
Also, this turns most X servers into huge cycle hogs.
This is probably
because of inefficient implementations of the
.B Shape
extension.
.IP "\fB-visual \fItype\fR"
Set the visual to
.IR type .
If none is specified,
.B xdaliclock
uses the screen's default visual unless you specify option
.BR \-cycle ,
in which case the default visual is
.BR PseudoColor .
You should only need to specify
a visual if you want to do color cycling and your display does not have a
.B PseudoColor
visual (but does have a
.B DirectColor
or
.B GrayScale
visual.)
.PP
The following standard X Toolkit command line arguments are commonly used with
.BR xdaliclock :
.IP "\fB\-bd \fIcolor\fR"
Set the color of the border to
.IR color .
.IP "\fB\-bg \fIcolor\fR"
Set the color of the background to
.IR color .
.IP "\fB\-bw \fIpixels\fR"
Set the width of the border to
.IR pixels .
.IP "\fB\-display \fIhost\^\fB[:\fIserver\^\fB][.\fIscreen\^\fB]\fR"
Display the client's window on screen number
.I screen
of
.I server
on host system
.IR host .
.IP "\fB\-fg \fIcolor\fR"
Set the color of the foreground to
.IR color .
.IP "\fB\-fn \fIfont\fR"
Use
.I font
in the display.
.IP "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to
.IR geometry .
The term ``geometry'' means the dimensions of the window and its location
on the screen.
.I geometry
has the form \fIwidth\(muheight\(+-xoffset\(+-yoffset\fR.
.IP \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors.
.IP "\fB\-xrm \fIresourcestring\fR"
Use
.I resourcestring
to define a resource.
.SH Commands
Clicking and holding any mouse button in the
.B xdaliclock
window will
cause it to display the date while the button is held.
.PP
Pressing
.B <space>
at the
.B xdaliclock
window toggle between a 12-hour and 24-hour display.
.PP
To close the window, type `Q' or
.BR <ctrl-C> .
If the
.B xdaliclock
window is iconified or otherwise unmapped, it goes
to sleep until it is mapped again.
.SH "X Defaults"
.B xdaliclock
understands all of the core resource names and classes as well as:
.IP "\fBseconds (\fRclass\fB Seconds)\fR"
Whether to display seconds.
If true, this is the same as the
.BR \-seconds
command line argument;
if false, this is the same as
.BR \-noseconds .
.IP "\fBcycle (\fRclass\fB Cycle)\fR"
Whether to do color cycling.
If true, this is the same as the command line argument
.BR \-cycle ;
if false, this is the same as
.BR \-nocycle .
.IP "\fBshape (\fRclass\fBShape)\fR"
Indicate whether to use the Shape Extension, if available.
If
.BR true ,
this is the same as the command-line argument
.BR \-shape ;
if
.BR false ,
this is the same as
.BR \-noshape .
.IP "\fBmemory (\fRclass\fB Memory)\fR"
This must be
.BR high ,
.BR medium ,
or
.BR low .
This is the same as the command-line option
.BR memory .
.IP "\fBfont (\fRclass\fB Font)\fR"
This names the font to melt.
It is the same as the command-line option
.BR \-font .
If this is the string
.BR BUILTIN ,
then the large built-in font is used.
If this is the string
.BR BUILTIN2 ,
then it uses the even larger built-in font.
Otherwise, this must name a valid X font.
.IP "\fBmode (\fRclass\fB Mode)\fR"
Whether to display 12-hour or 24-hour time.
If \fB12\fP, this is the same as the command-line argument
.BR \-12 ;
if \fB24\fP,
this is the same as
.BR \-24 .
.IP "\fBdatemode (\fRclass\fB DateMode)\fR"
This sets how
.B xdaliclock
print the date when you hold down a mouse button.
This may be one of the strings
.BR mm/dd/yy ,
.BR dd/mm/yy ,
.BR yy/mm/dd ,
.BR yy/dd/mm ,
.BR mm/yy/dd ,
or
.BR dd/yy/mm .
The default is
.BR mm/dd/yy .
 If seconds are not being displayed, then
.B xdaliclock
displays only the first four digits (i.e.,
.B mm/dd
instead of
.BR mm/dd/yy ,
for example).
.IP "\fBfullScreen (\fRclass\fB FullScreen)\fR"
The same as the
.BR \-fullscreen
command-line option.
.IP "\fBonroot (\fRclass\fB OnRoot)\fR"
The same as the command-line option
.BR \-onroot .
.SH Environment
.B xdaliclock
reads the following environmental variables:
.IP \fBDISPLAY\fR
The default host and display number.
.IP \fBXENVIRONMENT\fR
The name of a resource file that overrides the global resources
stored in the property
.BR RESOURCE_MANAGER .
.SH "See Also"
.B
oclock,
X applications,
xrdb,
xlsfonts,
xclock
.R
.SH Notes
If the system's load is high,
.B xdaliclock
will sometimes increment the second-display by more than one second at a time,
in order to remain synchronized to the current time.
.PP
When using a small font (less than 48x56 or so),
it is possible that shipping a bitmap to the server would be
more efficient than sending a
.B DrawSegments
request, because the endpoints are specified using 16 bits each,
when all that we really need is 6 or 7 bits.
.PP
Copyright \(co 1991, 1992 by Jamie Zawinski.
Permission to use, copy, modify, 
distribute, and sell this software and its documentation for any purpose is
hereby granted without fee, provided that the above copyright notice appear
in all copies and that both that copyright notice and this permission notice
appear in supporting documentation.
No representations are made about the
suitability of this software for any purpose.
It is provided ``as is'' without express or implied warranty.
.PP
.II "Capps, Steve"
.II "Zawinski, Jamie"
.II "Vishniac, Ephraim"
.B xclock
was written by
Jamie Zawinski (jwz@lucid.com).
It was inspired by the Alto and Macintosh programs of the same
name, written by Steve Capps in 1983 or 1984.
The author
thanks Ephraim Vishniac (ephraim@think.com) for explaining the format of
the bitmap resources in the Macintosh version of this.
