Thursday, March 09, 2006

There is a disturbing trend today to add eye-candy to window managers.
Though this is fun to look at (for a while) it may not do much to improve functionality.

Here is my attempt to address the functionality part.

I started using Linux in 1994 (Slackware).

Slackware came with a nice window manager called olvwm (Open Look Virtual Window Manager).

I became addicted to some basic olvwm features.
These features are hard to find in most modern day window managers.

For Example:

1. Moving/Resizing a window while it's behind another window
2. Moving a window by grabbing any edge (not just the top)
3. Moving/Resizing a window using any part of the window (i.e. hold down the alt key)
4. Lowering a window (to the background)
5. Typing into text boxes without rise-on focus

Most window managers today have the annoying feature I call
always-rise-on-focus.
If you click anywhere on a window (at any time)
it always jumps to the forground covering anything in its way.

Visualize a stack of papers on your desk
and any time you touched one sheet
it jumped to the top of the stack.

Say you have a post-it note on a big sheet of paper.
As soon as you touch the big sheet of paper to fill in the blanks
your post-it note gets covered and you can't read it anymore.

Most window managers suck.
People put up with them because they don't know any better.

So, (in the spirit of olvwm) I set out to create the Perfect Window Manager
(i.e. a customized sawfish).


The sawfish window manager (formerly sawmill) is highly configurable.
It is compatible with the Gnome Desktop.
Sawfish can replace Gnome Desktop's default window manager Metacity.


Interested?? Here's what you do.

Part 1
Switching to sawfish

Install your favorite Linux distro that comes with sawfish.
Install Gnome (version 2 or greater).
Install the sawfish package.
Start a gnome session.

Open a Terminal (we will use it later)

From your gnome menu find "Sessions".
It's usually part of "Preferences".

Click "Current Session"
Click the "Metacity" entry then "Remove" then "Apply".

You window manager will now be halted.

Go to that terminal you opened earlier and start sawfish by entering the following line (assuming sawfish lives at /usr/bin/sawfish ):

/usr/bin/sawfish

Your Gnome Desktop should now be using sawfish instead of Metacity.
If you close your terminal sawfish should respawn
(otherwise you will have to add sawfish to "Startup Programs").

Then close all your windows and exit your gnome session.

Be sure to check Save Current Setup when you log out.

Part 2 Customizing sawfish

Start your gnome session again.
You should have the different looking sawfish windows now.

If you click on the root window (i.e. back ground, wallpaper) with the middle mouse button you can customize sawfish.

Go to "Customize" > "Bindings".

Edit each of the bindings to match mine.

Here are my custom sawfish bindings

(to give you a tricked out window manager).

Be careful with upper/lower case.

Global:
W-TAB .................. Cycle Windows
W-Right ................ Next workspace
W-Left ................. Previous workspace

Window:
W-Button2-Click ........ Popup window menu
W-Button1-Off ..... Raise Window

W-Button3-Off ........ Raise lower window

M-Button1-Move ....... Move window interactively

M-Button3-Move ....... Resize window interactively

W-Down ................. Lower window

W-Up ................... Raise window


Root window:
Button2-Click .......... Popup root menu

Title:
Button1-Move ........... Move window interactively
Button3-Move .......... Popup window menu
Button 1-Off ............ Raise window
Button1-Off2 ........... Maximize window toggle
Button2-Move ........... Resize window interactively
Button3-Off ............. Raise lower window

Border:
Button1-Move ........... Move window interactively
Button3-Move ........... Resize window interactively
Button2-Move ........... Move window interactively
Button1-Off ............... Raise window
Button3-Off .............. Raise lower window


Close button:
Button1-Off ............. Delete window
S-Button1-Off .......... Delete group
Button3-Click .......... Popup window menu

Iconify button:
Button1-Off ............. Iconify window
Button3-Click .......... Popup window menu

Maximize button:
Button1-Off ............ Maximize window toggle
Button2-Off ............ Maximize window vertically toggle
Button3-Off ............ Maximize window horizontally toggle

Menu button:
Button1-Click .......... Popup window menu
Button3-Off ............ Delete window

Shade button:
Button1-Off ............ Toggle window shaded


Here is a brief users guide.

Just Remember that you usually move with the left button and resize with the right
(assuming a right hand mouse).

Move stuff with LEFT mouse button using any BORDER or TITLE.

Resize stuff with RIGHT mouse button using any BORDER.
Try these with an [alt] key too (i.e. anywhere on window).

Click LEFT mouse button using any BORDER or TITLE to RAISE window.
Click RIGHT mouse button using any BORDER or TITLE to RAISE/LOWER window.

A short little drag with the RIGHT mouse button on the TITLE gives you a handy window menu.


Doing the next machine is easy.

Sawfish keeps your custom settings in a file called ~/.sawfish/custom

If you want to do another machine all you have to do is copy this custom file to the new machine's ~/.sawfish directory.