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
|