Copyright | (c) 2010 & 2013 Adam Vogt 2011 Willem Vanlint 2018 & 2022 L.S.Leary |
---|---|
License | BSD-style (see xmonad/LICENSE) |
Maintainer | @LSLeary (on github) |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell2010 |
FocusTracking simply holds onto the last true focus it was given and continues to use it as the focus for the transformed layout until it sees another. It can be used to improve the behaviour of a child layout that has not been given the focused window, or equivalently, that of the layout itself when a float has focus.
Relevant issues:
- http://code.google.com/p/xmonad/issues/detail?id=4
- http://code.google.com/p/xmonad/issues/detail?id=306
- -------------------------------------------------------------------------------
Synopsis
- newtype FocusTracking a = FocusTracking (Maybe Window)
- focusTracking :: l a -> ModifiedLayout FocusTracking l a
Usage
To use the module, first import it:
import XMonad.Layout.FocusTracking
Then, a focus-dependent layout can be made to fall back on the last focus it saw, for example:
main = xmonad def { layoutHook = someParentLayoutWith aChild (focusTracking anotherChild) , ... }
Or in a simpler case:
main = xmonad def { layoutHook = myTiledLayout ||| focusTracking Full , ... }
newtype FocusTracking a Source #
A LayoutModifier
that remembers the last focus it saw.
Instances
focusTracking :: l a -> ModifiedLayout FocusTracking l a Source #
Transform a layout into one that remembers and uses the last focus it saw.