Unofficial mirror of https://github.com/xmonad/xmonad
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.

CONFIG 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. == Configuring xmonad ==
  2. xmonad is configured by creating and editing the file:
  3. ~/.xmonad/xmonad.hs
  4. xmonad then uses settings from this file as arguments to the window manager,
  5. on startup. For a complete example of possible settings, see the file:
  6. man/xmonad.hs
  7. Further examples are on the website, wiki and extension documentation.
  8. http://haskell.org/haskellwiki/Xmonad
  9. == A simple example ==
  10. Here is a basic example, which overrides the default border width,
  11. default terminal, and some colours. This text goes in the file
  12. $HOME/.xmonad/xmonad.hs :
  13. import XMonad
  14. main = xmonad $ def
  15. { borderWidth = 2
  16. , terminal = "urxvt"
  17. , normalBorderColor = "#cccccc"
  18. , focusedBorderColor = "#cd8b00" }
  19. You can find the defaults in the file:
  20. XMonad/Config.hs
  21. == Checking your xmonad.hs is correct ==
  22. Place this text in ~/.xmonad/xmonad.hs, and then check that it is
  23. syntactically and type correct by loading it in the Haskell
  24. interpreter:
  25. $ ghci ~/.xmonad/xmonad.hs
  26. GHCi, version 6.8.1: http://www.haskell.org/ghc/ :? for help
  27. Loading package base ... linking ... done.
  28. Ok, modules loaded: Main.
  29. Prelude Main> :t main
  30. main :: IO ()
  31. Ok, looks good.
  32. == Loading your configuration ==
  33. To have xmonad start using your settings, type 'mod-q'. xmonad will
  34. then load this new file, and run it. If it is unable to, the defaults
  35. are used.
  36. To load successfully, both 'xmonad' and 'ghc' must be in your $PATH
  37. environment variable. If GHC isn't in your path, for some reason, you
  38. can compile the xmonad.hs file yourself:
  39. $ cd ~/.xmonad
  40. $ ghc --make xmonad.hs
  41. $ ls
  42. xmonad xmonad.hi xmonad.hs xmonad.o
  43. When you hit mod-q, this newly compiled xmonad will be used.
  44. == Where are the defaults? ==
  45. The default configuration values are defined in the source file:
  46. XMonad/Config.hs
  47. the XConfig data structure itself is defined in:
  48. XMonad/Core.hs
  49. == Extensions ==
  50. Since the xmonad.hs file is just another Haskell module, you may import
  51. and use any Haskell code or libraries you wish. For example, you can use
  52. things from the xmonad-contrib library, or other code you write
  53. yourself.