I've had this low-level urge to try a new window manager for a few months now. I work on a Linux box (Ubuntu) daily and mostly run a number of terminals, GNU Emacs, Mozilla Firefox, and Google Chrome. Nothing too fancy, really. Oh, and a shitty VPN client.

Background

Most of the time I'm doing this in front of a 24" (or larger) monitor running at 1920x1200, so there's a lot of screen real estate. Yet I was always annoyed by how much time I spent moving windows around or trying to find the optimal layout--always reaching for the mouse.

Years ago when 1024x768 was the norm, I ran a heavily customized fvwm2 and enjoyed it. But then I made the move to Windows for a few years and came back to Linux with Ubuntu/Gnome as my "desktop."

The Netbook

Months ago I wrote about how I love my Samsung NC10. When I'm not at my desk, I'll often use PuTTY to login, resume my screen session(s), and continue working. For what it's worth, I find that the free DejaVu Fonts (specifically the Monospaced one) works exceptionally well.

What I realized is that my method of having one terminal in full-screen mode on each "desktop" (thanks to the VirtualWin virtual desktop manager) is surprisingly productive, even on the little 10" screen. At first I considered this a fluke and attributed it mainly to the novelty of working this way. But after a while I realized that it was the focus that this setup enforces. There simply isn't enough room to have a browser on screen to distract me while I'm coding something, reading email, etc.

I really need to focus one or a few tightly realted tasks. The cognitive overload of having the whole Internet available really gets pushed off-screen and mostly out of mind.

Trying xmonad

After a discussion in our chatroom at work the other day, I finally decided to give a new window manger a try: xmonad. A big help was Tom's Introduction to the xmonad Tiling Window Manager which gave me just the information I needed to get started.

I used it most of Friday and a bit off and on Saturday, both on my primary work computer and my "home" Linux desktop machine. The experience has been surprisingly positive so far. Most of the hassles have revolved around re-training my hands to learn some new keyboard shortcuts and finding replacements for the few GUI things that Gnome provided on my previous desktop.

On thing I particularly like is that most of the keybindings seem very sane out of the box with xmonad. I haven't really needed to customize anything yet. I have found that a couple keystrokes that I use in GNU Emacs appear to be intercepted by xmonad and I haven't found an easy way to undo that or at least discover what they're supposed to do: Alt-w and Alt-q are the two I've noticed.

I also needed to resurrect an old xmodmap file that I could use to turn my CAPS LOCK into a Control key and re-discover the right xset command to set my key repeat rate higher than the default: xset r rate 250 30.

Other than those few nits, it's been pretty smooth sailing. I definitely feel like I'll be more productive in the long run a result of switching.

Have you tried a tiling window manager? Did you stick with it?

Posted by jzawodn at September 20, 2009 09:25 AM

Reader Comments
# keyist said:

Hey, fellow xmonad user here -- love it even on a roomy 24".

Alt-q restarts xmonad with new settings if you have changed the configuration.

To avoid xmonad eating up emacs commands you can change the hotkey for xmonad in your config:

myModMask = mod3Mask

The above uses mod3 (typically bound to right alt). Should you go that route you may want to unbind mod1 from right alt as well. Or you could change the hotkey to the super key if you prefer.

An alternative is to customize the problematic keystrokes to not conflict.

A verbose config file with the default settings can be found at http://www.haskell.org/haskellwiki/Xmonad/Config_archive/Template_xmonad.hs_%280.8%29 . You can use that as a base for configuring xmonad and making the above changes.

on September 20, 2009 10:10 AM
# Pablo Martinez said:

