Scroll to navigation

DCLOCK(1) General Commands Manual DCLOCK(1)

NAME

dclock - digital clock for X

SYNOPSIS

dclock [-toolkitoption ...] [-option ...]

DESCRIPTION

The dclock program displays the time in digital format only. The time is updated on a per second basis or on a per minute basis. This program is nothing more than a wrapper around the dclock widget not associated with any particular widget set.

When the clock is running, the user may change attributes by typing:

r	Toggles Reverse Video.
s	Toggles the seconds display.
b	Toggles the bell attribute.
j	Toggles the jump/scroll attribute.
f	Toggles the fade attribute.
d	Toggles the date format.
u	Toggles the location of date (top/bottom).
m	Toggles the military time format.
a	Toggles the alarm clock.
t	Toggles the tails attribute.
:	Toggles the blinking colon.
/	Increases the tilt of the numbers.
\	Decreases the tilt of the numbers.
+	Increases the thickness of the numbers.
-	Decreases the thickness of the numbers.
>	Increases the spacing between numbers.
<	Decreases the spacing between numbers.
q	quits the program.


The third mouse button puts the clock in the mode where the alarm clock can be set. The alarm must be set in 24-hour format to distringuish between am and pm time. Digits can be changed by selecting the digit with the left or middle mouse button. The Left button advances the time while the Middle button moves the time backwards. Using the left or middle button over the text at the bottom of the clock toggles the alarm from actually being set (or, use the 'a' key).

OPTIONS

Dclock accepts all of the standard X Toolkit command line options along with the additional options listed below:

This option indicates that a brief summary of the allowed options should be printed on the standard error.

This option, if enabled, indicates that the bell will beep once on the half hour and twice on the hour.
This specifies a sound file to use to play the dclock hourly chime. If unspecified, or the string "NULL" is used, the system beep is used instead. The sound file format must be understood by the executable specified by option "audioPlay". The "NULL" value is a means to override a system-level setting to disable external sound playing.

This option, if enabled, causes the clock to display the time in 24 hour (military) time format.

This option, causes the clock to display the UTC (GMT) time rather than the default local time.

This option places [or removes] "tails" on the digits 6 and 9.

When the time changes, the digits scroll from the previous digit to the next digit. The -noscroll option turns the behavior off.

The colon separating hours from minutes blinks on and off once per second. With the -noblink option, it remains on permanently.

This option determines whether or not the clock display remains in the reverse video state after the alarm goes off.

This option, when enabled, causes the display to fade from one digit to the next instead of jumping or scrolling. If fade is specified, the scroll attribute will be automatically disabled.
The fadeRate attribute takes an integer value which specifies the number of milliseconds to wait between iterations when fading from one digit to the next. A larger value will make the fade slower and more pronounced. The default is 50.
Specifies an executable to use to play audio files for the bell and alarm. The default is none, which falls back to using the system bell for both the dclock bell and alarm.
The date is printed under the time in the specified font. The string displayed is in the "format" argument. The format corresponds to the system call strftime() (see strftime(3)).

dclock -date "Today is %A"

Useful examples of strftime() formatting:

%A	Full weekday name
%a	Three-char weekday name (Sun, Mon, Tue...)
%B	Full month name
%b	Three-char month name (Jan, Feb, Mar...)
%d	The date (numerical day number of the month)
%Y	Full year (4 digits)
%y	2-digit year number

By default, the date string is at the bottom of the display. This option starts it at the top, instead.

