diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 4c500ae5..69ddbdc8 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -56,7 +56,8 @@ main = xmonad $ def , layoutHook = myLayoutHook , logHook = toggleFadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook , handleEventHook = docksEventHook <+> fullscreenEventHook +++ - ewmhDesktopsEventHook +++ pagerHintsEventHook + ewmhDesktopsEventHook +++ pagerHintsEventHook +++ + followIfNoMagicFocus , startupHook = myStartup +++ ewmhWorkspaceNamesLogHook , keys = customKeys (const []) addKeys } where @@ -116,10 +117,12 @@ instance Transformer MyToggles Window where transform GAPS x k = k (smartSpacing 5 x) unmodifyLayout transform MAGICFOCUS x k = k (magicFocus x) unmodifyLayout --- TODO: Figure out how to disable focus follows mouse for magicFocus myToggles = [LIMIT, GAPS, MAGICFOCUS] otherToggles = [NBFULL, MIRROR] +followIfNoMagicFocus = followOnlyIf $ fmap (fromMaybe False . fmap not) $ + isToggleActive MAGICFOCUS + togglesMap = fmap M.fromList $ sequence $ map toggleTuple myToggles ++ map toggleTuple otherToggles where