Category: organization

Pi day: Pi on the keyboard

On my computers I am using Windows, Linux, and sometimes MacOS. Regarding the keyboard layout, I prefer the US English layout – it is just so much better for programming, anything you do on the shell, or whatever. On my Windows Desktop, I have designed my own keyboard layout (using Microsoft Keyboard Layout Creator) that is based on the standard US English configuration: it adds the German special characters (ä, ö, ü, ß), as well as many mathematical and scientific symbols, including Greek letters, which are used very often in science.

Recently, I have bought a new used laptop, ordered a US English replacement keyboard on ebay. The machine is running Linux. So far, so good. However, I did not want to have to go over the hassle of assigning my own special functions to the keyboard keys again (even though there are tools such as Keyboard Layout Editor available). I have not found any program that can automatically convert a Windows keyboard layout into its Linux counterpart. That is why – with some creative help from these regular expressions – I have made my own python script to convert from Windows to Linux. It turns out, that the most annoying part is the conversion of the key identifiers – these have very different names in the two operating systems.

However, eventually I figured it out, merged the generated file with my /usr/share/X11/xkb/symbols/us file, and now I am enjoying the easy access to π (via AltGr-p) and also Π (via Shift-AltGr-p) on my keyboard. Happy Pi day! Ok, The article is a day late. Happy belated Pi day! Or how about this (in German): Fröhlichen Π Tag!

I admit, I might spend too much time on these things, but it just makes me happy when it all works out automatically – or at least semi-automatically. I dislike repetitive tasks.

xkcd - Automation
xkcd – Automation

If you want to check out the script, or my keyboard layout, you can download it from github: Keyboard Layout Converter (GPL v3).

Migrating Gmail

I wanted to migrate all my emails from one gmail account to another. Unfortunately, Google does not seem to offer an easy automated method. When I tried importing the mails from the other account via POP, my label system was not reproduced (I am an avid labeler). People suggest to use IMAP (where labels are represented as IMAP folders). You can use an email client (such as Mozilla Thunderbird) to download all emails form one account. And then copy all the emails to the other account. While downloading worked well for me, uploading of the emails to the other account always ended up in connection errors.

Eventually I found a tool called larch, which automates the process. It is a ruby program (which can be very easily installed on Windows, Linux, or MacOS) and it deals with all the problems of the IMAP migration for you. I can’t say that it is fast, but at least it seems robust. Simple command line interface. Highly recommended.