xmonad-contrib-0.18.0: Community-maintained extensions for xmonad

Copyright | (c) 2010 & 2013 Adam Vogt 2011 Willem Vanlint
License | BSD-style (see xmonad/LICENSE)
Maintainer | vogt.adam@gmail.com
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Layout.TrackFloating

Contents

- Usage
  - For other layout modifiers
  - Exported types

Description

Provides layout modifier `UseTransientFor`: when a float has focus and is `WM_TRANSIENT_FOR` a tile, run the underlying layout as if that tile had focus.

Synopsis

- trackFloating :: l a -> ModifiedLayout TrackFloating l a
- useTransientFor :: l a -> ModifiedLayout UseTransientFor l a
- type TrackFloating = FocusTracking
- data UseTransientFor a

# Usage

Apply to your layout in a config like:

    main = xmonad (def{
                      layoutHook = trackFloating (useTransientFor
                          (noBorders Full ||| Tall 1 0.3 0.5)),
                      ...
                  })

`useTransientFor` and `trackFloating` can be enabled independently. For example when the floating window sets `WM_TRANSIENT_FOR`, such as libreoffice's file->preferences window, `optionA` will have the last-focused window magnified while `optionB` will result magnify the window that opened the preferences window regardless of which tiled window was focused before.

    import XMonad.Layout.Magnifier
    import XMonad.Layout.TrackFloating

    underlyingLayout = magnifier (Tall 1 0.3 0.5)

    optionA = trackFloating underlyingLayout
    optionB = trackFloating (useTransientFor underlyingLayout)

## For other layout modifiers

It also corrects focus issues for full-like layouts inside other layout modifiers:

    import XMonad.Layout.IM
    import XMonad.Layout.Tabbed
    import XMonad.Layout.TrackFloating
    import XMonad.Layout.Reflect

    gimpLayout = withIM 0.11 (Role "gimp-toolbox") $ reflectHoriz
          $ withIM 0.15 (Role "gimp-dock") (trackFloating simpleTabbed)

Interactions with some layout modifiers (ex. decorations, minimizing) are unknown but likely unpleasant.

trackFloating :: l a -> ModifiedLayout TrackFloating l a Source #

Deprecated: Use X.L.FocusTracking.focusTracking.

Runs another layout with a remembered focus, provided:

- the subset of windows doesn't include the focus in XState
- it was previously run with a subset that included the XState focus
- the remembered focus hasn't since been killed

useTransientFor :: l a -> ModifiedLayout UseTransientFor l a Source #

When focus is on the tiled layer, the underlying layout is run with focus on the window named by the WM_TRANSIENT_FOR property on the floating window.

## Exported types

type TrackFloating = FocusTracking Source #

Deprecated: Use X.L.FocusTracking.FocusTracking.

data UseTransientFor a Source #

#### Instances

Instances details

LayoutModifier UseTransientFor Window Source # |

Instance details

Defined in XMonad.Layout.TrackFloating

Methods

modifyLayout :: LayoutClass l Window => UseTransientFor Window -> Workspace WorkspaceId (l Window) Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (l Window)) Source #

modifyLayoutWithUpdate :: LayoutClass l Window => UseTransientFor Window -> Workspace WorkspaceId (l Window) Window -> Rectangle -> X (([(Window, Rectangle)], Maybe (l Window)), Maybe (UseTransientFor Window)) Source #

handleMess :: UseTransientFor Window -> SomeMessage -> X (Maybe (UseTransientFor Window)) Source #

handleMessOrMaybeModifyIt :: UseTransientFor Window -> SomeMessage -> X (Maybe (Either (UseTransientFor Window) SomeMessage)) Source #

pureMess :: UseTransientFor Window -> SomeMessage -> Maybe (UseTransientFor Window) Source #

redoLayout :: UseTransientFor Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> X ([(Window, Rectangle)], Maybe (UseTransientFor Window)) Source #

pureModifier :: UseTransientFor Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> ([(Window, Rectangle)], Maybe (UseTransientFor Window)) Source #

hook :: UseTransientFor Window -> X () Source #

unhook :: UseTransientFor Window -> X () Source #

modifierDescription :: UseTransientFor Window -> String Source #

modifyDescription :: LayoutClass l Window => UseTransientFor Window -> l Window -> String Source #

Read (UseTransientFor a) Source # |
Instance details Defined in XMonad.Layout.TrackFloating Methods readsPrec :: Int -> ReadS (UseTransientFor a) Source # readList :: ReadS [UseTransientFor a] Source # readPrec :: ReadPrec (UseTransientFor a) Source # readListPrec :: ReadPrec [UseTransientFor a] Source #
Show (UseTransientFor a) Source # |
Instance details Defined in XMonad.Layout.TrackFloating Methods showsPrec :: Int -> UseTransientFor a -> ShowS Source # show :: UseTransientFor a -> String Source # showList :: [UseTransientFor a] -> ShowS Source #
Eq (UseTransientFor a) Source # |
Instance details Defined in XMonad.Layout.TrackFloating Methods (==) :: UseTransientFor a -> UseTransientFor a -> Bool Source # (/=) :: UseTransientFor a -> UseTransientFor a -> Bool Source #