xmonad-contrib-0.16: Third party extensions for xmonad

Copyright | (c) 2018 L. S. Leary
License | BSD3-style (see LICENSE)
Maintainer | L. S. Leary
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell98

XMonad.Layout.StateFull

Contents

- Usage

Description

Provides StateFull: a stateful form of Full that does not misbehave when floats are focused, and the FocusTracking layout transformer by means of which StateFull is implemented. 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.

Synopsis

- pattern StateFull :: FocusTracking Full a
- type StateFull = FocusTracking Full
- data FocusTracking l a = FocusTracking (Maybe a) (l a)
- focusTracking :: l a -> FocusTracking l a

# Usage

To use it, first you need to:

    import XMonad.Layout.StateFull

Then to toggle your tiled layout with `StateFull`, you can do:

    main = xmonad def { layoutHook = someTiledLayout ||| StateFull }

Or, some child layout that depends on focus information can be made to fall back on the last focus it had:

    main = xmonad def
     { layoutHook = someParentLayoutWith aChild (focusTracking anotherChild) }

pattern StateFull :: FocusTracking Full a Source #

A pattern synonym for the primary use case of the `FocusTracking` transformer; using `Full`.

type StateFull = FocusTracking Full Source #

A type synonym to match the `StateFull` pattern synonym.

data FocusTracking l a Source #

The `FocusTracking` data type for which the `LayoutClass` instance is provided.

Constructors

FocusTracking (Maybe a) (l a) |

#### Instances

Instances details

LayoutClass l Window => LayoutClass (FocusTracking l) Window Source # |

Instance details

Defined in XMonad.Layout.StateFull

Methods

runLayout :: Workspace WorkspaceId (FocusTracking l Window) Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (FocusTracking l Window)) Source #

doLayout :: FocusTracking l Window -> Rectangle -> Stack Window -> X ([(Window, Rectangle)], Maybe (FocusTracking l Window)) Source #

pureLayout :: FocusTracking l Window -> Rectangle -> Stack Window -> [(Window, Rectangle)] Source #

emptyLayout :: FocusTracking l Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (FocusTracking l Window)) Source #

handleMessage :: FocusTracking l Window -> SomeMessage -> X (Maybe (FocusTracking l Window)) Source #

pureMessage :: FocusTracking l Window -> SomeMessage -> Maybe (FocusTracking l Window) Source #

description :: FocusTracking l Window -> String Source #

(Read a, Read (l a)) => Read (FocusTracking l a) Source # |
Instance details Defined in XMonad.Layout.StateFull Methods readsPrec :: Int -> ReadS (FocusTracking l a) # readList :: ReadS [FocusTracking l a] # readPrec :: ReadPrec (FocusTracking l a) readListPrec :: ReadPrec [FocusTracking l a]
(Show a, Show (l a)) => Show (FocusTracking l a) Source # |
Instance details Defined in XMonad.Layout.StateFull Methods showsPrec :: Int -> FocusTracking l a -> ShowS # show :: FocusTracking l a -> String # showList :: [FocusTracking l a] -> ShowS #

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

Transform a layout into one that remembers and uses its last focus.