27 12 | 2012

Tiling window managers

Written by Tanguy

Classified in : Homepage, Debian, Command line

Floating and tiling window managers

In the X Window System, the window manager is that piece of software that places your windows and allows you to move them, resize them, hide them, etc. If your windows have titles on top of them, with buttons to close them or reduce them, it is thanks to the window manager. There are two major types of window managers:

Floating window managers
They are the most usual window managers, that allow you to place an size your windows freely on the screen, in a way where they are independent of each other, possibly overlapping, just as you would be able to place sheets of paper on your desk.
Tiling window managers
They are a more elitist type of window manager, that adjust the size and position of the windows so there is no overlapping and no space lost between windows, thus tiling the screen.
Four computer windows managed in floating mode

Floating window management

Four computer windows managed in tiling mode

Tiling window management

The frontier between these two types is not very tight, because some floating window managers have limited tiling features, and almost all the tiling window manager have floating modes for programs that are not adapted to tiling.

For what it is worth, here is a report on my experience with three tiling window managers. Perhaps it may help people that are still hesitating to switch to tiling window management?

Using tiling window managers

Five years ago I switched to tiling window management, feeling that “managing windows was the window manager's job” (a quote from larswm). At that time, I started using wmii, then switched to awesome, and now I am trying i3.

Screenshot of the wmii window manager

wmii: three columns, first one stacked

Screenshot of the awesome window manager

awesome: fair layout

screenshot of the i3 window manager

i3: three containers, second one stacked, third one tabbed

For people in a hurry, here is a comparative table:

wmii awesome i3
Configuration Shell script Lua script config file
Scriptability any language, 9P-based Lua, API-based any language, socket-based
Layout simple, column-based automatic layout-based flexible, manual tiling-based
Multi-monitor sucks OK OK
Modern stuff XCB, Xft, notification area, dock windows XCB, Xft, notification area
Special features
  • tag-based workspace system
  • XDG convention to locate the config file
  • real framework for customization
  • powerful status bar

wmii

wmii is a rather minimalist window manager which used to be part of the suckless project, but is now hosted at Google Code and seems to have lost all its documentation during the move (why is it that all the software I have seen hosted at Google Code or worst, at Launchpad, have almost not documentation, and never, ever a single screenshot?).

It uses a column-based layout: you place windows in a number of columns, and for each column you can choose either vertical split, stacking or full column mode. This system is very simple to control flexible enough for most situations, but it does not allow for arbitrary tiling.

It is fully scriptable in any language, in an interesting way: it exposes all its functions on a 9P virtual filesystem. In fact, wmii itself only implements window management functions, and all the user interaction logic takes place in a distinct script which calls that functions using that 9P filesystem. wmii comes with a default script, written in shell, which makes it a bit hard to extend, and slow if you start calling external programs such as grep, sed and co. You can script it in any language you like however, and there are some already made implementations in Ruby and Python IIRC.

A special feature of wmii is that its workspaces are in fact tags, and that you can tag a window so that it will appear in several ones. While this is interesting, in practice I did not find much use for that feature.

It is explicitly minimalist, and the developers used to impose themselves a limit on its numbers of lines of codes (not sure if this is still true with the switch to Google Code). While I was using it, it had no notification area, no support for Xft fonts and it sucked with multiple monitors, which is the reason I switched to awesome.

awesome

awesome is a very flexible window manager that provides advanced automatic layouts. It has become quite popular, and it has a very well documented wiki. It is not officially a tiling window manager but a framework window manager, and to emphasize on that it start in floating mode by default. I think most people use it in tiling mode however.

It uses automatic layouts, that place your windows according to rules, for instance the “fair” layout, which tiles in columns and rows so that each window occupies a similar space. Thanks to that automation, this system is very easy to control and to get used to, and although it certainly does not allow arbitrary tiling, you can cycle between several available layouts which are suitable for most situations (most of them are entirely automatic, but some have parameters you can modify, such as the number and width of columns), and if you miss one, I think you can even code your own.

It is fully scriptable using the Lua language. In fact, just as wmii, the user interaction logic is defined in the “configuration” file, which allows efficient customization. The Lua API is fully documented, and there is a series of useful libraries to extend the basic configuration in any way you like, which is why awesome calls itself a “framework window manager”.

It is not designed to be minimalist, and it implements some modern stuff, such as using XCB rather than Xlib, a notification area, and specific support for dock or utility-type windows such as GIMP's tools.

i3

i3 is a window manager inspired by wmii, although they do not have much in common in my opinion. for what I have seen, I think it would be closer the defunct Ion.

It uses a layout based on manual splitting: as you open windows you can choose to split an existing window either vertically or horizontally, leading to arbitrarily complex layouts. In addition to that you can tab or stack windows in containers instead of splitting them. This system is very flexible but it requires more user intervention.

In its standard mode of operation, i3 is simply configured in a regular way, which allows to customize the user interaction but not to script it in an arbitrary way. It offers an IPC system that can be used for that however, by the mean of a Unix socket, so it can actually be scripted in any language too if needed, although this possibility is probably not as popular and easy as with wmii and awesome.