The alarm is turned on or off. Alarm rings bell and toggles reverse video.
If alarm is set, it goes off at time specified in 24-hour format.
This specifies a sound file to use to play the dclock alarm. If unspecified, or the string "NULL" is used, the system beep is used instead. The sound file format must be understood by the executable specified by option "audioPlay". The "NULL" string is a means to override a system-level setting to disable external sound playing.
This option will update the clock every second and display the time including the seconds.
Sets the angle of the digits according to the (floating-point) slope value value.
Sets the segment thickness as a (floating-point) ratio to digit width.
Sets the digit spacing as a (floating-point) ratio to digit width.
Sets the seconds digit size as a (floating-point) ratio to the digit size of the minutes and hours digits.
Sets the spacing of the seconds digits from the other digits as a (floating-point) ratio to digit width. -bg color This option specifies the color to use for the background of the window. The default is ``darkslategray''.
This option specifies the color to use for the border of the window. The default is ``black.''
This option specifies the width in pixels of the border surrounding the window.
This option specifies the color to use for displaying text and digit segments. The default is ``chartreuse''.
This option specifies the color to use for displaying digit segments when turned off. The default is ``darkgreen''.
This option specifies the font to be used for displaying normal text. The default is ``Fixed.''
This option specifies the preferred size and position of the clock window.
This option specifies the X server to contact.
This option specifies a resource string to be used. This is especially useful for setting resources that do not have separate command line options.

X DEFAULTS

It understands all of the core resource names and classes as well as:

Specifies the width and height and, optionally, the preferred position of the clock.
Specifies the color for the digits. Using the class specifies the color for all things that normally would appear in the foreground color. The default is ``chartreuse''.
Specifies the background color, by default ``DarkSlateGray''.
Specifies the color of the digit segments when ``off''. This can be set to be the background color, or it can be set to a color just slightly different from the background, matching the segment colors, to give just a hint of color. Default ``DarkGreen'' works well with the default segment color of ``chartreuse''.
bell (class Boolean)
Specifies whether or not a bell should be rung on the hour and half hour.
Specifies the font to be used for the date.
Specifies whether the military (24hr) time format should be used.
Specifies whether UTC (GMT) time should be used, rather than local time.
Specifies that the foreground and background colors should be reversed.
scroll (class Boolean)
Specifies whether the digits should scroll or not.
fade (class Boolean)
Specifies whether the digits should fade or not.
The number of milliseconds of delay between iterations of fading.
seconds (class Boolean)
Specifies whether the seconds should be displayed or not.
tails (class Boolean)
Specifies whether tails should be put on the digits 6 and 9.
Specifies the date format to use. The format corresponds to the system call strftime() (see strftime(3)).
Specifies whether the date is shown at the top or at the bottom.
blink (class Boolean)
Specifies whether the colon separating hours from minutes should blink on and off once per second or remain on permanently.
alarm (class Boolean)
Specifies whether the alarm should go off at the specified time (alarmTime).
Specifies the time alarm goes off if alarm is set.
Specifies whether the alarm should remain in reverse video after the alarm goes off, or return to normal video.
Defines the slope of the digits (default 6).
Defines the size of the seconds digits compared to the minutes digits (default 2/3).
Defines the amount of space between the minutes digits and the seconds digits (default 0.3).
Determines the width of segments as a ratio to digit width (default 0.13).
Determines the spacing between digit as a ratio to digit width (default 0.09).
Specifies an audio file to play for the hourly bell (no default).
Specifies an audio file to play for the alarm (no default).
Specifies an executable to use to play the bell and alarm audio files, if they are specified. Otherwise, the system bell is used (default is "/usr/bin/play").

ENVIRONMENT

to get the default host and display number. XENVIRONMENT to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property.

SEE ALSO

X(1), xrdb(1), time(3C).

BUGS

Dclock believes the system clock.

Scrolling from 9 to 10 O'Clock seems weird, but chances are you won't notice it.

Scrolling can take so long that dclock may lag behind system time by a fraction of a second and eventually skip a second to catch up. In modern times, it should be dealing with this by tracking seconds with a separate thread.

COPYRIGHT

Copyright (c) 1988, Dan Heller. Revisions copyright (c) 1993 and 1999, Tim Edwards.

AUTHOR

Original dclock by Dan Heller (1988) <argv@sun.com> or <dheller@cory.berkeley.edu>

Fade & tails by Steve Reinhardt, <steven@fts.webo.dg.com>
Derived geometry by Tim Edwards (1993) <tim@stravinsky.jhuapl.edu>
Antialiasing, color fades, and audio play by Tim Edwards (1999) <tim@stravinsky.jhuapl.edu>
1 March 1988 X Version 11