xmonad - Tile Window Manager

system running xmonad.

xmonad is one of the tiling window manager available for screen space conscious people. Moving mouse on a large screen or multi head setup is pretty time consuming and tiling window managers offer you a choice between keyboard or mouse. Here is the guide on how to install xmonad and how to use it. We will also get to know little bit about other tiling window managers too.

Installing xmonad

Latest version of xmonad is available right out of Ubuntu universe repository. Execute following command to install xmonad and other little application launching utility called dmenu.

sudo apt-get -y install xmonad dwm-tools

Restart your current session or logout of current session and re-login with xmonad selected. You will see an empty desktop & stop banging that keyboard thinking something went wrong. Read remaining post before continuing.


Most of the tiling window managers have concepts like Master Pane, Tile Pane, Layout, Workspace, Frames.


Frame contains nothing but an individual window or dialog. And these frames can be floated.


xmonad has 9 workspaces and you can see only one at a time. And each workspace is numbered from 1-9. Workspace contain frames and you can freely move frames from one workspace to another.


Layout dictates how frames are arranged with in a workspace. xmonad comes up with bunch of layouts and they are enough for most of the people. If you are not satisfied with existing layout you can write your own layout.

Master pane

Master pane is typically a large area where we move our windows(frames) to work on them.

Tile pane

We typically use this area to keep all other windows(frames) which don't need our attention.

Keyboard shortcuts

Most of the keyboard shortcuts start with Mod key and following are mod key codes.

  • Mod1 - Alt
  • Mod4 - Super(Key with MS logo)
  • Button1 - Left Mouse Button
  • Button2 - Middle Mouse Button
  • Button3 - Right Mouse Button

Remember that default Mod key for xmonad is Left Alt.

When you initially login with xmonad you will be greeted with an empty desktop. Press Mod+Shift+Enter to start a new bash session. If you again press the key then will see two terminal windows with equal space alloted to them. Now press the key again and observe that Left side has one terminal and Right side has two terminals. So in default layout left side area is Master pane and right side area is tile pane.

To close a frame or to kill an application window press the key Mod+Shift+C.

You can experiment with different layouts by pressing the key Mod+Space. This key will cycle through the all available layouts. If you are struck any time just press Mod+Shift+Space and you are back in initial layout.

You can navigate among frames using Mod+J and Mod+K and you will see Red border around active frame. You can swap this active frame with the frame in Master pane by pressing Mod+Enter.

You can shrink and grow master area using Mod+h and Mod+l.

You can move active frame to another workspace by using the key Mod+Shift+[workspace number]. And you can shift to that work space by using the key Mod+[workspace number].

If you want to launch some application like firefox you can use dmenu to launch it. Since we already installed it we can use Mod+p to invoke it from xmonad. You will see little thin bar on top side of the display. Now type what ever you want to launch and press Return.

These key combos are enough to get started. For more keyboard shortcuts you can refer to man page of xmonad.


You have to write configuration in Haskell language and this is a huge turnoff for most people. But if you already know Haskell you can type your config in ~/.xmonad/xmonad.hs file.

What about other window managers ?


Ion3 is available out of Ubuntu universe repository and offers tabbing within a frame. So we can have multiple applications running inside the frame. The reason for not choosing this window manager is because of uncertainty over this package future. Please visit wikipedia page on ion for more info.


Awesome is a very eye friendly window manager. And you can write config in Lua language which is much simpler than Haskell. The only problem with awesome is lack of documentation for old packages & its fast pace developement. Configuration directives change from one version to another and its better to stay away and watch until everything gets stabilized. And really awesome looks awesome.

dwm (dynamic window manager)

You have to write config in source (c language). Recompile the whole thing and install it.


All the above window managers look pretty good. And there is no reason to stick to one window manager. Just choose what ever you like. I personally prefer both awesome and xmonad. And trust me its well worth using one of these for distraction free screen environment.


Anonymous said…
Note there's also a "plain config" for xmonad, where your xmonad.hs configures itself via a text file. You can essentially configure in any language you like, as long as you can write a parser for you configuration language, that'll load the data into your xmonad.hs

One intriguing option would be to use the Haskell Lua bindings to configure in Lua, whose data would then be sucked into the Haskell code.
Anonymous said…
Hi -- this is a great tip! Please consider posting any other tips you write to www.ubuntukungfu.org. This aims to be one of the biggest community sites dedicated to Ubuntu/Linux tips. It's just like Digg and posting a new entry takes seconds. Cheers!
Anonymous said…
thanks this was helpful
Anonymous said…
thanks this was helpful
Anonymous said…
Keep on posting such themes. I like to read blogs like this. BTW add more pics :)
Anonymous said…
My friend and I were recently talking about how modern society has evolved to become so integrated with technology. Reading this post makes me think back to that debate we had, and just how inseparable from electronics we have all become.

I don't mean this in a bad way, of course! Societal concerns aside... I just hope that as memory gets less expensive, the possibility of transferring our brains onto a digital medium becomes a true reality. It's a fantasy that I daydream about every once in a while.

(Posted on Nintendo DS running [url=http://cryst4lxbands.blog.com/2010/01/31/will-the-r4-or-r4i-work/]R4i SDHC[/url] DS Fling)
Unknown said…
I tried awesome and dwm, now I use wmii. What have you against that one? Why should I try xmonad instead?

Yves Junqueira said…
Thanks for this. It's the best introduction to xmonad that I found out there.

Popular posts from this blog

Easy network traffic shaping on your ubuntu system

winetricks - install wine application perquisites with ease

Multi touch for any,all synaptics touchpad