xmonad-contrib-0.17.1: Community-maintained extensions for xmonad

Copyright | (c) David Roundy <droundy@darcs.net>
License | BSD-style (see LICENSE)
Maintainer | none
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Layout.Combo

Contents

- Usage

Description

A layout that combines multiple layouts.

Synopsis

- combineTwo :: (Read a, Eq a, LayoutClass super (), LayoutClass l1 a, LayoutClass l2 a) => super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
- data CombineTwo l l1 l2 a

# Usage

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

    import XMonad.Layout.Combo

and add something like

    combineTwo (TwoPane 0.03 0.5) (tabbed shrinkText def) (tabbed shrinkText def)

to your layouts.

For more detailed instructions on editing the layoutHook see:

XMonad.Doc.Extending

combineTwo is a new simple layout combinator. It allows the combination of two layouts using a third to split the screen between the two, but has the advantage of allowing you to dynamically adjust the layout, in terms of the number of windows in each sublayout. To do this, use XMonad.Layout.WindowNavigation, and add the following key bindings (or something similar):

       , ((modm .|. controlMask .|. shiftMask, xK_Right), sendMessage $ Move R)
       , ((modm .|. controlMask .|. shiftMask, xK_Left ), sendMessage $ Move L)
       , ((modm .|. controlMask .|. shiftMask, xK_Up   ), sendMessage $ Move U)
       , ((modm .|. controlMask .|. shiftMask, xK_Down ), sendMessage $ Move D)

For detailed instruction on editing the key binding see XMonad.Doc.Extending.

These bindings will move a window into the sublayout that is up/down/left/right of its current position. Note that there is some weirdness in combineTwo, in that the mod-tab focus order is not very closely related to the layout order. This is because we're forced to keep track of the window positions separately, and this is ugly. If you don't like this, lobby for hierarchical stacks in core xmonad or go reimplement the core of xmonad yourself.

combineTwo :: (Read a, Eq a, LayoutClass super (), LayoutClass l1 a, LayoutClass l2 a) => super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a Source #

data CombineTwo l l1 l2 a Source #

#### Instances

Instances details

(LayoutClass l (), LayoutClass l1 a, LayoutClass l2 a, Read a, Show a, Eq a, Typeable a) => LayoutClass (CombineTwo (l ()) l1 l2) a Source # |

Instance details

Defined in XMonad.Layout.Combo

Methods

runLayout :: Workspace WorkspaceId (CombineTwo (l ()) l1 l2 a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (CombineTwo (l ()) l1 l2 a)) Source #

doLayout :: CombineTwo (l ()) l1 l2 a -> Rectangle -> Stack a -> X ([(a, Rectangle)], Maybe (CombineTwo (l ()) l1 l2 a)) Source #

pureLayout :: CombineTwo (l ()) l1 l2 a -> Rectangle -> Stack a -> [(a, Rectangle)] Source #

emptyLayout :: CombineTwo (l ()) l1 l2 a -> Rectangle -> X ([(a, Rectangle)], Maybe (CombineTwo (l ()) l1 l2 a)) Source #

handleMessage :: CombineTwo (l ()) l1 l2 a -> SomeMessage -> X (Maybe (CombineTwo (l ()) l1 l2 a)) Source #

pureMessage :: CombineTwo (l ()) l1 l2 a -> SomeMessage -> Maybe (CombineTwo (l ()) l1 l2 a) Source #

description :: CombineTwo (l ()) l1 l2 a -> String Source #

(Read a, Read l, Read (l1 a), Read (l2 a)) => Read (CombineTwo l l1 l2 a) Source # |
Instance details Defined in XMonad.Layout.Combo Methods readsPrec :: Int -> ReadS (CombineTwo l l1 l2 a) Source # readList :: ReadS [CombineTwo l l1 l2 a] Source # readPrec :: ReadPrec (CombineTwo l l1 l2 a) Source # readListPrec :: ReadPrec [CombineTwo l l1 l2 a] Source #
(Show a, Show l, Show (l1 a), Show (l2 a)) => Show (CombineTwo l l1 l2 a) Source # |
Instance details Defined in XMonad.Layout.Combo Methods showsPrec :: Int -> CombineTwo l l1 l2 a -> ShowS Source # show :: CombineTwo l l1 l2 a -> String Source # showList :: [CombineTwo l l1 l2 a] -> ShowS Source #