I use awesome WM ( http://awesome.naquadah.org/ ) and quite happy with it. I thought of using it in my netbook, but haven't done it yet because with my usage I always have one app using the whole screen.

But I use it awesome daily in my desktop and I think it will be a while until I decide to change it back to another WM.

on September 20, 2009 01:27 PM
# Patrick Hunt said:

I've been using xmonad for a while now on my old thinkpad t40 and really love it. Took almost no time to get familiar with the key bindings, I already had left control and capslock swapped, I ended up taking over left control (the original key) for the xmonad mod key. Works great and means that emacs is uneffected.

Originally I swapped because gnome was taking up way too many resources on this older/modest machine. Really came to love the tiling aspect though.

on September 20, 2009 01:48 PM
# Vic Fryzel said:

Jeremy,

I've used Xmonad for awhile now, and love it. Make sure you setup xmobar, and name your desktops. Naming your desktops is really useful when running xmobar because you can give some usability to which desktop is which number until you remember them on your own. For instance, I have desktops 1:code, 2:web, 3:msg, 4:vm, 5:media, so I hit alt+1 to get to my code desktop, and it highlights in xmobar.

Some other things I found really useful are changing the layout (alt-space,) automatically pushing window classes to a certain desktop (see xmonad.hs and setup your .xinitrc,) and changing the number of windows in the master pane (alt-. and alt-,).

on September 20, 2009 03:05 PM
# Marzhall said:

I also use Awesome wm, and it's gotten to the point where it becomes frustrating to me to use a non-tiling wm; it's like going back to word after using vim for two years. The funny thing is, I had tried to make a tiling wm in VB in highschool (god, what a butchered project) before I even knew what linux was, and was blown away when I found out they already existed.

on September 20, 2009 03:54 PM
# Alex Rodrigu said:

Hey, could you post the xmodmap file that you use to map the capslock key to the control key? I've tried finding it forever, it seems.

on September 20, 2009 03:56 PM
# virtualdesktop said:

Just wanted to say I worked (backend webdev) for a year on just a 13" laptop with four virtual desktops for a year when I was traveling. I highly recommend it!

Previously I'd used a dual head setup and I liked the virtual desktop approach much more.

Zooming around virtual workspaces with single hotkey combos and having your editor, browser, etc all open and maximized on their own space, is a really effective way to work for me.

If I had to pick a downside it would be that I could've used a little more vertical real-estate on my browser's workspace, but that's it.

Now that I've stopped traveling, I'm back on two 24's and I continue to use the virtual desktop approach. I only use the second screen when I want to have reference material open.. it's actually something I could do without completely.

on September 20, 2009 04:09 PM
# gwern said:

As far as caps lock goes: a better idea than xmodmap is to change your X.org configuration. (Ubuntu will ask about that option among others if you reconfigure X).

This is better than xmodmap for multiple reasons: it will not devour your soul; it will work reliably; you won't need another thing in your .xinitrc (yet more state which can screw up!); it's simpler; etc.

on September 20, 2009 06:36 PM
# James said:

I bound the "windows key" (mod4mask?) to xmonad and it works great.

on September 20, 2009 07:24 PM
# seth said:

If you are already using Emacs, you should give StumpWM a whirl (since you are experiementing with WM).

It's written in Lisp and has a REPL running that you can connect to with Emacs. The key-bindings are similar too.

http://www.nongnu.org/stumpwm/

on September 20, 2009 08:46 PM
# Tracy Reed said:

I recently switched to xmonad also. And I had the alt-q problem. I went into my ~/.xmonad/xmonad.hs and changed it like so:
-- Quit xmonad
-- I never want to accidentally quit again.
-- , ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess))

-- Restart xmonad
, ((modMask , xK_w ), restart "xmonad" True)

on September 20, 2009 10:12 PM
# matt harrison said:

I made the switch about a year ago after my hand/wrist told me to stop reaching over for the mouse to uncover overlapping windows after using KDE since the 1.x days. (Yeah, I know alt tab...) But having a tiled layout just made sense. Now non-tiled wms/OS's are just annoying.

At first I messed around with qtile, and began trying to create a tab/tiling mode for it (think eclipse). It was a little too nascent at the time. The two others that appealed to me were Awesome and Xmonad. Both basically require some understanding of Lua and Haskell respectively. I chose Lua, though Xmonad is intriguing, but if there were more time in the day, I'd hack qtile (Python!).

Awesome works pretty good other than the constant change of (Lua) config code and lack of sublayouts. I also know it has worked out some bugs, such as presentation mode for OOo.

