April 5, 2012
I was looking for a tiling window manager to use, and found xmonad. It is written in Haskell, and is quite extensible. You can install it on Fedora using:
$ sudo yum install xmonad-gnome
Here is a screenshot of the same (click image):
The left ALT key is used by default as the “mod” key in xmonad. Since I use it with GNU Emacs, the Windows key has been reconfigured now to be used as the “mod” key. I also use xmonad with GNOME 3 in fallback mode, which actually looks like GNOME 2. The configuration file ~/.xmonad/xmonad.hs:
import XMonad
import XMonad.Config.Gnome
import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig
main = do
xmonad $ gnomeConfig {
workspaces = myWorkspaces
, modMask = mod4Mask
} `additionalKeysP` myKeys
myWorkspaces = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
myKeys = [
-- other additional keys
] ++ -- (++) is needed here because the following list comprehension
-- is a list, not a single key binding. Simply adding it to the
-- list of key bindings would result in something like [ b1, b2,
-- [ b3, b4, b5 ] ] resulting in a type error. (Lists must
-- contain items all of the same type.)
[ (otherModMasks ++ "M-" ++ [key], action tag)
| (tag, key) <- zip myWorkspaces "123456789"
, (otherModMasks, action) <- [ ("", windows . W.view) -- was W.greedyView
, ("S-", windows . W.shift)]
]