LinuxCommandLibrary

oclock

Display a graphical analog clock

SYNOPSIS

oclock [options]

PARAMETERS

-geometry <geometry>
    Specifies the initial size and position of the clock window, e.g., 80x80+10+10.

-display <display>
    Determines which X server to connect to, useful in multi-display environments.

-fg <color>
    Sets the foreground color, affecting the clock hands, numbers, and tick marks.

-bg <color>
    Sets the background color of the clock's face.

-bd <color>
    Defines the color of the window border.

-bw <pixels>
    Sets the width of the window border in pixels.

-digital
    Switches the clock display to a digital numerical format within the round face.

-analog
    Uses the traditional analog hand-based display format (this is the default).

-chime
    Enables an audible chime on the hour and half-hour.

-update <milliseconds>
    Sets the interval at which the clock updates its display, in milliseconds. Lower values mean smoother second hand movement but higher CPU usage.

-shape
    Requests a shaped window, allowing for a truly circular clock without a rectangular background (if supported by the X server and window manager).

DESCRIPTION

oclock is a traditional analog clock application designed for the X Window System. It graphically displays the current time with rotating hour, minute, and second hands. Known for its distinct round shape, it can also be configured to show time in a digital format within its circular face. It serves as a simple, unobtrusive desktop widget, often launched as part of a user's X session or through a window manager. As a lightweight graphical utility, oclock remains a testament to the early days of graphical computing on Unix-like systems, providing a basic yet functional time display without significant resource overhead. It provides a straightforward and classic visual representation of time for X users.

CAVEATS

oclock is a graphical X application and requires an active X Window System environment to run. It is not suitable for command-line scripting on headless servers or for users without a graphical desktop. Its design is minimalistic, offering basic time display without advanced features found in modern desktop widgets.

X RESOURCES

oclock, like many X applications, can be extensively configured via X resource files such as ~/.Xdefaults or ~/.Xresources. These files allow users to define default settings for colors, fonts, geometry, and other attributes without using command-line options.

Example:
Oclock*background: midnightblue
Oclock*foreground: lightgray
Oclock*chime: true


These settings are loaded by the X server or applications, providing persistent customization. After modifying ~/.Xresources, it's often necessary to run xrdb -load ~/.Xresources to apply changes.

DESKTOP INTEGRATION

In older window managers (like fvwm, twm) or minimalist desktop environments, oclock was often explicitly launched as a standalone application or 'docked' into a panel. It can be run from a terminal in an X session, or included in a startup script like ~/.xinitrc or a desktop environment's autostart mechanism to appear automatically upon login. Its round shape and simplicity made it a popular choice for integrating into various custom desktop layouts.

HISTORY

oclock emerged as an early utility within the X Window System, originally developed by Dave Mankins at MIT in 1988. It quickly became a standard inclusion in various xorg-apps or x11-apps packages across Unix-like operating systems. Its enduring presence underscores its foundational role in providing basic graphical desktop functionality in the nascent stages of graphical user interfaces on Linux and Unix systems. It remains maintained as part of the X.Org project.

SEE ALSO

xclock(1), xset(1), xrdb(1)

Copied to clipboard