|
| 1 | +# TAGLINE |
| 2 | + |
| 3 | +Terminal digital clock |
| 4 | + |
| 5 | +# TLDR |
| 6 | + |
| 7 | +**Display a centered clock** with seconds |
| 8 | + |
| 9 | +```tty-clock -c -s``` |
| 10 | + |
| 11 | +**Display in 12-hour format** with bold font |
| 12 | + |
| 13 | +```tty-clock -t -b``` |
| 14 | + |
| 15 | +**Display with a box border** in green |
| 16 | + |
| 17 | +```tty-clock -x -C 2``` |
| 18 | + |
| 19 | +**Display UTC time** with a custom date format |
| 20 | + |
| 21 | +```tty-clock -u -f "[%A %d %B]"``` |
| 22 | + |
| 23 | +**Display in screensaver mode** (exits on keypress) |
| 24 | + |
| 25 | +```tty-clock -S -c -s``` |
| 26 | + |
| 27 | +**Display with bouncing motion** and blinking colon |
| 28 | + |
| 29 | +```tty-clock -r -B``` |
| 30 | + |
| 31 | +# SYNOPSIS |
| 32 | + |
| 33 | +**tty-clock** [**-iuvsScbtrahDBxn**] [**-C** _0-7_] [**-f** _format_] [**-d** _delay_] [**-a** _nsdelay_] [**-T** _tty_] |
| 34 | + |
| 35 | +# PARAMETERS |
| 36 | + |
| 37 | +**-s** |
| 38 | +> Display seconds. |
| 39 | +
|
| 40 | +**-S** |
| 41 | +> Screensaver mode; exit on first keypress. |
| 42 | +
|
| 43 | +**-x** |
| 44 | +> Show a box around the clock. |
| 45 | +
|
| 46 | +**-c** |
| 47 | +> Center the clock on the terminal. |
| 48 | +
|
| 49 | +**-C** _0-7_ |
| 50 | +> Set clock color (0=black, 1=red, 2=green, 3=yellow, 4=blue, 5=magenta, 6=cyan, 7=white). |
| 51 | +
|
| 52 | +**-b** |
| 53 | +> Enable bold font. |
| 54 | +
|
| 55 | +**-t** |
| 56 | +> Use 12-hour (AM/PM) time format. |
| 57 | +
|
| 58 | +**-u** |
| 59 | +> Display UTC time. |
| 60 | +
|
| 61 | +**-T** _tty_ |
| 62 | +> Display clock on the specified terminal device. |
| 63 | +
|
| 64 | +**-r** |
| 65 | +> Enable bouncing motion; clock bounces off terminal edges. |
| 66 | +
|
| 67 | +**-f** _format_ |
| 68 | +> Custom date format string (per **strftime**(3)). |
| 69 | +
|
| 70 | +**-n** |
| 71 | +> Do not quit on keypress; must be killed with a signal. |
| 72 | +
|
| 73 | +**-D** |
| 74 | +> Hide the date display. |
| 75 | +
|
| 76 | +**-B** |
| 77 | +> Enable blinking colon separator. |
| 78 | +
|
| 79 | +**-d** _delay_ |
| 80 | +> Set redraw delay in seconds (default: 1). |
| 81 | +
|
| 82 | +**-a** _nsdelay_ |
| 83 | +> Additional nanosecond delay between redraws. |
| 84 | +
|
| 85 | +**-v** |
| 86 | +> Display version information. |
| 87 | +
|
| 88 | +**-h** |
| 89 | +> Display help text. |
| 90 | +
|
| 91 | +# DESCRIPTION |
| 92 | + |
| 93 | +**tty-clock** is a terminal-based digital clock built with the ncurses library. It renders the current time in large block digits directly in the terminal, with optional date display below. The clock supports various display modes including centering, bouncing animation, screensaver mode, and customizable colors. |
| 94 | + |
| 95 | +While running, the clock responds to keyboard commands: **K/J/H/L** for vi-style repositioning, **0-7** to change color, **B** to toggle bold, **X** to toggle the box border, **C** to center, **R** for bouncing mode, **S** to toggle seconds, **T** for 12-hour format, and **Q** to quit. |
| 96 | + |
| 97 | +# CAVEATS |
| 98 | + |
| 99 | +The **-C** color option only supports the basic 8-color terminal palette. Centering with **-c** disables vi-style movement commands. When using **-n** mode, the process must be terminated with a signal since keypress exit is disabled. Requires **libncurses** to be installed. |
| 100 | + |
| 101 | +# HISTORY |
| 102 | + |
| 103 | +**tty-clock** was created by **Martin Duquesnoy** (xorg62) in **2008** as a lightweight terminal clock utility written in C. The project has been community-maintained since, with contributions improving signal handling, locale compatibility, and ncurses support over the years. |
| 104 | + |
| 105 | +# SEE ALSO |
| 106 | + |
| 107 | +[tty](/man/tty)(1), [date](/man/date)(1), [watch](/man/watch)(1) |
0 commit comments