xmonad 0.8 with GNOME
I have discovered xmonad, a tiling window manager that works well with GNOME. The drawback to WMs like ion and awesome is that they don't play nice with the GNOME panel. However, xmonad works very well with it. I have added a few things to my configuration to make things work the way I like. For example, the deskbar applet window is made floating. Gimp windows are floating and assigned to workspace 5. The modifier key is the windows key. Here is my config after the screenshot. Just save it in $HOME/.xmonad as xmonad.hs.
import XMonad
import XMonad.Actions.CopyWindow
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops
import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = False
main = xmonad $ defaultConfig
{ focusFollowsMouse = myFocusFollowsMouse
, manageHook = newManageHook
<+> manageHook defaultConfig
, logHook = ewmhDesktopsLogHook
, layoutHook = ewmhDesktopsLayout $ avoidStruts
$ layoutHook defaultConfig
, modMask = mod4Mask
}
`additionalKeysP` myKeys
myWorkspaces = map (:[]) ['1' .. '9']
myKeys :: [([Char], X ())]
myKeys = [ ("M-S-c", kill1)
]
-- This enables view switching, window shifting, and window copying a
++ [("M" ++ m ++ ('-':k:[]) , windows $ f i)
| (i, k) <- zip myWorkspaces ['1'..'9'] , (f, m) <- [(W.view, ""), (W.shift, "-S"), (copy, "-C-S")]] myManageHook :: ManageHook myManageHook = composeAll [ resource =? "gimp-2.4" --> doFloat
, resource =? "gimp-2.4" --> doF (W.shift "5")
, title =? "Deskbar Applet" --> doFloat ]
newManageHook :: ManageHook
newManageHook = myManageHook <+> manageDocks
That is all there is to it.
import XMonad
import XMonad.Actions.CopyWindow
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops
import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = False
main = xmonad $ defaultConfig
{ focusFollowsMouse = myFocusFollowsMouse
, manageHook = newManageHook
<+> manageHook defaultConfig
, logHook = ewmhDesktopsLogHook
, layoutHook = ewmhDesktopsLayout $ avoidStruts
$ layoutHook defaultConfig
, modMask = mod4Mask
}
`additionalKeysP` myKeys
myWorkspaces = map (:[]) ['1' .. '9']
myKeys :: [([Char], X ())]
myKeys = [ ("M-S-c", kill1)
]
-- This enables view switching, window shifting, and window copying a
++ [("M" ++ m ++ ('-':k:[]) , windows $ f i)
| (i, k) <- zip myWorkspaces ['1'..'9'] , (f, m) <- [(W.view, ""), (W.shift, "-S"), (copy, "-C-S")]] myManageHook :: ManageHook myManageHook = composeAll [ resource =? "gimp-2.4" --> doFloat
, resource =? "gimp-2.4" --> doF (W.shift "5")
, title =? "Deskbar Applet" --> doFloat ]
newManageHook :: ManageHook
newManageHook = myManageHook <+> manageDocks
That is all there is to it.
Comments