I present to you today this very useful article introducing xmonad, an alternative window manager, the article is bt Fabio Viola and can be found along with many other interesting articles on the page of SaLUG Journal(In Italian), the article is released under the GNU Free Documentation License, translation from Italian by me.
Last week in Bologna I had the pleasure of knowing a geek from Padua, a smart boy with whom I had a chat.
He Introduced to me an interesting project, it is xmonad . On the official website [0] there is a phrase that strikes you and takes you to devour each page of the documentation or makes you close in a flash, the browser tab : “In a normal WM, you spend half your time aligning and searching for windows.” If you recognize yourself in this sentence xmonad is for you.
What is it?
It’s an intelligent window manager written in Haskell whose ‘main’ peculiarities is to automatically position windows without overlapping. Xmonad has several advantages (which i found on the homepage of the project): tiling windows, minimalism, stable (and having tried hard, I can confirm), extensibility, many features (for example, supports xinerama), simple, supported .. .
Get familiar with the environment
Search through your package manager, find and install xmonad to jump-start a tour in this interesting wm! Just started, xmonad will not show you nothing but a black screen … it’s not a crash, it’s normal … You can start a terminal with modshift return (on xmonad mod is usually the alt key, but that can be changed by configuration files). Iterate a bit and see how it places the new terminal …
By default xmonad divides the screen into two “panes”, a master (left) and a secondary (right). If we have only two windows, they each occupy a piece of pane. As soon as we create new ones, they will occupy the secondary pane, sharing it with the other windows already present. In the master pane it will remain always a single window unless you use mod+, or mod- that increase or decrease the number of windows in that area. This is one of the proposed layout, but there are others of which we could cycle every time we want with modspace. There are other positioning algorithms of the windows that can be created and/or used by the configuration file (but we’ll not dwell on this).
Move and resize windows, is also possible on this window manager so special. We can switch a window with the one of the master pane with modreturn or switch it with the one on the top/bottom with modshiftj/modshiftk.
About resize the windows we can enlarge/shrink with the shortcut modh (h as higher) and modl (as lower).
Xmonad allows you to use more desktop.
By default we have 9. mod [1 .. 9] is a shortcut to access the desired desktop. Numerous shortcuts are summarized in a convenient Cheatsheet [1]. After seeing the basic shortcut to move within xmonad we are ready to discover something more.
Configure xmonad
xmonad is configured through the file ~/.xmonad/xmonad.hs. If it is not available it will use the default settings. Any change made to that file (when xmonad wm is started) can be loaded on the current wm via the shortcut modq. It’s not very frequent encounter Haskell, so if like me you’ve never used it you should take a look at [2] before you start hacking. Syntax rules are simple. You can identify errors in the configuration file with:
$ xmonad –recompile |
We can write a configuration file for xmonad entering only the lines that we intend to change from the original setup, such as:
import XMonad main = xmonad defaultConfig { terminal = "urxvt" } |
that we use for our set up urxvt as terminal. But how do we know all the parameters by which we can play?
One way is to try the online template [3].
We may search for items of interest there, or directly use that template as a configuration file and therefore always have at hand all the options.
Floating windows
Xmonad supports floating windows. In fact, some windows can be positioned above the other on a level on their own. modbutton1 allows you to make a window floating and drag it around, at the contrary modt reinstates a window into the classic layout used by xmonad. A case in which for instance is useful a floating window is mplayer …
Conclusion
For those who are addicted to a keyboard and would like to put on the grill mouse and similmouse, this window manager is the best choice. I have always considered fluxbox the best and have always been madly in love with that environment so “skinny”, but xmonad seems even better for me … Time will tell if it’s true love 🙂
In conclusion, you’re curious to try xmonad, but still too tied to GNOME, KDE or XFCE? No problem, xmonad can be used with all of these desktop environment. For example, on GNOME it can replace metacity with dignity …
But it’s all well documented on the official website of xmonad! 😉
Useful Links
[0] http://xmonad.org/
[1] http://haskell.org/haskellwiki/Xmonad#Keybindings_cheatsheet
[2] http://cs.anu.edu.au/student/comp1100.2007.s2/haskell/tourofsyntax.html
[3] http://haskell.org/haskellwiki/Xmonad/Config_archive/Template_xmonad.hs_(0.9)
Popular Posts:
- None Found