software October 18, 2012 Jack 6 comments

On Qtile

Anyone that knows my open source predilection also knows that I have a lot of obscure and elitist taste in software. The only thing that could make me more tech hipster is if my kernel/OS of choice was a BSD instead of mainstream Linux.

Case in point, my primary environment is a tiling WM written in Haskell, Xmonad. However, lately, I’ve been wishing for a bit more ease of use and a bit more flexibility in my whole base setup. With FOSS, whenever I have an itch, I try to scratch it one way or another.

Lately I’ve tried popular tiling WMs, like awesome and dwm. A couple of serious in-development ones as well, like subtle, i3, and musca. I still have a few to try, like spectrwm. However, for the past few days I’ve been really enjoying one called Qtile.

It’s written in Python, which is a major plus for me because it’s my dynamic language of choice. In the 21st century, window management isn’t even close to “intensive” and as such I think trading speed (from C) for flexibility (from Python) is clearly the way to go.

The configuration for Qtile is done in it’s native language. Xmonad is configured in its native language too, it just happens to be Haskell and my days of pure functional programming are long gone so I appreciate the ability to mess with code, configuration and plugins without having to re-learn a set of enigmatic operators. Tangentially, I also experimented with native config in the last major version of my own software (Canto) and it’s an extremely powerful configuration strategy. In part because the interpreter for your dynamic language is very powerful and (hopefully) well-designed and also because obviously the structures created in the configuration are simple to then manipulate in the code itself. In the end I started to migrate away from it because it’s hard to programmatically alter a configuration whether to convert to another version, or to save configuration done via a software interface. Qtile, and other tiling window managers, generally have no need to do either of these things if their initial interface is complete enough so I’m glad to see that I can execute arbitrary Python in the config and look forward to being able to construct my own layout capabilities.

Another advantage of Qtile is that it takes a more circumspect view of window management. Each piece of software doing one thing and doing it well is a great facet of the Unix philosophy but the lines drawn between functionality are arbitrary. Xmonad, for example, does literally nothing except manage windows (as you would expect). It does it very well, but it only has a bit of functionality to play nice with the other tools that most modern users would consider necessary (it’s capable of reserving space for bars / trays and it has capability to output text based on internal status). Qtile includes window management, but it also includes a configurable bar with status output, focused window titles, a clock and a tray. With Xmonad, achieving a similar setup to this requires setting up a loghook (interfacing with Haskell), and using two or three different programs in tandem (i.e. stalonetray for the tray, dzen2 for the bar, and that’s not counting any other status info like battery, memory, or cpu – all of which come with Qtile out of the box – which would inevitably require an app like conky to do in one place). Subtle, and to some extent i3 take this approach as well, but Qtile’s implementation is nicer, in my opinion. In effect you get more than the bare minimum of functionality which means you have less effort to integrate secondary components for the basic. Also, the Qtile widgets actually include a lot of the same default options which are passed through Python kwargs to each widget so it’s easy to keep your widgets’ behavior consistent and tweaked to your liking.

One really cool thing about Qtile is qsh, which provides a shell+filesystem like interface to your WM. It allows you to query what windows are on what screens, information about your configured bar, switch layouts, close windows etc. This sort of thing is very handy if you ever want to interact or squeeze some functionality out of your WM with a simple script instead of Python.

At this stage I have no criticisms of Qtile, which is saying something. I will however state that I haven’t been using it long and I’m still trying to learn the default keybinds (instead of porting my Xmonad configuration keys over — for the most part). One aspect I’m curious about is the multiple monitor support, but from the documentation it seems like even that usually neglected area, has good support even for things such as separate bars. We’ll see. My dual monitor usecase has faded in recent times.

All in all, it’s definitely worth a try. Especially if you’re looking a tiling WM that doesn’t force you to find other programs to get basic information.

6 thoughts on “On Qtile

  1. A happy user of Xmonad for several years, I just today came across Qtile. I appreciate your thoughtful review on this page, and your overall approach, and I wonder whether you are still using Qtile. Any followup comments?

    1. I am not still using Qtile, I’ve been through probably three or four WMs since I wrote this post, but it’s probably time to give it another shot considering they’ve put out a couple of releases in the meantime.

  2. I just stumbled across this thread and had a quick question about the functionality of the widgets in Qtile. One of the features I’m looking for is to display system info overlaid on the desktop (much like conky does), but I haven’t found any good examples of this for Qtile. Does Qtile limit you to displaying system information in the bar only? Or can you configure it to display the information as an overlay on your destkop? i.e. not within a window that takes up screen space.

  3. I’m in an exactly similar situation. Obscure and elistist tastes. Xmonad. Just checked out Qtile.
    Qtile seems to be quite nice to me. The bottombar is certainly pretty, I’m thinking of tweaking taffybar (in Xmonad) to look more like that.
    Anyhow, I find the debugging interface extremely bad with Qtile. Xmonad shows the errors very helpfully and nicely. Instead, Qtile just resorts to the default config without logging the errors.

Leave a Reply

Your email address will not be published. Required fields are marked *