An analog clock for the console

Like I mentioned a few days ago, I have an ever-lengthening list of console applications (mostly console applications, in truth) I want to try out in the next few days, once my holiday break starts. Some of the smaller ones I’ve already started tinkering with, and I have a new screensaver now, as a result.

Meet clockywock, which stands as a sister program to my uber-favorite tty-clock.

It looks innocent enough, considering that it does a fair job showing an easily readable analog clock on the console. The animation is smooth at 550Mhz against the framebuffer, and while it’s a bit touchy distinguishing between the hands at particular times, it’s visible at a distance and scales itself to whatever space you give it. It’ll run in screen, in a corner of screen or as a blanker for screen, if you tell it too.

Configuration is easy too — just press a random key, and you get a very discreet options box.

As configurations go, this is a bit unusual, since you roll between keys to change the characters for each hand. If that’s not convenient enough, you can hand-edit (get it? hand-edit! 😆 🙄 ) the .clockywock file and change them directly.

And as if all that wasn’t enough, clockwock has an alarm and a snooze function. So you can use it … well, you can use it like an alarm, of course. 😐 (I didn’t get any sound out of clockywock personally, but I have a rather oddball system, so it’s possible that’s my fault.)

If I could make any suggestions, it would only be the addition of color. I think it would be far easier to read clockywock at a distance if you could, for example, set the hour and minute hands to different colors, or maybe use solid blocks of individual colors instead of console characters. Perhaps it’s possible to do that with escape characters in the .clockywock file; I’m not sure I’m interested enough to pursue that.

As it stands this is another solid example of a console program that fills a function — in this case, something as simple as a clock display — does it cleanly and simply, and doesn’t require a wagonload of dependencies to get the job done. A gold smilie for clockywock: 😀

10 thoughts on “An analog clock for the console

  1. Ali Gündüz

    It’s not really related to this post, but I would like to make a topic request for a blog post. 🙂

    The copy/paste issue is my current biggest blunder with an X-less system. Do you have a way of copying text inside and between applications (like web browser, email/irc/im/blog and the shell of your choice?

    Reply
    1. Peter

      GNU Screen provides copy/paste between the programs running in it.

      Ctrl-A, [

      to enter copy mode and use the SPACE bar to mark text to be copied, ESC get you out of copy mode

      Ctrl-A, ]

      to paste.

      Reply
      1. K.Mandla Post author

        Thanks, I was anticipating answering that, but I see you beat me to it.

        For what it’s worth, I sometimes keep open a tab in vim, to serve as a “clipboard” of sorts. This is particularly useful if I’m making up a blog post with repeated links in it. Paste in, copy back out, profit. …

        Reply
    1. Papanoel

      it’s you.. but not really..
      If you look at the second screenshot, the parameters are:
      – “minute hand character: h”
      – “hour hand character: m”
      Quite confusing hey?

      Reply
  2. Pingback: Using figlet for a console screensaver « Motho ke motho ka botho

  3. Pingback: binclock and a screensaver script « Motho ke motho ka botho

  4. Pingback: vtclock: One more console clock can’t hurt « Motho ke motho ka botho

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s