Georg Krause

coding - music - building stuff

Calendar and Contacts in the terminal


I am a person living mostly in the terminal, as long as its effortless possible. Of course I also want my calendars and contacts available there. I have a setup for years already, but since I got a new player to the game, I think it's a good idea to write down how it works.

All my calendars and contacts are stored in a Nextcloud. Actually the address book is shared in my closer family, while each one of us has their own calendar, which is also shared for transparency and collaborative editing.

On our Android phones we use the amazing DAVx5 to synchronize all those information into the default calendar and address book app of Android. That's the easy part!

Now I want to be able to edit appointments or get a mail address from my contact book on my notebook as well and at the beginning I would just open Nextclouds web interface. This worked alright, but I do not enjoy having to use the mouse. I want my tools to be usable with the keyboard. Some years ago I found the two projects khal, which is a text-based user interface for calendars and khard, which is TUI for contacts.

In order to make both work, the data needs to be locally available. Both are just frontends to files stored on the hard drive, to display your week schedule or edit a contact. Changes are written back to files again. So the missing block here is a synchronization tool, which luckily is also provided by the developers of khal and is called vdirsyncer.

I have this setup running now for several years already and it works pretty good. The only bigger paint point is creating new events using khal in my multi-calendar setup, which is a little bit tedious. Also over time khal got quite slow starting up, so I was curious if there are alternatives out there, and of course there are. My first search yielded the following projects:

  • calcure: https://github.com/anufrievroman/calcure
  • calcurse: https://calcurse.org (source: https://github.com/lfos/calcurse)

Sadly I think those are not really compatible with the vdir setup I have in order to use khal. But those tools are critical to organize my life, so I did not want to break my old setup. I wanted to have khal and the new application both being available editing the same data, so I can test the new application, maybe report or fix some bugs and switch back to the working setup whenever needed.

Furthermore, I have some automations build on top of khal that I did not want to lose or rework all at once.

After some more looking around, I found yoro. And this is amazing. Its superfast, it has color and picture support and it's a drop-in-replacement for khal.

So I built a nix package, installed it, started using it and after a few days I don't think I ever had to open khal. Its still around as a fallback and for my automation scripting for now.

But it got even better: From my phone and Nextclouds web interface I am used to view the calendar in the week view. It allows me to see each day in detail but in the context of the whole week. Yoro was providing an agenda and month view. So I created an issue, asking for the feature or if the developer would accept a contribution and one day later a new version was released providing a week view. Yey!

While I was writing this down and looking for the homepages of the projects, I figured there is a successor of vdirsyncer, called pimsync. I do not have any issues with vdirsyncer, but since a successor to it is available I might at least give it a try at some point.