Saturday, August 27, 2011

In search of a perfect Window Manager

In the beginning

A long long time ago, I started using GNU/Linux as my Desktop OS. At first I was using KDE 3. Back then I didn't like gnome at all (I still don't like it). KDE reassembled Windows pretty well, so it gave me some comfort.

Then one day I've read about Light-width window managers on some Gentoo site. It got me interested. The screenshots got me really exited. Soon after I tried my first Light-Width window manager. It was Fluxbox.

I was pretty exited, however it was very weird (especially when in past you have tried Windows, Linux+KDE3 and Linux+Gnome). I soon switched to back to KDE, however something was telling me to tray it again. And I did, and I like it. A lot.

Now after few months with Fluxbox found article about fvwm. I wanted to tray it and I did. Fvwm is all about customization. And I love customization, thats why I was using Gentoo Linux.

FVWM

At first look Fvwm was horrible, ugly beast (remember Windows 95? It was sexy compared to fvwm default config. I printed its manual. It was long (about 30x A4 pages if I remember correctly). So armed with manual I stared writing my first fvwm config. Nothing interesting at first, but then fast forward 4-5 years and I have this.

Not much to show about fvwm, pretty ordinary cascading window manager.

Awesome

For all these years I was pretty satisfied with fvwm, until I heard about awesome, a tiling WM. Tiling WM concept was very new to me, but I fell in love with it instantly.

Awesome is configure in Lua language, and if you make a mistake, it can hurt. Awesome doesn't forgive mistakes. So you better check you config, before you restart awesome after editing it. It also looks like awesome is more CPU hungry than other WMs that I will mention.

Good things about awesome:
  • pretty configurable/extendable
  • got statusbar
  • got tray
  • you can make menus
Some not so good things:
  • Gimp toolbars are floating, when you go full round of layout on desk with gimp, and main window was selected, toolboxes will be below main window (not sure how to get them back, but it's probably possible)
  • Menu can become annoying 
Spiral layout


xmonad

Then one day I tried xmonad, a tiling window manager written in haskell (functional) programming language. It got me very exited, I even stared to read Real World Haskell book.
Configuring xmonad the way you like isn't all that easy, but it's worth (same as with fvwm). xmonad influenced the way I work more and more, so I started updating my fvwm config with new ideas borrowed from xmonad config.
Some of these ideas:
  • ability to change desk working directory (borrowed from XMonad-Layout-WorkspaceDir module)
  • dmenu as app menu
  • window navigation with h j k l keys (borrowed from XMonad.Layout.WindowNavigation module)
  • windows without titlebar (Not that i never thought of if, It's just I started to like it after using xmonad)
  • conky replaced by xmobar
  • FVWM talking to xmobar via pipe (This was inspired by xmonad writing to xmobar pipe)
Finally I started to share more and more similar functions, keybindings and behaviors between fvwm and xmonad (as much as possible). This in turn led me to new idea, to separate common script from both WMs.
So I did it and that's how wmscripts was created.

However search wasn't over yet. I liked fvwm and I liked xmonad a lot, but fvwm lacked tiling support and my xmonad configuration, had problems with floating windows (new floating windows were put under old floating windows and thus new floating windows weren't visible. That sucked). For this reason I was using xmonad and fvwm depending on what I was doing.

If I was to code, I'd use xmonad
If I was to browse Internet then I'd use fvwm

xmonad pros:
  • Very expendable/configurable
  • You can't break it
  • Very low on system resources
xmonad cons:
  • haskell is very unusuall. You might need to learn some basics to configure xmonad
  • Hard to configure

Some xmonad screenshots:

My favoyrite layout for coding (2 master windows and 1 to many slave windows)

Opening multiple image in gimp doesn't cause problems, when you configure xmonad (you will see only one image at a time)

Per desktop layout configuration also allows you to select what layouts are available on desk. In case of WWW desk, I only allow this one layout.


wmfs

Another tilling WM that I came by was wmfs. It's quite nice. wmfs is easy to configure, it has it own "status bar" (more than that actually), it also supports system tray. wmfs is very easy to configure. However I had some problems and annoyances:
  • mplayer would start only in fullscreen mode.
  • When you reload config, pidgin will show up (if it was in tray, now mail window will be visible)
Few feature that that I'd like to highlight:
  • Got status bar with native tray. You can set script/app to execute to display various info in statusbar.
  • Many useful layouts
  • Per desk configuration
  • Move/Resize tiled windows with mod+mouse
  • Go to tag and back to previous tag pressing same key (just like in my Fvwm config, when you pres Mod+1 to go to 1st desk and then again Mod+1 to go to previous desk)
  • Share windows between tags
  • Easy configuration
  • Unlike in (default) Xmonad dialogs are floating 

Here are some wmfs screenshots:
Right layout 
Problem with gimp, when opening more than 1 image
Gimp with 1 opened image in MIRRO_V layout

i3

Now i3 is an awesome peace of software. It's amazing. It differs from other tilling managers in that it use tree data structure instead of columns to arrange windows. What this means is that you can make any layout you like. More than that, there are different modes to arrange windows. You can arrange them all tiled, tabbed or stacked.

However I has some problems with it:
  • mplayer was running in full screen mode. I don't like that. Sometimes I let mplayer play some movie in background, while I code.
  • I failed to make stalonetray (and trayer as well) to be placed where I want. It was stretched horizontally all over the screen. When I made them floating, i3 V4.0.1 crashed until I removed command that made them float.
  • I lacked some functions that I use on Fvwm and Xmonad, like switching back to previous used desk. 
However this WM is definitely worth trying. And I will keep an eye on its development.

Only in i3 you can make crazy layout like this. Here you can see many i3 unique features including stacked and tabbed windows. It's awesome. (Not sure if same is possible with i3 v3.x)
Small bug (see the black box?)


Gimp toolbox are floating, while main windows are tilled
You can however make window with image float, in this case it will cover entire screen


In the end
All screenshots available in original size at picasaweb


All this is my own subjective opinion. I've been using FVWM for 4-5 years, xmonad for ~6 months, other WMs for few hours to few days. I suggest you try them all and decide which one fits you the best.

Not that these are not all WMs out there. There many, many more. But these mentioned here cover my interest. Some might ask, why I didn't mention DWM.... I didn't like it. It was too minimalistic for me.

Currently I preffer xmonad, however that might change.

Here are my configs:
wmscripts - http://hg.bsdroot.lv/aldis/wmscripts/ (I use these in all WMs)
dot.files - http://hg.bsdroot.lv/aldis/dot.files/ (might be useful to see how I setup my environment. See xinitrc)

fvwm config - http://hg.bsdroot.lv/aldis/dot.fvwm/
xmonad config - http://hg.bsdroot.lv/aldis/dot.xmonad/ 

i3 config - http://hg.bsdroot.lv/aldis/dot.i3/ (nothing special)
wmfs config - http://hg.bsdroot.lv/aldis/dot.wmfs/ (nothing special)
awesome -  http://hg.bsdroot.lv/aldis/dot.awesome/ (nothing special)

Also remember screenshots are nice, but the most interesting things lie under the hood ;)

2 comments:

  1. You should try scrotwm and wmii.

    ReplyDelete
  2. I have tried scrotwm some time ago, but I didn't like it (don't remember why). I might give it another shot.

    I will try wmii, thanks

    ReplyDelete