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