[XMonad] Disable focus follows mouse when magic foucus is active
This commit is contained in:
parent
35b5405ef7
commit
b7afda3c4c
@ -56,7 +56,8 @@ main = xmonad $ def
|
|||||||
, layoutHook = myLayoutHook
|
, layoutHook = myLayoutHook
|
||||||
, logHook = toggleFadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook
|
, logHook = toggleFadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook
|
||||||
, handleEventHook = docksEventHook <+> fullscreenEventHook +++
|
, handleEventHook = docksEventHook <+> fullscreenEventHook +++
|
||||||
ewmhDesktopsEventHook +++ pagerHintsEventHook
|
ewmhDesktopsEventHook +++ pagerHintsEventHook +++
|
||||||
|
followIfNoMagicFocus
|
||||||
, startupHook = myStartup +++ ewmhWorkspaceNamesLogHook
|
, startupHook = myStartup +++ ewmhWorkspaceNamesLogHook
|
||||||
, keys = customKeys (const []) addKeys
|
, keys = customKeys (const []) addKeys
|
||||||
} where
|
} where
|
||||||
@ -116,10 +117,12 @@ instance Transformer MyToggles Window where
|
|||||||
transform GAPS x k = k (smartSpacing 5 x) unmodifyLayout
|
transform GAPS x k = k (smartSpacing 5 x) unmodifyLayout
|
||||||
transform MAGICFOCUS x k = k (magicFocus 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]
|
myToggles = [LIMIT, GAPS, MAGICFOCUS]
|
||||||
otherToggles = [NBFULL, MIRROR]
|
otherToggles = [NBFULL, MIRROR]
|
||||||
|
|
||||||
|
followIfNoMagicFocus = followOnlyIf $ fmap (fromMaybe False . fmap not) $
|
||||||
|
isToggleActive MAGICFOCUS
|
||||||
|
|
||||||
togglesMap = fmap M.fromList $ sequence $
|
togglesMap = fmap M.fromList $ sequence $
|
||||||
map toggleTuple myToggles ++ map toggleTuple otherToggles
|
map toggleTuple myToggles ++ map toggleTuple otherToggles
|
||||||
where
|
where
|
||||||
|
Loading…
Reference in New Issue
Block a user