xmonad-contrib-0.18.1: Community-maintained extensions for xmonad
Copyright(c) 2010 & 2013 Adam Vogt
2011 Willem Vanlint
2018 & 2022 L.S.Leary
LicenseBSD-style (see xmonad/LICENSE)
Maintainer@LSLeary (on github)
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Layout.FocusTracking

Contents

Description

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:

Synopsis

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.

Constructors

FocusTracking (Maybe Window) 

Instances

Instances details
LayoutModifier FocusTracking Window Source # 
Instance details

Defined in XMonad.Layout.FocusTracking

Read (FocusTracking a) Source # 
Instance details

Defined in XMonad.Layout.FocusTracking

Show (FocusTracking a) Source # 
Instance details

Defined in XMonad.Layout.FocusTracking

focusTracking :: l a -> ModifiedLayout FocusTracking l a Source #

Transform a layout into one that remembers and uses the last focus it saw.