Tag Archives: screensaver

binary-clock: Welcome to the geek club

I’ve been spending a lot of time in some core Linux packages lately, and I would do well to step outside those for a short while. Here’s one or two that are newer than BSD4.25.013a. … πŸ™„

Most of the geeks I know personally — the ones who venture out of their dens willingly, to make contact with the outside world — are for some reason fascinated by binary clocks.

I think it’s an intellectual superiority thing, where the ability to recognize and appreciate a binary clock is a clue to another geek. From there they can have discussions at a level deeper than fried foods, pictures of offspring and American-style football.

Instead, they can jump to more esoteric topics, such as the incongruencies between particular variations on the Star Trek universe. Or why a light saber is still superior to a portal gun. πŸ˜•

So an office clock that counts out in binary via flickering blue LEDs or a screensaver that keeps time by flashing colored boxes is a subtle-yet-pointed invitation to commiserate at geek level. Kind of like a club tie, or a special handshake.

In the absence of the US$25 that will get you an actual, physical binary clock, there are quite a few options for the terminal. One is John Anthony’s binary-clock, which makes good on its name.


It is exactly what it promises: No numbers, just flickering digits counting out hours, minutes and seconds, from top to bottom.

And binary-clock (which installs as binclock, just so you know) gives you no crutches to lean on. Some other binary clocks might make concessions to those who don’t get the old joke about 10 types of people, and show conventional numbering at the same time. With binary-clock you either read the display, or you’re late for your bus.

Two frills worth mention: themes and color sets. Pressing “t” will cycle through character sets for the display — all of which, I would like to mention, are base ASCII sets. So no complaints about oddball output at the framebuffer this time.

Pressing “c” will cycle through color schemes, changing the indicator colors to follow preset styles. You can’t actually adjust the colors (or display characters) directly. Unless you edit the code, of course.

Which is probably a possibility, if binary-clock is something that appeals to you. After all, if you see binary-clock and think, “Heck yeah, I’m putting that on the 300Mhz CTX EzBook 800 running Crux Linux in my office” … well, hand-editing code is probably a no-brainer for you.

Congratulations, and welcome to the geek club. 😈

P.S.: Post 1024. :mrgreen:

tty-clock: Taken for granted, for far too long

I casually mentioned tty-clock the other day while traipsing through ncurses-examples, then thought for a half a second and worried that I had never included it here.

A few panicked searches later and my fears were confirmed: Out of all the thousands (and yes, it has been thousands) of programs I’ve looked over in the past 20 months, I never gave proper attention to tty-clock.

That’s something we shall have to remedy.


I can’t think of a system I’ve built in the past five years that hasn’t included tty-clock. I’ve even patched it myself, a long time ago, before it was possible to feed a date format into the display.

tty-clock is usually what I hold up to other console clocks, and see how the fare. If a text-only clock can pass muster with tty-clock, it’s doing pretty well.

You can poke around with it on your own time, but know that it can handle multiple colors now, as well as bold effects, flashing time separators, seconds display, rebounding through the terminal window, 24-hour and/or UTC time, and refresh rates down to the nanosecond. It has evolved quite nicely.

Whether or not you prefer a text-based lifestyle and whether or not your computer can handle the burden of a fully graphical desktop environment, you really owe it to yourself to at least try tty-clock once. My apologies for omitting it for so, so long. 😳

ncurses-examples: Hidden gems

A few weeks ago when I spun past bs, a rendition of the classic pen-and-paper Battleship game for the console, I learned that bs is occasionally included as part of the keystone ncurses package.

I have yet to see a distro that didn’t have ncurses at least available, and yet if you install ncurses as a library — ncurses in Arch, libncurses5 in Debian — you don’t get bs. In fact, there’s a lot you don’t get. For example, blue, which is short for Blue Moon:


Which is a rather unusual solitaire game, which deviates from the classic vertical arrangement you might know. (There are so many solitaire variants it could take a whole blog to learn and look through them.)

