]> code.delx.au - dotfiles/blobdiff - .xmonad/xmonad.hs
xmonad: fixed xmonad.hs to work with newer ghc
[dotfiles] / .xmonad / xmonad.hs
index b9e102c9f2977d19254bcaf50ec309b77e84843e..bc4a2f03256fbd793bdacb9fd2de2926c903a5dc 100644 (file)
@@ -1,5 +1,7 @@
+{-# LANGUAGE FlexibleContexts #-}
 import System.IO
 import XMonad
+import XMonad.Actions.PhysicalScreens
 import XMonad.Hooks.DynamicLog
 import XMonad.Hooks.EwmhDesktops
 import XMonad.Hooks.ICCCMFocus
@@ -55,9 +57,9 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
 
     -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
     -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
-    [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
+    [((m .|. modm, key), f sc)
         | (key, sc) <- zip [xK_o, xK_e, xK_u] [0..]
-        , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
+        , (f, m) <- [(viewScreen, 0), (sendToScreen, shiftMask)]
     ]
     ++
 
@@ -85,7 +87,6 @@ isSkipTaskBar = isInProperty "_NET_WM_STATE" "_NET_WM_STATE_SKIP_TASKBAR"
 myManageHook =
     manageDocks <+>
     composeOne [
-        (className =? "Firefox" <&&> resource =? "Navigator" <&&> currentWs =? "1") -?> (doShift "2"),
         (className =? "Kupfer.py" <&&> resource =? "kupfer.py") -?> doFloat,
         (className =? "Xfce4-appfinder" <&&> resource =? "xfce4-appfinder") -?> doFloatAt 0.1 0.1,
         (isSkipTaskBar -?> doFloat),
@@ -117,7 +118,7 @@ goldenRatio = (toRational (2/(1+sqrt(5)::Double)))
 
 myTitleTheme = defaultTheme {
         fontName = "xft:sans-serif:size=10",
-        decoHeight = 22
+        decoHeight = 24
     }
 
 createLayout name layout =
@@ -160,16 +161,6 @@ myMasterTabbedLayout = createLayout "MTab" $
         resizeDelta = 3/100
         masterRatio = goldenRatio
 
-myImLayout = createLayout "IM" $
-    avoidStruts $
-    noFrillsDeco shrinkText myTitleTheme $
-    withIM rosterRatio roster $
-    myTiledLayout
---- myThreeColLayout -- use this on wider screens
-    where
-        rosterRatio = 1/8
-        roster = (Or (Title "Buddy List") (And (Resource "main") (ClassName "psi")))
-
 myGimpLayout = createLayout "Gimp" $
     avoidStruts $
     withIM (1/6) (Role "gimp-toolbox") $
@@ -187,13 +178,12 @@ referenceAllLayoutsToAvoidErrors =
     myTabbedLayout |||
     myThreeColLayout |||
     myMasterTabbedLayout |||
-    myImLayout |||
     myGimpLayout
 
 
 myLayout =
     (
-        onWorkspace "1" (myImLayout) $
+        onWorkspace "1" (myTabbedLayout ||| myMasterTabbedLayout) $
         onWorkspace "2" (myTabbedLayout ||| myMasterTabbedLayout) $
         onWorkspace "9" (myFullLayout ||| myMasterTabbedLayout ||| myTabbedLayout ||| myTiledLayout ||| myGimpLayout) $
         (myMasterTabbedLayout ||| myTabbedLayout ||| myTiledLayout)