Skip to main content

term-clock

A digital clock for the terminal. It shows hh:mm:ss, stays on the wall-clock second, and grows to fill the window. By default it also tracks 15-minute blocks: amber in the last five minutes, red in the last minute, with a progress bar under the digits.

Works over SSH the same way it works locally: alternate screen, no flicker, CTRL+C returns you to the prompt.

Install

pip install term-clock-app

Already installed:

pip install -U term-clock-app

The PyPI name is term-clock-app because term-clock / termclock is already taken. The command you run is still term-clock.

From a clone:

pip install -e .

Python 3.9 or newer. No runtime dependencies.

Run

term-clock
# or
python -m term_clock
term-clock --padding 1 --spacing 2          # layout defaults
term-clock --hour-format 12
term-clock --interval off                   # plain clock, no interval colours
term-clock --interval 15 --interval-bar on
term-clock --clock-color "#88ccff" --background-color "#101018"

Press CTRL+C to quit.

Options

Flag Default Meaning
--padding N 1 Blank rows and columns around the clock
--spacing N 2 Blank columns between digits
--hour-format {12,24} system clock, or 24 12-hour with AM/PM, or 24-hour
--clock-color HEX terminal Digit colour (#rrggbb)
--background-color HEX terminal Background colour
--interval MINUTES 15 Interval length; off / none disables
--interval-start HH:MM 0:00 Anchor for the interval grid
--interval-amber MINUTES 5 Minutes before the end → amber
--interval-red MINUTES 1 Minutes before the end → red
--interval-amber-color HEX #f09000 Amber colour
--interval-red-color HEX #ff0000 Red colour
--interval-bar {on,off} on Progress bar under the digits
--config-file FILE ~/.config/term-clock/term-clock.conf Settings file

The default hour format follows the environment's time locale (LC_TIME / T_FMT) when that can be read. If it cannot, the clock uses 24-hour.

Intervals

Meetings on 15-minute marks: the clock turns amber in the last 5 minutes of each block, red in the last minute. The optional bar grows under the digits from left to right — default colour, then amber, then red — so just before the boundary you see a full-width bar with a band of amber and a sliver of red at the end.

--interval-bar off hides the bar only; the digits still change colour. --interval off turns intervals off entirely (no colour changes, no bar).

Intervals tile forwards and backwards from --interval-start (default 0:00), so a 27-minute cycle can still start at 09:00. With the defaults, blocks end at :00, :15, :30, and :45.

term-clock --interval 15
term-clock --interval-bar off
term-clock --interval 27 --interval-start 9:00 --interval-amber 5 --interval-red 1
term-clock --interval off

Config file

Flags can live in ~/.config/term-clock/term-clock.conf ($XDG_CONFIG_HOME if set). CLI flags override the file.

[term-clock]
padding = 1
spacing = 2
hour-format = 24
clock-color =
background-color =
interval = 15
interval-start = 0:00
interval-amber = 5
interval-red = 1
interval-amber-color = #f09000
interval-red-color = #ff0000
interval-bar = on

Display

  • 7 or fewer lines: a plain text clock, centred.
  • 8+ lines: large seven-segment digits drawn with full blocks █ for horizontal and vertical bars (square ends), and the four triangles ◤ ◥ ◣ ◢ for 45° cuts on outer curves (one column per row — never sampled, never an off-angle diagonal). They grow to fill the window (each axis stretched by at most 1.5× before the rest becomes centring margin). If the window is too small for a readable clock, it falls back to the text version.
  • Colons: two small axis-aligned blocks (no diagonals), centred, spanning at most one third of the digit height.
  • 12-hour: AM or PM sits to the right of the digits.
  • Timing: after each paint the process sleeps until the next wall-clock second, then keeps waiting until the displayed hh:mm:ss actually changes. If that second has already arrived, it paints immediately. A resize is picked up on the next second. Unchanged cells are not rewritten.

Develop

pip install -e ".[dev]"
pytest

Pure rendering lives in term_clock/core.py (unit-tested). The terminal loop is in term_clock/cli.py.

See DESIGN.md for the design and the TDD log.

License

MIT. See LICENSE.

Metadata

Release files for term-clock-app 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for term-clock-app 1.1.0
File Size Uploaded
term_clock_app-1.1.0.tar.gz 23.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for term-clock-app 1.1.0
File Interpreter ABI Platform
term_clock_app-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.8 kB

Release files / term_clock_app-1.1.0.tar.gz

Download URL term_clock_app-1.1.0.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bafa357191d357a11fc4db813063451c3f0a9ac2ba07b1b0f610d6aa1185d1a1
BLAKE2b-256 checksum
How to use checksums
7e9f1023ab3b751b85ec845ead15997b0658a2f44ee705fe8840b0009ce731ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / term_clock_app-1.1.0-py3-none-any.whl

Download URL term_clock_app-1.1.0-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5248c48ea8aff326713c9b61d4d87560651f18ed45dbd9c1a070ee5fbe84a2c2
BLAKE2b-256 checksum
How to use checksums
1f6b4765ce21a9726149e6631430c7cbfeec27baefd8edd2193ba3fbc483b2f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release history Release notifications | RSS feed

1.2.0

2 release files

This release

1.1.0 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page