Thursday, 3 July 2014

Switching to the i3 Window Manager

I've been thinking about switching to tiling window managers ever since I discovered the awesome tiling features of Emacs. But there were a lot of things that kept me bound to a desktop environment like Gnome. The network manager was the biggest thing. Since I use a mobile internet connection more often than WiFi I regularly had to use the network manager app in Ubuntu to configure and edit these connections (They're a bit temperamental). But after a while my curiosity got the best of me and I finally decided to give it a go.

My initial choice was the awesome window manager. I picked it because it seemed popular and a lot of people on Linux forums were recommending it. Despite all the praise people seemed to have for it, I didn't quite like it. I'd spend ages trying to get all the windows in exactly the order and tiling configuration I wanted and even then it was a bit tricky to navigate. There was also the fact that I needed to learn the Lua programming language to configure it. 

Then I came across the i3 window manager. I went to YouTube and watched a couple of videos of people trying it out and was reasonably impressed with the degree of flexibility it offered. I liked the tree based structure they used to implement their containers and loved the way I could open new tiled windows in any orientation I wanted by using a simple keyboard shortcut. I found that I preferred it to the weird interface that awesome provided.

So now that I was stuck with i3, I needed to tackle the huge challenge of getting all the monitoring programs working inside it. I use a laptop that is quite prone to overheating. So I needed a temperature monitoring program to update the CPU's current temperature to a bar that's visible across all workspaces. I needed to know the current temperature of the system with a quick glance. I also needed the network manager applet and a Guake terminal running. Also, the default font that i3 uses looks really ugly. So I needed to figure out how to change that as well. i3 doesn't require you to know some weird obscure programming language like Lua to configure it. It used simple text files for configuration! 

Once I had the basic stuff configured I needed to tackle the biggest annoyance with simple window managers - no simple interface for suspend, lock, shutdown and logout. Ok logout is simple. I just need to press Mod4+Shift+e to exit the window manager but suspending the laptop and locking its screen were a bit tricky.

After hours of googling I found a really neat script online which handled everything. It even had a neat pyGtk GUI. I downloaded the script, modified a little bit to suit my needs and bound it to Mod4+Esc. And there's this really neat program called xautolock which puts the computer to sleep when I don't use it for a while. 

I've uploaded all my config files to my github account here:

So finally here's how my laptop looks now:

It was a bit of a pain to fiddle around with config files for hours to get all the basic functionality up and running but I quite like the freedom it gives me to make my desktop look however I want it to look! :D

Post a Comment