Drawback for tiling is that it confuses the wife. Perhaps the kwin tiling situation will improve that, though I'm doubting it will provide the layout/configuration that xmonad/awesome have. Would be a killer feature for KDE though...

ps - Envy Code R is a great monospaced font. I recommend it.

on September 20, 2009 10:36 PM
# jarrod said:

I've been using XMonad for months now full-time. It's flawless and I'll never go back. So light, clean and productive. I use it for web dev on dual heads with my laptop and a 24" HD. Generally have browser on laptop with vim in a terminal, firebug popout, gaim and Xchat irc on monitor. Perfect.

on September 21, 2009 05:54 AM
# JJ said:

Thanks for xmonad it works just awesome.

on September 21, 2009 07:10 AM
# Carl Cravens said:

I've been using xmonad for a few months and I love it... it's been especially useful on both my work laptop and my personal EeePC.

Initially, I used the Windows-key for the xmonad mod-key, but when I moved to the laptop, I had to use something different. I ended up mapping CapsLock to be the mod-key... Ctrl on CapsLock doesn't work for me, because there are way too many ctrl-combos I can't hit one-handed that way. But CapsLock is in the same spot on every keyboard, and that's worked out really well with xmonad.

I'm going to have to post my config in public someday... my layouts have become somewhat complex, with nearly every workspace having a custom set of layouts adapted to the task. My Inkscape layout uses ResizableTile to manage dialog widows, while my Coding layout uses Combo to combine Tabbed on the left and ResizableTall on the right to let me manage ten editor windows more easily. One layout has a Full option that doesn't have AvoidStruts, so it covers up my xmobar while watching full-screen video.

It's nice having a window manager that puts apps where I want them, at the size I want them, and I'm not constantly shuffling windows around.

on September 22, 2009 03:30 PM
# Brochure Printing said:

Hmm.. I'm not really big on the idea of tiling windows, or a tiling manager. But yeah, Windows really do suck when it comes to this matter. Thanks for sharing info abt xmonad though. Maybe I'd try it some other time. :)

on October 5, 2009 09:12 PM
# Samat said:

Has anyone done a comparison on awesome vs xmonad?

What are the differences? Which integrates better with modern desktops (i.e. KDE, GNOME)? Which is faster, easier to configure, etc?

on October 14, 2009 02:03 AM
# Greg said:

You inspired me to give xmonad a try and I have to say I am quite pleased with it. Thanks!

on October 16, 2009 09:35 PM
# Richard said:

Another vote for xmonad. It gave a new lease of life to my thinkpad X30. I use it with my laptop and my main development machine with dual head. Absolutely rock solid, fast and very, very functional. My own configs can be seen here:

http://richardriley.net/projects/xmonad/index.html

on December 16, 2009 10:57 PM
# Saifi Khan said:

dwm+dmenu on FreeBSD and DragonFlyBSD rocks !

i've been using this combo for the last 2 yrs and there is no upgrade hell and no unstability.

It is also instructive to note that once a person starts using a tiling window manager, one gains on one screen real estate, without having to twiddle on resolution or keeping the app around, just in case.

Guess the iPad extends the argument further.

thanks
Saifi.

on February 17, 2010 05:23 PM
# omk said:

Switched to a custom (aren't they always) cut of dwm/dmenu and never looked back. Using Windows/Gnome/KDE seems so tedious now. You mean the window doesn't just appear where I expect it to ? Why no ?

99% mouse-less now thanks to vimperator/muttator and the remaining 1% is much more tolerable with a trackpoint keyboard like the Lenovo USB Trackpoint.

Martin

on June 10, 2010 08:57 PM
Disclaimer: The opinions expressed here are mine and mine alone. My current, past, or previous employers are not responsible for what I write here, the comments left by others, or the photos I may share. If you have questions, please contact me. Also, I am not a journalist or reporter. Don't "pitch" me.

 

Privacy: I do not share or publish the email addresses or IP addresses of anyone posting a comment here without consent. However, I do reserve the right to remove comments that are spammy, off-topic, or otherwise unsuitable based on my comment policy. In a few cases, I may leave spammy comments but remove any URLs they contain.