TTY-CLOCK(1)

πŸ“¦
version 2.3+git.20211121.f2f847c Β· 2 versions
, in debian trixie, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– TTY-CLOCK(1) πŸ’–

okay bestie, welcome to the User Commands section of the manual, because today we're talking about tty-clock and she is that girl. πŸ•βœ¨


🌸 NAME 🌸

tty-clock β€” a terminal digital clock. that's it, that's the whole vibe. a clock. in your terminal. iconic behavior. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

tty-clock [-iuvsScbtrahDBxn] [-C [0-7]] [-f format] [-d delay] [-a
nsdelay] [-T tty]

like… look at her. so many little letters. she's giving options. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so tty-clock displays a simple digital clock on the terminal. no cap. πŸ•°οΈ

if you invoke her with zero options, she'll pop the clock up in the upper left corner of the screen, on the terminal you ran her from. like she just shows up. main character energy fr fr. 🌟


🧚 COMMANDS 🧚

once she's running, tty-clock accepts a bunch of runtime keyboard commands, and bestie β€” upper and lower case characters are treated identically. so don't stress about caps lock, she doesn't care. πŸ™ˆ

  • K, J, H, L β€” vi-style movement commands, aka how you set the position of the displayed clock. tiny little nudge-nudges. β¬†οΈβ¬‡οΈβ¬…οΈβž‘οΈ
heads up tho: these do nothing when the centered option is set. she's centered, she's staying centered, periodt.
  • [0-7] β€” pick a different color for displaying the clock. rainbow moment 🌈
  • B β€” toggles between bold and normal colors.
  • X β€” toggles displaying a box around the clock. this one is disabled by default.
  • C β€” toggles the clock's position to centered. when this is set, the movement commands are disabled. no take-backs, she's the center of attention now πŸ‘‘
  • R β€” sets the clock to rebound along the edges of the terminal. she bounces. she's playful. πŸ“
  • S β€” display seconds. tick tock bestie ⏱️
  • T β€” switch the time output to the 12-hour format.
  • Q β€” quit. bye queen 🫢

✨ OPTIONS ✨

one bullet per flag, no skips, we're thorough in this house πŸ’–

  • -s β€” show seconds.
  • -S β€” screensaver mode. tty-clock terminates the moment any key is pressed. spooky lil clock 🫣
  • -x β€” show box.
  • -c β€” set the clock at the center of the terminal.
  • -C [0-7] β€” set the clock color. pick your era 🎨
  • -b β€” use bold colors.
  • -t β€” set the hour in 12h format.
  • -u β€” use UTC time. international clock, she travels ✈️
  • -T tty β€” display the clock on the given tty. tty must be a valid character device to which the user has rw access permissions. (peep the EXAMPLES section, bestie πŸ‘€)
  • -r β€” do rebound the clock. she bounce.
  • -f format β€” set the date format, as described in strftime(3). go read that page if you wanna get fancy πŸ“…
  • -n β€” do not quit the program when the Q key is pressed (or when any key is pressed while in Screensaver mode). instead, a signal must be sent to tty-clock in order to terminate its execution. she's unkillable by keyboard alone 😭 (again: see EXAMPLES)
  • -v β€” show tty-clock version.
  • -i β€” show some info about tty-clock.
  • -h β€” show usage information.
  • -D β€” hide the date.
  • -B β€” enable the blinking colon. the lil : that goes blinky blinky. lowkey mesmerizing πŸ˜΅β€πŸ’«
  • -d delay β€” set the delay (in seconds) between two redraws of the clock. default 1s.
  • -a nsdelay β€” additional delay (in nanoseconds) between two redraws of the clock. default 0ns.

πŸ”₯ EXAMPLES πŸ”₯

okay so example number one: invoking tty-clock in screensaver mode, with the clock display set to rebound and the update delay set to 1/10th of a second (10 FPS):

$ tty-clock -Sra 100000000 -d 0

10 FPS clock that bounces and also dies when you touch a key. she's fragile but she's fun πŸ’€


and now the glow-up example: this one arranges for tty-clock to be displayed indefinitely on one of the Virtual Terminals on a Linux system at boot time, using an inittab(5) entry:

# /etc/inittab:
9:2345:respawn:/usr/bin/tty-clock -c -n -T /dev/tty9

she lives on tty9 now. forever. she's not leaving. respectfully 🫢


real talk for a sec: -T needs a valid character device with rw access for your user, and -n means no keyboard quit β€” you have to send a signal. don't come crying to me when you can't Ctrl+C your way out of your own choices, bestie. 😭

okay that's the whole page!! tysm for reading, you ate that fr fr. this beauty comes to you courtesy of the October 2013 release β€” yeah she's an elder but she still serves, and that's on periodt. πŸ’œπŸ¦‹βœ¨ mwah, go stare at a clock in your terminal like the icon you are. πŸŽ€