Guest User

Untitled

a guest
Apr 7th, 2011
913
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import XMonad
  2. import XMonad.Hooks.ManageDocks
  3. import XMonad.Hooks.DynamicLog ( PP(..), dynamicLogWithPP, dzenColor, wrap, defaultPP )
  4. import XMonad.Prompt
  5. import XMonad.Prompt.Shell
  6. import XMonad.Util.Run
  7.  
  8. import XMonad.Layout.SubLayouts
  9. import XMonad.Layout.WindowNavigation
  10. import XMonad.Layout.BoringWindows
  11.  
  12. import qualified XMonad.StackSet as W
  13. import qualified Data.Map as M
  14.  
  15. statusBarCmd = "dzen2 -w 960 -ta l -fn -*-terminus-medium-r-normal-*-16-*-*-*-*-*-iso8859-*"
  16. conkyCmd = "conky -c ~/.conkystatus | dzen2 -w 960 -x 960 -ta r -fn -*-terminus-medium-r-normal-*-16-*-*-*-*-*-iso8859-*"
  17.  
  18. main = do din <- spawnPipe statusBarCmd
  19. conky <- spawnPipe conkyCmd
  20. xmonad $ defaultConfig
  21. { normalBorderColor = "#dddddd"
  22. , focusedBorderColor = "#0033ff"
  23. , keys = \c -> mykeys c `M.union` keys defaultConfig c
  24. , manageHook = manageHook defaultConfig <+> myManageHook <+> manageDocks
  25. , logHook = dynamicLogWithPP $ myPP din
  26. , layoutHook = windowNavigation $ subTabbed $ boringWindows $ avoidStruts $ layoutHook defaultConfig
  27. }
  28. myManageHook = composeAll
  29. [
  30. resource =? "stalonetray" --> doIgnore
  31. ]
  32.  
  33. mykeys (XConfig {modMask = modm}) = M.fromList $
  34. [ ((modm, xK_F2), spawn "uxterm")
  35. , ((modm, xK_F3), shellPrompt myPromptConfig)
  36. , ((modm .|. controlMask, xK_h), sendMessage $ pullGroup L)
  37. , ((modm .|. controlMask, xK_l), sendMessage $ pullGroup R)
  38. , ((modm .|. controlMask, xK_k), sendMessage $ pullGroup U)
  39. , ((modm .|. controlMask, xK_j), sendMessage $ pullGroup D)
  40. , ((modm .|. controlMask, xK_m), withFocused (sendMessage . MergeAll))
  41. , ((modm .|. controlMask, xK_u), withFocused (sendMessage . UnMerge))
  42. , ((modm .|. controlMask, xK_period), onGroup W.focusUp')
  43. , ((modm .|. controlMask, xK_comma), onGroup W.focusDown')
  44. ]
  45.  
  46. myPromptConfig = defaultXPConfig
  47. { position = Bottom
  48. , promptBorderWidth = 0
  49. }
  50.  
  51. myPP h = defaultPP
  52. {
  53. ppOutput = hPutStrLn h
  54. }
RAW Paste Data