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 bottom of the screen (reflectVert). To make sure
26 -- new windows don't spawn in the master pane avoidMaster (see below) is used.
27 -- Borders are only drawn when the screen has more then one window
30 -- Thanks to jrick in #xmonad on Freenode (2009-06-29 22:19) for telling me
31 -- how to remove the vertical tiled layout.
32 myLayoutHook = smartBorders $ reflectVert $ Mirror tiled ||| Full
34 -- Default tiling algorithm partitions the screen into two panes.
35 tiled = Tall nmaster delta ratio
36 -- The default number of windows in the master pane.
38 -- Default proportion of screen occupied by master pane.
40 -- Percent of screen to increment by when resizing panes.
43 -- Don't spawn new windows in the master pane (which is now at the bottom of
44 -- the screen). Thanks to dschoepe, aavogt and especially vav in #xmonad on
45 -- Freenode (2009-06-30 02:10f).
47 -- Also some applications are spawned on specific workspaces. Thanks to
48 -- dschoepe and ivanm in #xmonad on Freenode (2009-07-12 14:50).
49 myManageHook = composeAll
50 [ className =? "Iceweasel" --> doF (W.shift "2")
51 , className =? "Wireshark" --> doF (W.shift "3")
54 main = xmonad $ defaultConfig
55 -- Use Windows key as main key so it doesn't conflict with any other key
58 -- Inactive borders are black - invisible on my black screen.
59 , normalBorderColor = "#000000"
60 -- Active border is dark red.
61 , focusedBorderColor = "#990000"
62 -- Use my layout and manage hooks (see above).
63 , layoutHook = myLayoutHook
64 , manageHook = myManageHook