Peter's XMonad configuration files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xmonadrc.hs 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {-# OPTIONS -fno-warn-missing-signatures #-}
  2. --------------------------------------------------------------------------------
  3. {- This file is part of the xmonadrc package. It is subject to the
  4. license terms in the LICENSE file found in the top-level directory of
  5. this distribution and at git://pmade.com/xmonadrc/LICENSE. No part of
  6. the xmonadrc package, including this file, may be copied, modified,
  7. propagated, or distributed except according to the terms contained in
  8. the LICENSE file. -}
  9. --------------------------------------------------------------------------------
  10. module Main where
  11. --------------------------------------------------------------------------------
  12. import XMonad hiding (config)
  13. import XMonad.Actions.DynamicProjects (dynamicProjects)
  14. import XMonad.Actions.Navigation2D
  15. import XMonad.Config.Desktop (desktopConfig)
  16. import XMonad.Hooks.ManageDocks (avoidStruts)
  17. import XMonad.Hooks.UrgencyHook hiding (urgencyConfig)
  18. import XMonad.Util.NamedScratchpad (namedScratchpadManageHook)
  19. import XMonad.Hooks.FadeWindows (fadeWindowsEventHook)
  20. --------------------------------------------------------------------------------
  21. import qualified XMonad.Local.Action as Local
  22. import qualified XMonad.Local.Keys as Local
  23. import qualified XMonad.Local.Layout as Local
  24. import qualified XMonad.Local.Log as Local
  25. import qualified XMonad.Local.Theme as Local
  26. import qualified XMonad.Local.Workspaces as Workspaces
  27. --------------------------------------------------------------------------------
  28. -- Damn you XMonad and your crazy type signatures!
  29. --
  30. -- config :: XConfig a
  31. config = desktopConfig
  32. { terminal = Workspaces.terminal
  33. , layoutHook = avoidStruts Local.layoutHook
  34. , manageHook = manageHook desktopConfig <>
  35. namedScratchpadManageHook Workspaces.scratchPads <>
  36. Local.manageHook
  37. , handleEventHook = handleEventHook desktopConfig <>
  38. fadeWindowsEventHook <>
  39. Local.handleEventHook
  40. , logHook = logHook desktopConfig <>
  41. Local.logHook
  42. , workspaces = Workspaces.names
  43. , modMask = mod4Mask
  44. , keys = Local.keys
  45. , focusFollowsMouse = False
  46. }
  47. --------------------------------------------------------------------------------
  48. -- | Configuration for 'XMonad.Actions.Navigation2D'.
  49. navConf :: Navigation2DConfig
  50. navConf = def
  51. { defaultTiledNavigation = hybridOf sideNavigation centerNavigation
  52. }
  53. --------------------------------------------------------------------------------
  54. main :: IO ()
  55. main = launch (dynamicProjects Workspaces.projects .
  56. withUrgencyHookC urgencyStyle urgencyConfig .
  57. withNavigation2DConfig navConf .
  58. Local.xmonadColors $ config)
  59. where
  60. urgencyConfig = UrgencyConfig Focused Dont
  61. urgencyStyle = BorderUrgencyHook "#ff0000"