Skip to content

Repository files navigation

PyXClock for macOS

A borderless floating macOS clone of the classic non-Xrender xclock analog clock. It starts automatically at login and does not appear in the Dock or Command-Tab switcher.

The supplied installation reproduces this historical command:

xclock -geometry 150x150+1640+2 -analog -hd yellow -hl yellow \
  -fg yellow -bg black -update 1 -norender &

Screenshots

Native-size 150×150 clock on an Apple M4 Max running macOS 26.5:

PyXClock at its native 150 by 150 pixel size

PyXClock above the companion CPU and GPU PyXLoad graphs, alongside macOS Weather widgets:

PyXClock and PyXLoad integrated with macOS desktop widgets

Installation

PyXClock requires Python with Tkinter. With MacPorts and Python 3.14:

sudo port install python314 py314-tkinter

Then double-click install.command, or run:

chmod +x install.command uninstall.command
./install.command

The application itself installs per-user in ~/Applications/PyXClock; no sudo is required. Its LaunchAgent is ~/Library/LaunchAgents/com.page.pyxclock.plist.

Drag anywhere on the clock to move it. Right-click or Control-click for the floating-window toggle and Quit command. A separate position is remembered for each connected-display arrangement, so reconnecting a second monitor restores the clock to its former position on that monitor.

Fidelity to xclock.c and Clock.c

The implementation was checked against the official X.Org xclock.c command-line resources and the non-Xrender drawing path in Clock.c.

It reproduces the analog defaults and integer geometry used by that code:

  • 8-pixel internal padding
  • radius based on the smaller window dimension
  • 12 major and 48 minor tick marks
  • minute hand length 70% of radius
  • hour hand length 40% of radius
  • hand half-width 7% of radius
  • second hand length 90% and half-width 5% of radius
  • second hand shown when the update is at most 30 seconds
  • minute, hour, then second drawing order
  • X11-style symmetric rounding for hand vertices
  • updates aligned to clock interval boundaries

-norender is intentional: the canvas uses the classic hard-edged integer geometry rather than Xrender's anti-aliased shape definitions.

Companion projects

Uninstallation

Double-click uninstall.command. Installed files are moved to the Trash.

About

A borderless floating xclock-style analogue clock for macOS.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages