1 -- XMonad configuration file.
3 -- Should work fine with XMonad 0.7 and above.
7 -- Necessary for reflectVert.
8 import XMonad.Layout.Reflect
9 -- Necessary for avoidMaster.
10 import qualified XMonad.StackSet as W
11 -- Necessary for smartBorders.
12 import XMonad.Layout.NoBorders
13 -- Necessary for composeOne and -?>.
14 import XMonad.Hooks.ManageHelpers
17 -- Prevent new windows from spawning in the master pane. Taken from
18 -- http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions on
19 -- 2009-06-30. Thanks. Modified to not steal focus from the master pane when a
20 -- new window is created, thanks to vav in #xmonad on Freenode (2010-04-15
22 avoidMaster :: W.StackSet i l a s sd -> W.StackSet i l a s sd
23 avoidMaster = W.modify' $ \c -> case c of
24 W.Stack t [] (r:rs) -> W.Stack r [] (t:rs)
27 -- Create my custom layout.
29 -- Only use horizontal (Mirror tiled) and fullscreen layouts.
31 -- The master pane is at the top of the screen. To make sure new windows don't
32 -- spawn in the master pane avoidMaster (see below) is used. Borders are only
33 -- drawn when the screen has more then one window (smartBorders).
35 -- Thanks to jrick in #xmonad on Freenode (2009-06-29 22:19) for telling me
36 -- how to remove the vertical tiled layout.
37 myLayoutHook = smartBorders $ Mirror tiled ||| Full
39 -- Default tiling algorithm partitions the screen into two panes.
40 tiled = Tall nmaster delta ratio
41 -- The default number of windows in the master pane.
43 -- Percent of screen to increment by when resizing panes.
45 -- Default proportion of screen occupied by master pane.
48 -- Don't spawn new windows in the master pane (which is at the top of the
49 -- screen). Thanks to dschoepe, aavogt and especially vav in #xmonad on
50 -- Freenode (2009-06-30 02:10f).
52 -- Also some applications are spawned on specific workspaces. Thanks to
53 -- dschoepe and ivanm in #xmonad on Freenode (2009-07-12 14:50).
54 myManageHook = composeOne
55 [ className =? "Iceweasel" -?> doF (W.shift "2")
56 , className =? "Wireshark" -?> doF (W.shift "3")
58 -- Don't span new windows in the master pane.
59 , return True -?> doF avoidMaster
60 -- Prevent windows which get moved to other workspaces from removing the
61 -- focus of the currently selected window. Thanks to vav in #xmonad on
62 -- Freenode (2010-04-15 21:04).
63 , return True -?> doF W.focusDown
66 main = xmonad $ defaultConfig
67 -- Use Windows key as main key so it doesn't conflict with any other key
70 -- Inactive borders are black - invisible on my black screen.
71 , normalBorderColor = "#000000"
72 -- Active border is dark red.
73 , focusedBorderColor = "#990000"
74 -- Use my layout and manage hooks (see above).
75 , layoutHook = myLayoutHook
76 , manageHook = myManageHook
77 -- Use unicode rxvt as my terminal.