-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckrc.hs
53 lines (45 loc) · 1.99 KB
/
checkrc.hs
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
41
42
43
44
45
46
47
48
49
50
51
52
53
--------------------------------------------------------------------------------
{- This file is part of the xmonadrc package. It is subject to the
license terms in the LICENSE file found in the top-level directory of
this distribution and at git://pmade.com/xmonadrc/LICENSE. No part of
the xmonadrc package, including this file, may be copied, modified,
propagated, or distributed except according to the terms contained in
the LICENSE file. -}
--------------------------------------------------------------------------------
module Main where
--------------------------------------------------------------------------------
import qualified Data.Map as M
import qualified Data.Set as S
import XMonad
import XMonad.StackSet (new)
import XMonad.Util.EZConfig (checkKeymap)
import XMonad.Local.XConfig
import XMonad.Local.Keys (emacsKeys)
--------------------------------------------------------------------------------
main :: IO ()
main = do
dpy <- openDisplay ""
rootw <- rootWindow dpy $ defaultScreen dpy
let xmc = xConfig {layoutHook = Layout $ layoutHook xConfig}
initialWinset = new (layoutHook xmc) (workspaces xmc) []
let cf = XConf { display = dpy
, config = xmc
, theRoot = rootw
, normalBorder = 0
, focusedBorder = 0
, keyActions = M.empty
, buttonActions = M.empty
, mouseFocused = False
, mousePosition = Nothing
, currentEvent = Nothing
}
let st = XState { windowset = initialWinset
, numberlockMask = 0
, mapped = S.empty
, waitingUnmap = M.empty
, dragging = Nothing
, extensibleState = M.empty
}
-- Check key bindings, errors go to xmessage.
_ <- runX cf st $ checkKeymap xmc (emacsKeys xmc)
return ()