It implements modern features such as XCB, a notification area and a powerful status bar that uses the standard output of a dedicated program that is easy to replace by your own if you need.

15 comments

friday 28 december 2012 à 18:43 kalos said : #1

Nice article!
A useful feature would be to save sessions or "workspace/tag/frame."

Have you ever tried to do it with i3wm?

Something similar to http://awesome.naquadah.org/wiki/Shifty

friday 28 december 2012 à 19:26 Tanguy said : #2

@kalos : I am not sure of what you mean. To me, saving a session would mean to launch the appropriate programs at statup and put them to the right workspace, which can be done very easily with either one of these window managers.

About Shifty, for what I understand this is a tool that implements dynamic tagging with awesome, in a way similar to wmii's regular behaviour. This is close to i3's regular behaviour, so there is no need for anything specific to do that with i3.

friday 28 december 2012 à 19:42 rodrigo said : #3

I used to be an user of awesome wm, but in the end the fact of so many things being implemented atop its configuration file was too frustrating. Not sure if things keep being like that, but merging changes between updates was not a very nice experience. I very much prefer the approach of other wms as stumpwm (common lisp), which I currently use, which enable great scriptability but doesn't expose the guts of the wm so openly; there is a clear distinction for the reader what code is user provided and what is wm code; but there is no such difference when running the software. I recommend stumpwm for any avid emacs user.

friday 28 december 2012 à 22:02 kalos said : #4

sorry
session = workspace with specific layout per app

for example, when I create workspace X, launch 3 urxvt stacked at left and firefox at right.

friday 28 december 2012 à 22:46 Tanguy said : #5

@kalos : I see. Well, that kind of automation is certainly easier to implement with awesome. With wmii, I do not know. With i3 it could be done with a dedicated script but I do not think that would be very easy.

friday 28 december 2012 à 22:48 Tanguy said : #6

Update: I have just published screencasts rather than screenshots, you can access them by clicking on the WM-specific thumbnails. I would have loved to use WebM, but unfortunately that castrated container does not support subtitles so I had to use full Matroska.

saturday 29 december 2012 à 00:55 MJ Ray said : #7

"why is it that all the software I have seen hosted at Google Code or worst, at Launchpad, have almost not documentation, and never, ever a single screenshot?"

Is it because wherever they were hosted before was something with no easy way to export anything but code (github?) or that those two sites don't support documentation well?

saturday 29 december 2012 à 01:08 Tanguy said : #8

@MJ Ray : I do not think GitHub is a good example, on the contrary, most project on GitHub have at least a good README. My hypothesis would be that these two hosting sites (Google code and Launchpad) do not support documentation very well indeed, or at least do not give much incentives to write it.

saturday 29 december 2012 à 14:55 Andrew Shadura said : #9

Actually, recent wmii supports notification area, proper fonts, and has better multi-monitor support (it's still far from perfect).

saturday 29 december 2012 à 18:14 Tanguy said : #10

@Andrew Shadura : Excellent, that is good to know. My guess would be that this shift would somehow be related to the fact it is no longer part of the suckless project. Too bad it no longer has easily accessible documentation, although there is a wmii-doc Debian package I should have a look to.

sunday 30 december 2012 à 20:20 rieper said : #11

For a comparison have a look at xmonad, too. Coming from KDE it was quite a learning curve, but i dont regret it so far. Multimonitor is very convenient and some modern stuff is available, too. Configuration is done in Haskell and there are a lot of extension modules available.

sunday 27 january 2013 à 18:22 Steve said : #12

The thing I was looking for was the ability to have individual desktops per monitor, rather than the typical same desktop across all monitors, approach.
In the end I use Awesome on top of KDE which works very well.
I can drag windows between screens but cannot stretch a full screen window across screen boundaries.
Multi monitor support with independent desktops is now a must the same way adding a second monitor became a must, it increases productivity to a new level.

sunday 27 january 2013 à 18:36 Steve said : #13

For me flexibility is a key component. I'm not a purist, I need something that makes it easy to do whatever I'm doing. Awesome has a great approach in how it can integrate with another window manager. Of course certain minor KDE things does not work, but that's to be expected on an integration of this kind. For example, when you login it does not maintain the pager settings, nor restore apps to last position.
I use Awesome's taskbar at the top, similar to MAC, with the KDE taskbar at the bottom, giving me best of both worlds. Tiling has certain advantages but I have found it preferable to have floating windows.
What I find amazing is that Awesome is really the only one who have independent desktops for each screen. At least what I've been able to find. I would have expected the big distro's to jump all over it as it gives such an increase in flexibility, and per my limited understanding on the subject, only requires XRandR, which has been available for quite some time.

thursday 06 june 2013 à 23:35 sussoger said : #14

Just switched from wmii to i3. One thing I miss is multiple tagging a window: sometimes I like vlc to float on all "desktops". So it appears there's no such thing in i3 ☹ (Mind you, I was using Xft in wmii for more than a year.)

friday 14 february 2014 à 18:15 Wojtek said : #15

this one has no match:)
http://notion.sourceforge.net/

Write a comment

What is the last letter of the word zeuu? : 

Archives