xmonad-contrib-bluetilebranch- Third party extensions for xmonadSource codeContentsIndex
A layout combinator that allows layouts to be nested.
subLayout :: [Int] -> subl a -> l a -> ModifiedLayout (Sublayout subl) l a
subTabbed :: (Eq a, LayoutModifier (Sublayout Simplest) a, LayoutClass l a) => l a -> ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) (ModifiedLayout (Sublayout Simplest) l) a
pushGroup :: Direction -> Navigate
pullGroup :: Direction -> Navigate
pushWindow :: Direction -> Navigate
pullWindow :: Direction -> Navigate
onGroup :: (Stack Window -> Stack Window) -> X ()
toSubl :: Message a => a -> X ()
mergeDir :: (Stack Window -> Stack Window) -> Window -> GroupMsg Window
data GroupMsg a
= UnMerge a
| UnMergeAll a
| Merge a a
| MergeAll a
| WithGroup (Stack a -> X (Stack a)) a
| SubMessage SomeMessage a
data Broadcast = Broadcast SomeMessage
defaultSublMap :: XConfig l -> Map (KeyMask, KeySym) (X ())

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

 import XMonad.Layout.SubLayouts
 import XMonad.Layout.WindowNavigation

Using BoringWindows is optional and it allows you to add a keybinding to skip over the non-visible windows.

 import XMonad.Layout.BoringWindows

Then edit your layoutHook by adding the subTabbed layout modifier:

 myLayouts = windowNavigation $ subTabbed $ boringWindows $
                        Tall 1 (3/100) (1/2) ||| etc..
 main = xmonad defaultConfig { layoutHook = myLayouts }

XMonad.Layout.WindowNavigation is used to specify which windows to merge, and it is not integrated into the modifier because it can be configured, and works best as the outer modifier.

Then to your keybindings add:

 , ((modMask .|. controlMask, xK_h), sendMessage $ pullGroup L)
 , ((modMask .|. controlMask, xK_l), sendMessage $ pullGroup R)
 , ((modMask .|. controlMask, xK_k), sendMessage $ pullGroup U)
 , ((modMask .|. controlMask, xK_j), sendMessage $ pullGroup D)

 , ((modMask .|. controlMask, xK_m), withFocused (sendMessage . MergeAll))
 , ((modMask .|. controlMask, xK_u), withFocused (sendMessage . UnMerge))

 , ((modMask .|. controlMask, xK_period), onGroup W.focusUp')
 , ((modMask .|. controlMask, xK_comma), onGroup W.focusDown')

These additional keybindings require the optional XMonad.Layout.BoringWindows layoutModifier. The focus will skip over the windows that are not focused in each sublayout.

 , ((modMask, xK_j), focusDown)
 , ((modMask, xK_k), focusUp)

A submap can be used to make modifying the sublayouts using onGroup and toSubl simpler:

 ,((modm, xK_s), submap $ defaultSublMap conf)

NOTE: is there some reason that asks config >>= submap . defaultSublMap could not be used in the keybinding instead? It avoids having to explicitly pass the conf.

For more detailed instructions, see:

XMonad.Doc.Extending XMonad.Doc.Extending

subLayout :: [Int] -> subl a -> l a -> ModifiedLayout (Sublayout subl) l aSource

The main layout modifier arguments:

When a new group is formed, use the layout sl after skipping that number of layouts. Specify a finite list and groups that do not have a corresponding index get the first choice in sls
The single layout given to be run as a sublayout.
The layout that determines the rectangles that the groups get.

Ex. The second group is Tall, the third is Circle, all others are tabbed with:

 myLayout = addTabs shrinkText defaultTheme
          $ subLayout [0,1,2] (Simplest ||| Tall 1 0.2 0.5 ||| Circle)
          $ Tall 1 0.2 0.5 ||| Full
subTabbed :: (Eq a, LayoutModifier (Sublayout Simplest) a, LayoutClass l a) => l a -> ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) (ModifiedLayout (Sublayout Simplest) l) aSource
subLayout but use addTabs to add decorations.
pushGroup :: Direction -> NavigateSource
pullGroup :: Direction -> NavigateSource
pullGroup, pushGroup allow you to merge windows or groups inheriting the position of the current window (pull) or the other window (push).
pushWindow :: Direction -> NavigateSource
pullWindow :: Direction -> NavigateSource
onGroup :: (Stack Window -> Stack Window) -> X ()Source
Apply a function on the stack belonging to the currently focused group. It works for rearranging windows and for changing focus.
toSubl :: Message a => a -> X ()Source
Send a message to the currently focused sublayout.
mergeDir :: (Stack Window -> Stack Window) -> Window -> GroupMsg WindowSource
merge the window that would be focused by the function when applied to the W.Stack of all windows, with the current group removed. The given window should be focused by a sublayout. Example usage: withFocused (sendMessage . mergeDir W.focusDown')
data GroupMsg a Source
GroupMsg take window parameters to determine which group the action should be applied to
UnMerge afree the focused window from its tab stack
UnMergeAll aseparate the focused group into singleton groups
Merge a amerge the first group into the second group
MergeAll amake one large group, keeping a focused
WithGroup (Stack a -> X (Stack a)) a
SubMessage SomeMessage athe sublayout with the given window will get the message
show/hide Instances
data Broadcast Source
Broadcast SomeMessagesend a message to all sublayouts
show/hide Instances
defaultSublMap :: XConfig l -> Map (KeyMask, KeySym) (X ())Source
defaultSublMap is an attempt to create a set of keybindings like the defaults ones but to be used as a submap for sending messages to the sublayout.

subTabbed works well, but it would be more uniform to avoid the use of addTabs, with the sublayout being Simplest (but XMonad.Layout.Tabbed.simpleTabbed is this...). The only thing to be gained by fixing this issue is the ability to mix and match decoration styles. Better compatibility with some other layouts of which I am not aware could be another benefit.

simpleTabbed (and other decorated layouts) fail horibly when used as subLayouts:

  • decorations stick around: layout is run after being told to Hide
  • mouse events do not change focus: the group-ungroup does not respect the focus changes it wants?
  • sending ReleaseResources before running it makes xmonad very slow, and still leaves borders sticking around

Issue 288: XMonad.Layout.ResizableTile assumes that its environment contains only the windows it is running: should sublayouts be run in a restricted environment that is then merged back?

Produced by Haddock version 2.4.2