| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
Description | ||||||||||||||||||||||||||||||||
A layout combinator that allows layouts to be nested. | ||||||||||||||||||||||||||||||||
Synopsis | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
Usage | ||||||||||||||||||||||||||||||||
You can use this module with the following in your ~/.xmonad/xmonad.hs: import XMonad.Layout.SubLayouts import XMonad.Layout.WindowNavigation Using XMonad.Layout.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: myLayout = windowNavigation $ subTabbed $ boringWindows $ Tall 1 (3/100) (1/2) ||| etc.. main = xmonad defaultConfig { layoutHook = myLayout } 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: , ((modm .|. controlMask, xK_h), sendMessage $ pullGroup L) , ((modm .|. controlMask, xK_l), sendMessage $ pullGroup R) , ((modm .|. controlMask, xK_k), sendMessage $ pullGroup U) , ((modm .|. controlMask, xK_j), sendMessage $ pullGroup D) , ((modm .|. controlMask, xK_m), withFocused (sendMessage . MergeAll)) , ((modm .|. controlMask, xK_u), withFocused (sendMessage . UnMerge)) , ((modm .|. controlMask, xK_period), onGroup W.focusUp') , ((modm .|. 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. , ((modm, xK_j), focusDown) , ((modm, 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: | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
The main layout modifier arguments: subLayout advanceInnerLayouts innerLayout outerLayout
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 is a use of subLayout with addTabs to show decorations. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
pullGroup, pushGroup allow you to merge windows or groups inheriting the position of the current window (pull) or the other window (push). pushWindow and pullWindow move individual windows between groups. They are less effective at preserving window positions. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
Apply a function on the stack belonging to the currently focused group. It works for rearranging windows and for changing focus. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
Send a message to the currently focused sublayout. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
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') | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||||
Screenshots | ||||||||||||||||||||||||||||||||
Larger version: http://haskell.org/sitewiki/images/8/8b/Xmonad-SubLayouts-xinerama.png | ||||||||||||||||||||||||||||||||
Todo | ||||||||||||||||||||||||||||||||
Issue 288 XMonad.Layout.ResizableTile assumes that its environment contains only the windows it is running: sublayouts are currently run with the stack containing only the windows passed to it in its environment, but any changes that the layout makes are not merged back. Should the behavior be made optional? Features
SimpleTabbed as a 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 horribly when used as subLayouts:
| ||||||||||||||||||||||||||||||||
Produced by Haddock version 2.6.1 |