dark theme

Gravatar integration in Terminology

A long time ago, I received an email from a friend on my phone through the K9 application. I didn't have her in my contacts (yet) but it did show me her picture next to the email. I wonder what was the black magic behind that!

It was just K9 using gravatar to try to fetch a picture related to her email address. Since that event, I want to display gravatars as tooltip over email addresses in Terminology. It can be nice in your email client if you use a console-based one or to see an avatar after git-blaming someone :)

I finally wrote the code to do that for the EFL dev day 2014.

How does it work?

It's simple! Take an email, let's say MyEmailAddress@example.com.

  1. Trim the leading and trailing spaces.
  2. Lower-case the address. myemailaddress@example.com in our example.
  3. Take the md5 hash of that string: 0bc83cb571cd1c50ba6f3e8a78ef1346 in that case.
  4. Fetch http://www.gravatar.com/avatar/ + the md5sum.

How does it look?

A small capture of live action:

gravatar tooltip in terminology

Of course it is possible to disable that feature in the Behavior panel in the Settings.

If you have any cool ideas you want to see in Terminology, tell me about them!

blog comments powered by Disqus

If you enjoyed this article, feel free to Flattr this.