tscopp

Untitled

Dec 20th, 2012
84
0
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.ManageHelpers
  4. import XMonad.Layout.IM
  5. import XMonad.Layout.PerWorkspace
  6. import qualified XMonad.StackSet as W
  7.  
  8. -- main
  9. main = xmonad $ defaultConfig
  10.   { ...
  11.     , layoutHook = myLayout
  12.     , manageHook = myManageHook
  13.     , modMask = mod4Mask -- Use Super instead of Alt
  14.     , terminal = "gnome-terminal"
  15.   }
  16.  
  17. -- Layouts
  18. myLayout = avoidStruts $ onWorkspace "3-im" imLayout $ standardLayouts
  19.   where
  20.   --   numMasters, resizeIncr, splitRatio
  21.   tall = Tall 1           0.02        0.5
  22.   -- define the list of standardLayouts
  23.   standardLayouts = tall ||| Mirror tall ||| Full
  24.   imLayout = withIM (1/10) (Role "roster") (standardLayouts)
  25.    
  26. -- Manage hook
  27. myManageHook = composeAll
  28.     [ -- whatever you might already have
  29.     -- move all IM windows to IM workspace
  30.     , className =? "pidgin" --> doShift "3-chat"
  31.     -- and float everything but the roster
  32.     , classNotRole ("pidgin", "roster") --> doFloat
  33.     ]
  34.     where
  35.         classNotRole :: (String, String) -> Query Bool
  36.         classNotRole (c,r) = className =? c <&&> role /=? r
  37.         role = stringProperty "WM_WINDOW_ROLE"
Advertisement
Add Comment
Please, Sign In to add comment