| Tags: dev, macos, screensaver

I created a macOS screensaver that displays and animates the output from command line programs on the screen. You can find it on its GitHub project. The rest of this post provides some background infos about why and how I developed it.

Many years ago — then on a Windows desktop computer — I always used some kind of screensaver. With CRT monitors that didn’t have any kind of power save mode, using screensavers was more or less mandatory.

Then I started using laptops and notebooks and external LCDs. I either just closed the notebook or initiated a locked screen mode. In both cases the monitor switched off and then switched on again when I returned. Then someday I read somewhere that those monitors age every time they are switched off and on again. So, maybe switching them off every time I took a break from working wasn’t a good idea.

I browsed through the screensavers shipped with macOS and chose one that painted nice patterns on the screen. That looked nice but after some time I realised that the fans on my notebook where spinning more while running the screensaver than while I was actually doing work on it. That didn’t feel right. I changed to a screensaver that displays word definitions from the dictionary. That was informative and the fans stayed mostly silent.

After some time that started to become boring and I though “Wouldn’t it be fun to have a screensaver displaying quotes and other funny texts like the old fortune program?”. A search for such a screensaver didn’t result in anything useful. There are some mentions of some Linux screensavers that do this and maybe there is a port for macOS somewhere but I actually didn’t follow that path.

I found that although fortune isn’t shipped with macOS, it can easily be installed via HomeBrew.

In August 2018 I started developing a screensaver I just called “Fortune” as it was meant to call fortune and display its output. I haven’t developed any macOS applications before and screensavers are a speciality that is somewhat sparsely documented. And there are also some additional pitfalls when developing a screensaver in Swift. But looking at open source screensavers helped. And after some days I actually had a working screensaver with one animation.

As time went by I added more animations and more color sets.

I was happy with how it looked then, but I thought that other people might like it and maybe I should make it open source. This is when questions started to come up. What if someone has somehow changed their HomeBrew configuration and fortune wasn’t installed in the default location? The screensaver would need to allow the configuration of the location of that program. But when I add that, why not allow to configure any command line program or script that generates textual output? There is an offensive variant of fortune, but I probably don’t want that to run while I’m at the office. I need some location awareness here. Fortunately I can distinguish where I am just by looking at the name of the WiFi I’m currently on. At this point selection based on weekdays and on the current time was an obvious addition.

Now the name didn’t fit anymore. Although I still use it to run fortune, there is more to this screensaver than that. Naming has always been a challenge for me. Sometimes just taking a sentence that describes the function and then arranging parts of the words to a name worked quite well — as in the case of Osmorc —, but sometimes it didn’t. And it didn’t work here.

I came up with the name “Epigron”. It’s something with “epigraph” or “epigram” but changed to make it a unique name. It didn’t take me long to make fun of that name myself. Just pronounce it a bit differently and instead of “epi gron” you get “epic ron”. What epic Ron is that? Ron Weasley or what? After some more thinking I settled on “Epigraver”. There is still something from “epigraph” and there is “graver” and as a graver engraves some text on some surface, the screensaver puts text on the screen — though not as permanently as a graver. And the other way to read it — epic raver — is also nice. In some way the screensaver raves all those textual outputs.