xmonad-contrib-0.13: Third party extensions for xmonad

Copyright(c) 2010 & 2013 Adam Vogt
2011 Willem Vanlint
LicenseBSD-style (see xmonad/LICENSE)
Safe HaskellNone




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



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 #

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

data TrackFloating a Source #


LayoutModifier TrackFloating Window Source # 
Eq (TrackFloating a) Source # 
Read (TrackFloating a) Source # 
Show (TrackFloating a) Source # 

data UseTransientFor a Source #


LayoutModifier UseTransientFor Window Source # 
Eq (UseTransientFor a) Source # 
Read (UseTransientFor a) Source # 
Show (UseTransientFor a) Source #