Hund

tty-clock - A clock widget for the console

March 15, 2019

As much as I like my panels with Conky and all the neat information it shows [Example], I prefer keeping the panels hidden to not distract me. This means I have no way of telling the time.

Keeping track of the time can be a good thing though—duh—that’s why I use a neat console based widget called tty-clock. I’m not sure if it technically qualifies as a widget, but that’s what I call it anyway. :)

A picture of tty-clock. A clock widget for the console

To get a clock like in the example above I use this command:

$ tty-clock -c -C 7 -r -f "%A, %B %d"

Here’s a breakdown of the flags:

-c Sets the clock at the center of the terminal.
-C 7 Sets the clock color to what you see in the preview.
-r Rebounds the clock.
-f "%A, %B %d" Sets the date format as described in man date.

Check the man tty-clock for more options.

Installation

Arch Linux

Two packages are available in the AUR:

Debian family

It’s available in the repositories as tty-clock.

Gentoo Linux

It’s probably just easier to compile it yourself, but if you prefer ebuilds I wrote this super simple ebuild:

$ cat app-misc/tty-clock-2.3.ebuild

EAPI=6

DESCRIPTION="Clock using lib ncurses"
HOMEPAGE="https://github.com/xorg62/tty-clock"
SRC_URI="https://github.com/xorg62/${PN}/archive/v${PV}.tar.gz"

LICENSE="BSD-3-Clause"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"

The manual way

Download the latest point release or the latest and greatest code via git:

$ git clone https://github.com/xorg62/tty-clock

Then compile and install the files:

$ make
$ sudo make install

Meta

No Comments

Use the e-mail form, if you wish to leave feedback for this post. Markdown is supported. [Terms of service]