XMonad.Layout.TrackFloating

xmonad-contrib-0.15: Third party 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 | None
Language | Haskell98

XMonad.Layout.TrackFloating

Contents

- Usage
  - For other layout modifiers
  - Exported types

Description

Layout modifier that tracks focus in the tiled layer while the floating layer is in use. This is particularly helpful for tiled layouts where the focus determines what is visible.

The relevant bugs are Issue 4 and 306: http://code.google.com/p/xmonad/issues/detail?id=4, http://code.google.com/p/xmonad/issues/detail?id=306

Synopsis

- trackFloating :: l a -> ModifiedLayout TrackFloating l a
- useTransientFor :: l a -> ModifiedLayout UseTransientFor l a
- data TrackFloating a
- 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 #

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 #

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

data TrackFloating a #

Instances

LayoutModifier TrackFloating Window # |
Instance details Defined in XMonad.Layout.TrackFloating Methods modifyLayout :: LayoutClass l Window => TrackFloating Window -> Workspace WorkspaceId (l Window) Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (l Window)) # modifyLayoutWithUpdate :: LayoutClass l Window => TrackFloating Window -> Workspace WorkspaceId (l Window) Window -> Rectangle -> X (([(Window, Rectangle)], Maybe (l Window)), Maybe (TrackFloating Window)) # handleMess :: TrackFloating Window -> SomeMessage -> X (Maybe (TrackFloating Window)) # handleMessOrMaybeModifyIt :: TrackFloating Window -> SomeMessage -> X (Maybe (Either (TrackFloating Window) SomeMessage)) # pureMess :: TrackFloating Window -> SomeMessage -> Maybe (TrackFloating Window) # redoLayout :: TrackFloating Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> X ([(Window, Rectangle)], Maybe (TrackFloating Window)) # pureModifier :: TrackFloating Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> ([(Window, Rectangle)], Maybe (TrackFloating Window)) # hook :: TrackFloating Window -> X () # unhook :: TrackFloating Window -> X () # modifierDescription :: TrackFloating Window -> String # modifyDescription :: LayoutClass l Window => TrackFloating Window -> l Window -> String #
Eq (TrackFloating a) # |
Instance details Defined in XMonad.Layout.TrackFloating Methods (==) :: TrackFloating a -> TrackFloating a -> Bool # (/=) :: TrackFloating a -> TrackFloating a -> Bool #
Read (TrackFloating a) # |
Instance details Defined in XMonad.Layout.TrackFloating Methods readsPrec :: Int -> ReadS (TrackFloating a) # readList :: ReadS [TrackFloating a] # readPrec :: ReadPrec (TrackFloating a) # readListPrec :: ReadPrec [TrackFloating a] #
Show (TrackFloating a) # |
Instance details Defined in XMonad.Layout.TrackFloating Methods showsPrec :: Int -> TrackFloating a -> ShowS # show :: TrackFloating a -> String # showList :: [TrackFloating a] -> ShowS #

data UseTransientFor a #

Instances

LayoutModifier UseTransientFor Window # |
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)) # modifyLayoutWithUpdate :: LayoutClass l Window => UseTransientFor Window -> Workspace WorkspaceId (l Window) Window -> Rectangle -> X (([(Window, Rectangle)], Maybe (l Window)), Maybe (UseTransientFor Window)) # handleMess :: UseTransientFor Window -> SomeMessage -> X (Maybe (UseTransientFor Window)) # handleMessOrMaybeModifyIt :: UseTransientFor Window -> SomeMessage -> X (Maybe (Either (UseTransientFor Window) SomeMessage)) # pureMess :: UseTransientFor Window -> SomeMessage -> Maybe (UseTransientFor Window) # redoLayout :: UseTransientFor Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> X ([(Window, Rectangle)], Maybe (UseTransientFor Window)) # pureModifier :: UseTransientFor Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> ([(Window, Rectangle)], Maybe (UseTransientFor Window)) # hook :: UseTransientFor Window -> X () # unhook :: UseTransientFor Window -> X () # modifierDescription :: UseTransientFor Window -> String # modifyDescription :: LayoutClass l Window => UseTransientFor Window -> l Window -> String #
Eq (UseTransientFor a) # |
Instance details Defined in XMonad.Layout.TrackFloating Methods (==) :: UseTransientFor a -> UseTransientFor a -> Bool # (/=) :: UseTransientFor a -> UseTransientFor a -> Bool #
Read (UseTransientFor a) # |
Instance details Defined in XMonad.Layout.TrackFloating Methods readsPrec :: Int -> ReadS (UseTransientFor a) # readList :: ReadS [UseTransientFor a] # readPrec :: ReadPrec (UseTransientFor a) # readListPrec :: ReadPrec [UseTransientFor a] #
Show (UseTransientFor a) # |
Instance details Defined in XMonad.Layout.TrackFloating Methods showsPrec :: Int -> UseTransientFor a -> ShowS # show :: UseTransientFor a -> String # showList :: [UseTransientFor a] -> ShowS #