Advertisement
atm-irbis

My XMonad config

Apr 9th, 2013
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import XMonad
  2. import XMonad.Hooks.DynamicLog
  3. import XMonad.Hooks.ManageDocks
  4. import XMonad.Hooks.ManageHelpers
  5. import XMonad.Layout.NoBorders
  6. import XMonad.Layout.StackTile
  7. import XMonad.Layout.Gaps
  8. import XMonad.Layout.TwoPane
  9. import XMonad.Layout.ThreeColumns
  10. import XMonad.Layout.Circle
  11. import XMonad.Layout.Grid
  12. import XMonad.Util.Run(spawnPipe)
  13. import XMonad.Util.EZConfig
  14. import System.IO
  15. import qualified Data.Map as M
  16.  
  17.  
  18. main = do
  19.   xmproc <- spawnPipe "/usr/bin/xmobar /home/caveat/.xmonad/xmobarrc"
  20.   xmonad defaultConfig {
  21.     modMask = mod4Mask
  22.     , borderWidth = 2
  23.     , normalBorderColor = "gray"
  24.     , focusedBorderColor = "cyan"
  25.     , terminal = "terminator"
  26.     , workspaces = ["1:main", "2:devel", "3:editor", "4:files", "5:media", "6:office", "7:term", "8:www","9:misc"]
  27.     , keys = mykeys
  28.     , layoutHook = avoidStruts $ smartBorders $ layouts
  29.     , manageHook = myManageHook <+> manageDocks
  30.     , startupHook = spawn "terminator"
  31.     , logHook = dynamicLogWithPP $ xmobarPP
  32.                         { ppOutput = hPutStrLn xmproc,
  33.                           ppTitle = xmobarColor "green" "" . shorten 50,
  34.                           ppCurrent = xmobarColor "orange" "" . wrap "[" "]"
  35.                         }
  36.   }
  37.  
  38.  
  39. mykeys x = M.union (keys defaultConfig x) (keysToAdd x)
  40.   where
  41.     keysToAdd = \c -> mkKeymap c $ [
  42.       ("M1-w", spawn "chromium"),
  43.       ("M1-g", spawn "geany"),
  44.       ("M1-r", spawn "/home/caveat/.xmonad/menu.sh") ]
  45.  
  46. layouts = tiled ||| Mirror tiled ||| stacked ||| twopaned ||| threepaned ||| Circle ||| Grid ||| noBorders Full
  47.   where
  48.      tiled   = Tall nmaster delta ratio
  49.      stacked = StackTile nmaster delta ratio
  50.      twopaned = TwoPane delta ratio
  51.      threepaned = ThreeCol nmaster delta ratio
  52.      nmaster = 1
  53.      ratio   = 1/2
  54.      delta   = 3/100
  55.      
  56.  
  57. myManageHook = composeAll
  58.   [ className =? "Terminator" --> moveTo "7:term"
  59.   , className =? "Iceweasel"  --> moveTo "8:www"
  60.   , className =? "Chromium" --> moveTo "8:www"
  61.   , className =? "Thunar"     --> moveTo "4:files"
  62.   , className =? "Gnome-mplayer"  --> moveTo "5:media"
  63.   , className =? "Geany"      --> moveTo "3:editor"
  64.   , className =? "Gksu" --> doFloat
  65.   ]
  66.     where moveTo = doShift
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement