davama

xmonad EZConfig Inherit Keys

Feb 20th, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. main = do
  2.  hostname <- fmap nodeName getSystemID
  3. ...
  4. ...
  5.  xmonad $ withUrgencyHookC myUrgentHook myUrgencyConfig
  6.      $ docks $ ewmh defaultConfig {
  7.       terminal = myTerminal
  8.       , focusedBorderColor = myFocusedBorderColor
  9.      -- , keys = myKeys hostname
  10.         , logHook = composeAll [
  11.                     myFadeHook
  12.                     , myDzenLogHook xmproc
  13.           ]
  14.           >> updatePointer (0.5, 0.5) (0, 0) -- moves pointer to center of focused window
  15.  } `additionalKeys` myKeys hostname
  16.  
  17. myModMask = mod4Mask
  18.  
  19. myKeys (hostname) =  [
  20.  ((mod4Mask .|. shiftMask, xK_Return), spawn "xterm")
  21.  , ((mod4Mask .|. shiftMask, xK_KP_Enter), spawn "xterm")
  22. ...
  23. ...
  24. ]
  25.  ++
  26. ++
  27.  (case hostname of
  28.    "ARCHLAP" -> [
  29.      ((mod .|. controlMask, xK_1), spawn (myTerminal ++ " -p AMER-L")) -- myself
  30. ...
  31.   ]
  32.    _  -> [
  33.      ((mod .|. controlMask, xK_1), spawn (myTerminal ++ " -p AMER")) -- myself
  34. ...
  35.   ]
  36. )
Advertisement
Add Comment
Please, Sign In to add comment