xmonad-contrib-0.15: 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 :: forall a. 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 :: forall a. FocusTracking Full a #

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

type StateFull = FocusTracking Full #

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

data FocusTracking l a #

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

Constructors

FocusTracking (Maybe a) (l a) |

Instances

LayoutClass l Window => LayoutClass (FocusTracking l) Window # |
Instance details Defined in XMonad.Layout.StateFull Methods runLayout :: Workspace WorkspaceId (FocusTracking l Window) Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (FocusTracking l Window)) # doLayout :: FocusTracking l Window -> Rectangle -> Stack Window -> X ([(Window, Rectangle)], Maybe (FocusTracking l Window)) # pureLayout :: FocusTracking l Window -> Rectangle -> Stack Window -> [(Window, Rectangle)] # emptyLayout :: FocusTracking l Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (FocusTracking l Window)) # handleMessage :: FocusTracking l Window -> SomeMessage -> X (Maybe (FocusTracking l Window)) # pureMessage :: FocusTracking l Window -> SomeMessage -> Maybe (FocusTracking l Window) # description :: FocusTracking l Window -> String #
(Read a, Read (l a)) => Read (FocusTracking l a) # |
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) # |
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 #

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