xorg62/tty-clock
FreeClock using lib ncurses
FreeFree tier
About xorg62/tty-clock
tty-clock is a lightweight, terminal-based digital clock utility built using the ncurses library. It displays the current time and date in a customizable format, with options to show seconds, enable a screensaver mode, center the clock, change colors, use 12-hour format, show UTC time, display on a specific TTY, and more. The tool is open source under the BSD-3-Clause license and is written primarily in C.
Key Features
Shows current time and date in terminal
Customizable display format via -f option
Screensaver mode (-S)
12-hour time format (-t)
UTC time display (-u)
Color selection with -C [0-7] and bold colors (-b)
Display on a specific TTY (-T)
Bold colors mode (-b)
Blinking colon between hours and minutes (-B)
Hide date display (-D)
Pros & Cons
Pros
- Lightweight and minimal resource usage
- Highly customizable via command-line options
- Open source with permissive BSD license
- Works in pure terminal environments
- Simple to compile and install
Cons
- Limited to terminal display – no GUI or web interface
- No alarm or timer functionality
- Documentation is brief (man page and README)
- Only displays time and date, no weather or calendar integration
Best For
Display a persistent clock in a terminal sessionScreensaver-like clock on idle terminalsShow time on a dedicated terminal or TTYDemonstrate ncurses UI programming concepts
FAQ
What is tty-clock?
tty-clock is a terminal-based digital clock using the ncurses library. It displays the current time and date with various customization options.
Is tty-clock free to use?
Yes, tty-clock is open source and free to use, modify, and distribute under the BSD-3-Clause license.
What options does tty-clock support?
tty-clock supports options such as showing seconds (-s), screensaver mode (-S), centering (-c), setting color (-C [0-7]), bold colors (-b), 12-hour format (-t), UTC time (-u), displaying on a specific TTY (-T), rebound (-r), date format (-f), hiding date (-D), blinking colon (-B), delay settings (-d and -a), and more. Use -h to see the full list.
How do I change the clock color?
Use the -C flag followed by a number 0-7 to set the clock color. Add -b for bold colors.
Can I run tty-clock in screensaver mode?
Yes, use the -S flag to enable screensaver mode which hides the cursor and fills the terminal.