import XMonad import XMonad Actions CopyWindow import XMonad Hooks Man

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import XMonad
import XMonad.Actions.CopyWindow
import XMonad.Hooks.ManageDocks
import XMonad.Layout.ThreeColumns
import XMonad.Hooks.EwmhDesktops
import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig
import XMonad.Hooks.SetWMName
main = xmonad $ defaultConfig
{ manageHook = manageDocks <+> manageHook defaultConfig
, startupHook = setWMName "LG3D"
, logHook = ewmhDesktopsLogHook
, layoutHook = ewmhDesktopsLayout $ avoidStruts $ (tall ||| ThreeCol 1 (3/100) (5/8) ||| Full)
, modMask = mod4Mask
, normalBorderColor = "#aaaaaa"
, focusedBorderColor = "#000000"
}
`additionalKeysP` myKeys
where
tall = Tall nmaster delta ratio
nmaster = 1
ratio = 1/2
delta = 2/100
myWorkspaces = map (:[]) ['1' .. '9']
myKeys :: [([Char], X ())]
myKeys = [ ("M-S-c", kill1)
, ("M-x", spawn "x-terminal-emulator")
, ("M-r", spawn "exe=`dmenu_path | dmenu -b -nb '#eeeeee' -nf '#222222' -sb '#335577' -sf '#ffffff'` && eval \"exec $exe\"")
, ("M-S-]", kill)
, ("M-n", refresh)
, ("M-f", windows W.focusDown)
, ("M-b", windows W.focusUp)
, ("M-m", windows W.focusMaster)
]
++ [("M" ++ m ++ ('-':k:[]), windows $ f i)
| (i, k) <- zip myWorkspaces ['1' .. '9']
, (f, m) <- [(W.view, ""), (W.shift, "-S"), (copy, "-C-S")]]