xmonad - Tile Window Manager
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.
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 is typically a large area where we move our windows(frames) to work on them.
We typically use this area to keep all other windows(frames) which don't need our attention.
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.