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

Copyright | (c) Konstantin Sobolev <konstantin.sobolev@gmail.com>
License | BSD-style (see LICENSE)
Maintainer | Konstantin Sobolev <konstantin.sobolev@gmail.com>
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Layout.ComboP

Contents

- Usage

Description

A layout that combines multiple layouts and allows to specify where to put new windows.

Synopsis

- combineTwoP :: (LayoutClass super (), LayoutClass l1 Window, LayoutClass l2 Window) => super () -> l1 Window -> l2 Window -> Property -> CombineTwoP (super ()) l1 l2 Window
- data CombineTwoP l l1 l2 a
- data SwapWindow
  - = SwapWindow
  - | SwapWindowN Int
- data PartitionWins = PartitionWins
- data Property
  - = Title String
  - | ClassName String
  - | Resource String
  - | Role String
  - | Machine String
  - | And Property Property
  - | Or Property Property
  - | Not Property
  - | Const Bool
  - | Tagged String

# Usage

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

    import XMonad.Layout.ComboP

and add something like

    combineTwoP (TwoPane 0.03 0.5) (tabbed shrinkText def) (tabbed shrinkText def) (ClassName "Firefox")

to your layouts. This way all windows with class = "Firefox" will always go to the left pane, all others - to the right.

For more detailed instructions on editing the layoutHook see the tutorial and XMonad.Doc.Extending.

`combineTwoP` is a simple layout combinator based on `combineTwo` from Combo, with addition of a `Property` which tells where to put new windows. Windows mathing the property will go into the first part, all others will go into the second part. It supports `Move` messages as `combineTwo` does, but it also introduces `SwapWindow` message which sends focused window to the other part. It is required because `Move` commands don't work when one of the parts is empty. To use it, import "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)
       , ((modm .|. controlMask .|. shiftMask, xK_s    ), sendMessage $ SwapWindow)

For detailed instruction on editing the key binding see the tutorial.

combineTwoP :: (LayoutClass super (), LayoutClass l1 Window, LayoutClass l2 Window) => super () -> l1 Window -> l2 Window -> Property -> CombineTwoP (super ()) l1 l2 Window Source #

data CombineTwoP l l1 l2 a Source #

#### Instances

Instances details

(LayoutClass l (), LayoutClass l1 Window, LayoutClass l2 Window) => LayoutClass (CombineTwoP (l ()) l1 l2) Window Source # |

Instance details

Defined in XMonad.Layout.ComboP

Methods

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

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

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

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

handleMessage :: CombineTwoP (l ()) l1 l2 Window -> SomeMessage -> X (Maybe (CombineTwoP (l ()) l1 l2 Window)) Source #

pureMessage :: CombineTwoP (l ()) l1 l2 Window -> SomeMessage -> Maybe (CombineTwoP (l ()) l1 l2 Window) Source #

description :: CombineTwoP (l ()) l1 l2 Window -> String Source #

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

data SwapWindow Source #

Constructors

SwapWindow | Swap window between panes
SwapWindowN Int | Swap window between panes in the N-th nested ComboP. `SwapWindowN 0` equals to SwapWindow

#### Instances

Instances details

Read SwapWindow Source # |
Instance details Defined in XMonad.Layout.ComboP Methods readsPrec :: Int -> ReadS SwapWindow Source # readList :: ReadS [SwapWindow] Source # readPrec :: ReadPrec SwapWindow Source # readListPrec :: ReadPrec [SwapWindow] Source #
Show SwapWindow Source # |
Instance details Defined in XMonad.Layout.ComboP Methods showsPrec :: Int -> SwapWindow -> ShowS Source # show :: SwapWindow -> String Source # showList :: [SwapWindow] -> ShowS Source #
Message SwapWindow Source # |
Instance details Defined in XMonad.Layout.ComboP

data PartitionWins Source #

Constructors

PartitionWins | Reset the layout and partition all windows into the correct sub-layout. Useful for when window properties have changed and you want ComboP to update which layout a window belongs to.

#### Instances

Instances details

Read PartitionWins Source # |
Instance details Defined in XMonad.Layout.ComboP Methods readsPrec :: Int -> ReadS PartitionWins Source # readList :: ReadS [PartitionWins] Source # readPrec :: ReadPrec PartitionWins Source # readListPrec :: ReadPrec [PartitionWins] Source #
Show PartitionWins Source # |
Instance details Defined in XMonad.Layout.ComboP Methods showsPrec :: Int -> PartitionWins -> ShowS Source # show :: PartitionWins -> String Source # showList :: [PartitionWins] -> ShowS Source #
Message PartitionWins Source # |
Instance details Defined in XMonad.Layout.ComboP

data Property Source #

Most of the property constructors are quite self-explaining.

Constructors

Title String |
ClassName String |
Resource String |
Role String | WM_WINDOW_ROLE property
Machine String | WM_CLIENT_MACHINE property
And Property Property infixr 9 |
Or Property Property infixr 8 |
Not Property |
Const Bool |
Tagged String | Tagged via XMonad.Actions.TagWindows

#### Instances

Instances details

Read Property Source # |
Instance details Defined in XMonad.Util.WindowProperties Methods readsPrec :: Int -> ReadS Property Source # readList :: ReadS [Property] Source # readPrec :: ReadPrec Property Source # readListPrec :: ReadPrec [Property] Source #
Show Property Source # |
Instance details Defined in XMonad.Util.WindowProperties Methods showsPrec :: Int -> Property -> ShowS Source # show :: Property -> String Source # showList :: [Property] -> ShowS Source #
Predicate Property Window Source # |
Instance details Defined in XMonad.Layout.LayoutBuilder Methods alwaysTrue :: Proxy Window -> Property Source # checkPredicate :: Property -> Window -> X Bool Source #