LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

tock

Digital clock for the terminal

TLDR

Display a centered 24-hour clock with seconds
$ tock -s -m -c
copy
Custom color and font dimensions
$ tock -C [4] -W [3] -H [2]
copy
Custom date format
$ tock -f "[%A, %B %d]"
copy

SYNOPSIS

tock [options]

DESCRIPTION

tock is a digital clock for the terminal inspired by tty-clock. It supports customizable positioning, font sizing, 12/24-hour modes, color selection, seconds display, and date formatting.

PARAMETERS

-s, --second

Display seconds.
-m, --military
Use 24-hour (military) time format.
-c, --center
Center the clock in the terminal (overrides manual positioning).
-C, --color COLOR
Set the clock color using an ANSI value 0-7 (default: 2).
-x, --x X
Horizontal 0-indexed position of the clock's top-left corner (default: 0).
-y, --y Y
Vertical 0-indexed position of the clock's top-left corner (default: 0).
-W, --width WIDTH
Font width in characters per tile (default: 2).
-H, --height HEIGHT
Font height in characters per tile (default: 1).
-f, --format FORMAT
Custom date format string (default: "%F | %Z").
-h, --help
Display help information.

INTERACTIVE KEYS

q

Quit the clock.
s
Toggle seconds display.
m
Toggle 24-hour (military) time.
0-7
Change the ANSI color at runtime.

INSTALL

brew install tock
copy

CAVEATS

UNIX only due to termios usage.

HISTORY

tock was created by nwtnni and is written in Rust.

SEE ALSO

date(1), tty-clock(1), figlet(1)

Copied to clipboard
Kai