xmonad-contrib-0.13: Third party extensions for xmonad

Copyright | (c) 2014 Anders Engstrom <ankaan@gmail.com>
License | BSD3-style (see LICENSE)
Maintainer | (c) Anders Engstrom <ankaan@gmail.com>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell98

XMonad.Layout.AvoidFloats

Contents

- Usage

Description

Find a maximum empty rectangle around floating windows and use that area to display non-floating windows.

Synopsis

- avoidFloats :: l a -> ModifiedLayout AvoidFloats l a
- avoidFloats' :: Int -> Int -> Bool -> l a -> ModifiedLayout AvoidFloats l a
- data AvoidFloatMsg
  - = AvoidFloatToggle
  - | AvoidFloatSet Bool
  - | AvoidFloatClearItems
- data AvoidFloatItemMsg a
  - = AvoidFloatAddItem a
  - | AvoidFloatRemoveItem a
  - | AvoidFloatToggleItem a

# Usage

You can use this module with the following in your ~/.xmonad/xmonad.hs file:

    import XMonad.Layout.AvoidFloats

and modify the layouts to call avoidFloats on the layouts where you want the non-floating windows to not be behind floating windows.

    layoutHook = ... ||| avoidFloats Full ||| ...

For more detailed instructions on editing the layoutHook see: XMonad.Doc.Extending

Then add appropriate key bindings, for example:

    ,((modm .|. shiftMask, xK_b), sendMessage AvoidFloatToggle)
    ,((modm .|. controlMask, xK_b), withFocused $ sendMessage . AvoidFloatToggleItem)
    ,((modm .|. shiftMask .|. controlMask, xK_b), sendMessage (AvoidFloatSet False) >> sendMessage AvoidFloatClearItems)

For detailed instructions on editing your key bindings, see XMonad.Doc.Extending.

Note that this module is incompatible with an old way of configuring XMonad.Actions.FloatSnap. If you are having problems, please update your configuration.

avoidFloats #

Arguments

:: l a | Layout to modify.
-> ModifiedLayout AvoidFloats l a |

Avoid floating windows unless the resulting area for windows would be too small. In that case, use the whole screen as if this layout modifier wasn't there. No windows are avoided by default, they need to be added using signals.

avoidFloats' #

Arguments

:: Int | Minimum width of the area used for non-floating windows.
-> Int | Minimum height of the area used for non-floating windows.
-> Bool | If floating windows should be avoided by default.
-> l a | Layout to modify.
-> ModifiedLayout AvoidFloats l a |

Avoid floating windows unless the resulting area for windows would be too small. In that case, use the whole screen as if this layout modifier wasn't there.

data AvoidFloatMsg #

Change the state of the whole avoid float layout modifier.

Constructors

AvoidFloatToggle | Toggle between avoiding all or only selected.
AvoidFloatSet Bool | Set if all all floating windows should be avoided.
AvoidFloatClearItems | Clear the set of windows to specifically avoid.

Instances

Message AvoidFloatMsg # |

data AvoidFloatItemMsg a #

Change the state of the avoid float layout modifier conserning a specific window.

Constructors

AvoidFloatAddItem a | Add a window to always avoid.
AvoidFloatRemoveItem a | Stop always avoiding selected window.
AvoidFloatToggleItem a | Toggle between always avoiding selected window.

Instances

Typeable * a => Message (AvoidFloatItemMsg a) # |