xclock Analog/Digital Clock
Name
xclock – continuously display the time in either analog or digital form.
Syntax
xclock [options]
Description
xclock continuously displays the time of day, either in digital or analog form. In digital form, xclock displays the time using a 24-hour clock. It also displays the day, month, and year. In analog form, xclock displays a standard 12-hour clock face. You can set up more than one clock simultaneously.
The default clock is an analog clock with a black foreground on a white background. If you want to change the clock's appearance, type in the appropriate options. For example,
xclock -bd slateblue -fg navyblue -hl darkslategrey &
sets up a conventional 12-hour clock with a slate blue window border, navy blue tick marks, and dark slate grey hands.
By default, the clock is positioned in the upper-left corner of your background window. If you are running the default version of mwm, the window manager will place the clock in the upper-left quadrant of the screen, offset from the corner.
Options
xclock 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, xclock accepts the following application-specific options:
-help
Displays a brief summary of xclock's calling syntax and options.
-analog
Draws a conventional 12-hour clock face with tick marks for each minute and stroke marks for each hour. This is ...
Get X Window System User's Guide, Vol 3 (The Definitive Guides to the X Window System) now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.