And here’s gdc, the Great Digital Clock:


That’s not an artifact; gdc scrolls its numbers into place, which is a neat effect. I better tell the tty-clock gang about that.

There’s a Towers of Hanoi game.


And a digital puzzle of the Knight’s Tour.


And there’s a fullscreen analog clock called tclock, which would be a worthy addition to the screensaver arsenal if it didn’t occasionally flash from black to blue. πŸ˜•


And a couple of utilities, including view, which works like a pager crossed with a magnifying tool.


You can also find color versions of worms, which you might remember from a few months ago, and rain, which we talked about at the start of spring. If you’re into fireworks, there is a very rudimentary firework program, and even an old, old digital Christmas card. O_o 😐

The majority of what you’ll find in ncurses-examples is really just tools for testing or demonstrating the package. I was able to compile this from scratch in Arch with no problems; I expect it’s even easier with Debian’s prepackaged version.

Probably a number of these titles were worthy of including individually, but nothing here is particularly new, and some of it has dates as far back as the 1990s. So while bs got special attention, you should probably pick around in that package and see what is available. There’s no telling what hidden gems you’ll find. πŸ˜‰

aajm: Conspiracy theories abound

There’s definitely something kooky going on with ls vimwiki/ | shuf -n1, because the next title picked is aajm. Between that, aview and bb — and maybe even asciijump from yesterday — there’s some sort of slant toward aalib-based software here.


Not that I’m complaining, it’s just to see three of those titles surface in the space of weeks suggests a lack of randomness. Then again, how can I be sure it’s really random … ? πŸ˜•

What you see in the gif there was deliberately slowed; I know when I first showed this some years ago, it was a bit of a drag for a Pentium machine. But on this 1.5Ghz Pentium M, releasing the -d flag sent it spinning into an ASCII blur, and making the results unviewable.

So if you try it on anything newer than a K6, you’re probably going to need to adjust the delay. Don’t say I didn’t warn you. πŸ™‚

What I failed to mention last time, is that aside from my usual suggestion for a practical use for aajm, the author has a short list of other ideas — including some very interesting ones, like tying aajm to system load values.

I tried it (look for the -jln flags) and it does make for a very unusual system monitor. My fear though is that on a slower machine, using this as a system monitor might increase the load, which would cause the animation to move faster, which would burden the machine more, which might increase the load, which would cause the animation to move faster, which would … πŸ™„

The only other thing I feel is worth mentioning, is that under X, you need to specify the curses driver, or it will latch on to a separate window with a different driver. Not that it will make a big difference, but it does cause a little inconvenience.

aajm is worth tinkering with, and a valid addition to a kind of screensaver thingy. If you take it in a different direction and use it as a system monitor or something else, it’s done double duty. Conspiracy theories aside, it’s good to have around. πŸ™‚

ansiweather: One-line weather report, with frills

If it seems like most of the titles thus far are in the early part of the alphabet, that is only to be expected. There hasn’t been much of a chance to pull in titles from the latter half, after scraping through everything after about section N onward.

So just by virtue of time and random chance, a lot of what I have is in the A through M portion. I hope that doesn’t disappoint. πŸ˜‰

Here’s ansiweather, which might seem a bit minimalistic at first.


Mmm, color. πŸ˜€ Let’s get a close-up, and give ansiweather a chance to shine.


Whoa! Okay! That’s too close. But I think you can see one of ansiweather’s high points there: the use of specific weather ideographs as embellishments.

ansiweather also allows for forecast data, specific date formats, and of course, specific locations. All condensed into a single-line display.

Pretty cool. Colorful, terse, customizable, lightweight. I can find nothing wrong. Except of course, that those little umbrellas and clouds probably won’t show up in a virtual console. That’s a mighty small complaint though.

