Highlighting the active tab in GNOME terminal

On Ubuntu, I like using the default GNOME terminal for all my command-line needs, and I'm a big fan of its tabs. One of the problems with tabs, however, is that it's not always easy to tell which tab you're currently in - which tab is the active one. By default, the terminal application makes a very slight visual distinction between the active and inactive tabs, and it would be really nice if it was more prominent.

Luckily, it isn't difficult to configure GNOME to do this:

Terminal Screenshot

For Ubuntu 14.04, create a file named ~/.config/gtk-3.0/gtk.css, and place the following into it:

TerminalWindow .notebook tab:active {
    background-color: #b0c0f0;

The color itself can be customized, of course. This technique supposedly works on all the latest Ubuntu versions starting with 12.10; it doesn't work on 12.04, though. What did work on 12.04 for me is the technique described in this forum post.

Blogging setup with Pelican

When I launched the new look of the website earlier this week, a lot of people asked me over email what kind of setup I'm using - blogging engine, hosting and so on. Here's a short writeup.

A lot has changed for this website. First of all, I switched my hosting provider from a shared Bluehost account (which I've had for the past 9 years or so) to a VPS on Digital Ocean.

Second, the blogging platform was changed from Wordpress to Pelican. Pelican is a really nice and fast static-site generator with a fairly clean Python codebase. It's easy to use and configure, and the documentation is great; so overall I'd say I'm pretty happy with it. The theme is my hacked up version of one of the existing bootstrap3-based themes. One of the benefits of this is that the site is now much more usable on mobile.

As for moving the existing content from the old Wordpress site, there are two options. For smaller sites you may consider the auto-import capability Pelican has for Wordpress imports. I didn't end up using it because I needed to preserve the exact permalinks of my old website (there are a lot of incoming links to it out there, and it would be a shame to break them all), as well as some other reasons. I just wrote a quick script that did my own importing from a Wordpress XML dump.

Pelican lets older (back-ported) HTML content peacefully coexist with new, ReST-authored content, which is very useful. For preserving the old permalinks, it has the handy save_as and url attributes. Pelican also comes with built-in integration to Google Analytics and Disqus, both of which took about 5 minutes to configure.

All in all, I'm very happy with the transition. Static pages just make more sense for a blog (even a fairly large one with over 1000 articles); the site now feels incredibly fast to me. This is hardly surprising, given that it moved from querying a DB and processing a bunch of PHP on a fairly congested machine to just running a bare web server accessing the filesystem on a reasonably fast, dedicated machine.

Goodbye Wordpress - a new blog

I've been unhappy with Wordpress for quite some time. Finally, it's time to move on.

You'll notice that the site looks different now. Hopefully you'll also notice that it loads much faster, is more reliable and looks better on mobile.

Please let me know if anything looks wrong or broken.