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
15 -- Prevent new windows from spawning in the master pane. Taken from
16 -- http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions on
17 -- 2009-06-30. Thanks.
18 avoidMaster :: W.StackSet i l a s sd -> W.StackSet i l a s sd
19 avoidMaster = W.modify' $ \c -> case c of
20 W.Stack t [] (r:rs) -> W.Stack t [r] rs
23 -- Create my custom layout.
25 -- Only use horizontal (Mirror tiled) and fullscreen layouts.
27 -- The master pane is at the top of the screen. To make sure new windows don't
28 -- spawn in the master pane avoidMaster (see below) is used. Borders are only
29 -- drawn when the screen has more then one window (smartBorders).
31 -- Thanks to jrick in #xmonad on Freenode (2009-06-29 22:19) for telling me
32 -- how to remove the vertical tiled layout.
33 myLayoutHook = smartBorders $ Mirror tiled ||| Full
35 -- Default tiling algorithm partitions the screen into two panes.
36 tiled = Tall nmaster delta ratio
37 -- The default number of windows in the master pane.
39 -- Default proportion of screen occupied by master pane.
41 -- Percent of screen to increment by when resizing panes.
44 -- Don't spawn new windows in the master pane (which is at the top of the
45 -- screen). Thanks to dschoepe, aavogt and especially vav in #xmonad on
46 -- Freenode (2009-06-30 02:10f).
48 -- Also some applications are spawned on specific workspaces. Thanks to
49 -- dschoepe and ivanm in #xmonad on Freenode (2009-07-12 14:50).
50 myManageHook = composeAll
51 [ className =? "Iceweasel" --> doF (W.shift "2")
52 , className =? "Wireshark" --> doF (W.shift "3")
55 main = xmonad $ defaultConfig
56 -- Use Windows key as main key so it doesn't conflict with any other key
59 -- Inactive borders are black - invisible on my black screen.
60 , normalBorderColor = "#000000"
61 -- Active border is dark red.
62 , focusedBorderColor = "#990000"
63 -- Use my layout and manage hooks (see above).
64 , layoutHook = myLayoutHook
65 , manageHook = myManageHook
66 -- Use unicode rxvt as my terminal.