At this point, ansiweather is probably either a stroke of genius to you, or something so completely understated as to be rubbish. But consider adding ansiweather to …

  • vtclock, which allows you to pipe in the results of a command. Now you have a weather clock for your desktop;
  • Your .bashrc / .bash_profile, or maybe even somehow part of /etc/issue, which would give every console a weather report at login. This one might take a little effort to produce.
  • ticker or ticker, either of which will scroll that information across your console, vertically or horizontally;
  • figlet, or for real craziness, toilet … say no more;
  • or even just watch, which will allow you to paint it into a corner and update at set intervals. If you use a graphical desktop, try a terminal emulator set to be completely transparent, forced to the root desktop, reshaped to only one or two lines, and updating ansiweather at intervals. It’s like conky, without conky. πŸ˜‰

You might also consider cramming this into a terminal multiplexer, either as a specific panel or “desktop widget,” or through some sort of built-in status bar. Let me know if you figure that one out.

At first ansiweather might seem like a triviality, but like a lot of things with Linux, it’s not the tool that matters. It’s how you use it. πŸ˜‰

vtclock: Yes, one more console clock can’t hurt

It’s funny to think that almost four years ago to the day, I posted a note on the old blog about vtclock. And here we are again.


And not much has changed. It still works, much in the same way as it always has. As far as I can tell, there haven’t been any updates, but it’s not like it had many fatal flaws to start with.

And it still carries some of its coolest features, like the ability to pipe a line from another program into its output. So you can put date in there, or uname, or perhaps a load meter. Get crazy, I dare you.

Color is still a weak point. And I notice now that selecting a particular display character seems to interfere with the actual second-by-second animation. I don’t recall if that was a problem years ago.

Who knows, perhaps in another four years we’ll take a look at it again, and discover it has changed. But I think not. πŸ˜‰

vlock: The simplest screensaver I know

I made a big stink a few weeks ago about some less-than-ideal terminal screensaver utilities, and I suppose, technically speaking, I omitted one.


Hiding down in the bowels of kbd in Arch (but living the high life in its own package in Debian) is vlock, and yeah, I suppose you could call it a screensaver. A very simple one.

vlock seizes (but doesn’t clear, oddly) the terminal you’re using, and demands a password before it will release it. A useful tool if you’re in an office and need to go to the bathroom, I suppose.

Outside of an option to lock all the virtual terminals, vlock doesn’t have a lot of flags to worry about. And by corollary, the man page is really just a man pamphlet.

Of course, as a practical screensaver it’s not much better than termsaver, or terminal-screensaver, and doesn’t fulfill the two problems I set out three weeks ago. Nobody’s perfect.

And given that most terminal multiplexers have their own locking mechanisms, it may be that there’s not much call for vlock. Be that as it may, you have the option available to you. πŸ˜‰

ticker: A different ticker this time

Almost exactly a year ago, I ran past ticker. Today is another ticker, which is related only mildly.

2014-05-26-jk7h5f1-ticker-01 2014-05-26-jk7h5f1-ticker-02

This ticker takes a different tack than the previous, by limiting itself to horizontal placements (at the top or bottom) and to regularly sized text. Compare that to the previous ticker, which ran vertically and expands text in a way similar to what figlet and its ilk does.

(For the record, I tried to reroute figlet through new ticker, but it wasn’t prepared to deal with that arrangement of text data, and all I got were the uppermost lines. If you find a way around that, let me know.)

This new ticker also allows some color control, for both foreground and background effects. It’s also prepared to poll its text source at intervals, which means you can update the information it gets without disrupting or rerunning the program.

I like ticker for the obvious reasons — it’s light, it’s clean and it has color. It’s simple enough that it doesn’t require a lot of work or dependencies to put together, but isn’t so convoluted as to pollute the final output.

So now you have a horizontal ticker, and a vertical one too. Will wonders never cease? πŸ˜›

termsaver and terminal-screensaver: Peas in a pod

