NAME
oclock − display time of day in analog form.
SYNTAX
oclock [options]
DESCRIPTION
oclock displays the current time on an analog display. The clock face is smaller and more stylized than that for xclock. For example, there are no tick-marks, save for a "jewel" at the 12 o’clock position. The chief virtue of oclock, and the one thing that has made it popular, is that it makes use of the X shape extension, which supports non-rectangular windows. The default oclock window is round, but it can be resized into all kinds of interesting ovals.
Chapter 8, Other Clients, describes how to use the oclock client.
OPTIONS
oclock accepts all of the standard X Toolkit command-line options, which are listed on the X reference page. (We’ve included some of the more commonly used Toolkit options later in this section.) In addition, oclock accepts the following application-specific options:
-backing level
Specifies an appropriate level of backing store. level is one of WhenMapped, Always, or NotUseful.
-hour color
Specifies a color for the hour hand of the clock.
-jewel color
Specifies a color for the jewel of the clock.
-minute color
Specifies a color for the minute hand of the clock.
-noshape
Causes the clock not to use the shape extension for non-rectangular windows; in short, with -noshape, you get a square or rectangular clock. Note that the behavior is still different from xclock -analog. If you resize xclock so that its window is rectangular, the round clockface image is centered in the rectangle. With oclock, the border of the window is always the shape of the clock.
-shape
Causes the clock to use the shape extension, which allows non-rectangular windows. You get the standard round clock face; this is the default.
-transparent
Creates a transparent clock consisting only of the jewel, hands, and clock border. This creates an interesting visual effect: i.e., the background on which the oclock is placed can be seen through the clock.
The following standard X Toolkit options are commonly used with oclock:
-bg color
Specifies a color for the background.
-bw pixels
Specifies a width in pixels for the window border. As the Clock widget changes its border around quite a bit, this is most usefully set to zero.
-fg color
Specifies a color for both the hands and the jewel of the clock.
RESOURCES
You can specify the following nonstandard resources for oclock. Note that you can use either the clock widget or oclock in the resource specification. If you use the clock widget, you must precede it with a loose binding; if you use oclock, you must follow it with a loose binding. For example, these two resources would both produce an oclock with a red hour hand: ∗clock.hour: red oclock∗hour: red Since the latter resource is more specific, it has precedence. Thus, if a resource file contained both of the following: ∗clock.hour: red oclock∗hour: blue any subsequent instance of oclock would have a blue hour hand. See Chapter 11, Setting Resources, for more information.
Here are the resources you can set:
backingStore (class BackingStore)
Specifies an appropriate level of backing store. Allowable values are WhenMapped, Always, or NotUseful.
hour (class Foreground)
Specifies a color for the hour hand.
jewel (class Foreground)
Specifies a color for the jewel of the clock.
minute (class Foreground)
Specifies a color for the minute hand.
shapeWindow (class ShapeWindow)
When false, causes the clock not to use the shape extension for non-rectangular windows. (See the -noshape option above.) The default is true (the shape extension is used and you get the default round clock face).
transparent (class Transparent)
If true, creates a transparent clock consisting only of the jewel, hands, and clock border. See also the -transparent option above. The default is false.
COLORS
Although the default colors for the Clock widget are black and white, the widget was designed in color. Release 5 sees the addition of an application defaults file specifying colors for the various features of the oclock. (The Release 4 version of oclock requires you to specify every desired color in your own resources file.) If you would like your clock to be viewable in the prescribed colors, include the following resource definition in the #ifdef COLOR section of your .Xresources file (or whatever file you read with xrdb): Clock∗customization: -color On a color display, this will cause oclock to use the colors specified in the application defaults color customization file (generally /usr/lib/X11/app-defaults/Clock-color). The default colors specified are:
Clock∗Background: grey
Clock∗BorderColor: light blue
Clock∗hour: yellow
Clock∗jewel: yellow
Clock∗minute: yellow
Of course, you can opt to specify alternative colors in your own resource file.
For instructions on specifying resources, see Chapter 11 of this guide.
FILES
/usr/lib/X11/app-defaults/Clock-color—Specifies color resources (as of Release 5).
SEE ALSO
X; Chapter 8, Other Clients; Chapter 11, Setting Resources; Volume Four, X Toolkit Intrinsics Programming Manual; Volume Five, X Toolkit Intrinsics Reference Manual.
AUTHOR
Keith Packard, MIT X Consortium.