I’m going to lump together two programs again, this time because they more or less do the same thing, and because if either one is doing their job, I won’t really be able to show them in action. Also because, given the chance, they might work well together.

Both termsaver and terminal-screensaver work as “screensavers” for your terminal, as you might have guessed by their names. πŸ™„ They each take a slightly different approach to the issue though.

A long time ago, before I rounded up my own esoteric solution to the screensaver for the console, it was clear that two problems were at work simultaneously: First, something has to sit back and watch your terminal activity and hijack it when nothing has been happening. Second, something has to restore it cleanly when you return.

The obvious solution to that is to have some sort of daemon diligently watching your terminal session, and spawning a third program when your timeout is triggered. And of course, end that program and restore your session at the press of a key.

That’s the approach terminal-screensaver takes, and it does an admirable job of doing so. I first ran across terminal-screensaver a couple of years ago, and for the most part, it worked as promised. The author has a YouTube video of terminal-screensaver at work, if you are one of those visual learners. πŸ˜‰

As I see it in my puny little nonprogrammer brain, terminal-screensaver relies on your .bashrc (or .*shrc) to trigger a daemon when you start a terminal. That daemon sits and watches your activity, and kicks in the screensaver of your choice — the default is cmatrix, but there are lots of others that could work — when it senses you’ve gone to the refrigerator.

terminal-screensaver can be a little tricky to configure; you have to get its configuration file, the daemon’s configuration file, the working directory for the daemon, your .bashrc and your $PATH all living together under one roof … which sometimes isn’t easy.

When it’s done right, it does work as promised. When it isn’t done right, you get a lot of strange messages spattered across the screen, nothing ever commandeers your terminal, and even when it does, getting it back can be a trick. So at least you’ll know if you don’t get it right. πŸ˜‰

termsaver, by contrast, expects you to trigger it directly, before you walk to the refrigerator. Here again, is the obligatory video supplied by the developers.

termsaver comes with an array of built-in screensavers, the bulk of which pull text from external sites — the list is in the --help message — and send them to the screen, typewriter-style. There are also the obligatory clock and zipping dot modes, as well as jumping random words.

A small glitch: termsaver didn’t think to set the cursor behavior, and my XP-wannabe terminal style uses a solid block cursor, which is visible as it jumps around the screen. That too is a small note, if anyone sees it.

My biggest challenge with termsaver was the fact that it doesn’t really … work like a screensaver. By that I mean that termsaver doesn’t approach the original two challenges I mentioned.

Without some external program — and I daresay terminal-screensaver would work in this case — to handle the timeout and restore issues, termsaver is just a pack of terminal gimmicks wrapped up in one program.

You can start termsaver as you get up from your desk, and you might even go crazy and set up a one-key trigger to kick it into action when the refrigerator summons you.

But it’s not watching your lack of input, not counting out the idle seconds, and so in my mind, it’s not really solving the problems of a proper, classical, terminal screensaver utility. 😦

After looking at both of these, I still think using screen’s built-in idle function or tmux’s analogue is a better way. tmux and screen can both solve the console screensaver challenge (which I see as a step forward when compared to termsaver), and they both require only a few lines of configuration (which is less than terminal-screensaver needed).

On the other hand, if you’re not interested in using a multiplexer while you work at the command line, perhaps one of these — or both together — will push you a small bit closer to text-only nirvana. πŸ˜‰

rain: An old-school screensaver

The man page is dated 1993, but it also talks about VAX/VMS programs by the same name, so I’m guessing rain is a good deal older than that.


And that’s about all it does, although that hardly does it justice. The animation effect is something you have to see yourself.

rain takes only one flag — -d, for a delay in the animation — and personally I would recommend around 135 for a decent show. The man page says 120, which is probably fine.

And where might you find this marvel of modern technology? In bsd-games, of course.

And what can you do with this marvel of modern technology? Use it for a screensaver, of course. πŸ˜‰