mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
The links were broken due to: 1. Incorrect quotes (' instead of " for module links and occasionally vice-versa). 2. Changes in the name of the "target" module not reflected in the "source" docs. 3. Typos to begin with. 4. Use of `<foo>` in the docs is rendered as just `foo` with a link to `/foo`. 5. Similarly for `"Foo"` if it starts with a capital letter (and hence could be a module). 6. Markup inside `@` code blocks still being applied. e.g. `@M-<arrow-keys>@` is rendered as `M-arrow-keys` with a spurious hyperlink from arrow-keys to `/arrow-keys`, which is confusing. Three links from XMonad.Util.Run have been removed outright, since they're no longer examples of the usage of 'runProcessWithInput'. WmiiActions has been gone since 2008, while XMonad.Prompt.Directory and XMonad.Layout.WorkspaceDir haven't been using 'runProcessWithInput' since 2020 and 2012, respectively. In some cases the `<foo>` were surrounded with @, especially in the case of key definitions, for consistency. (This wasn't done everywhere, because it looks ugly in the source.) MoreManageHelpers has never been in xmonad-contrib. ManageHelpers seems to fill the expected role. In the case of the module description for X.H.ManageDebug the quotes were simply removed because none of the likely options to make the link work were successful.
162 lines
6.5 KiB
Haskell
162 lines
6.5 KiB
Haskell
-----------------------------------------------------------------------------
|
|
-- |
|
|
-- Module : XMonad.Layout.LayoutCombinators
|
|
-- Description : Easily combine multiple layouts into one composite layout.
|
|
-- Copyright : (c) David Roundy <droundy@darcs.net>
|
|
-- License : BSD
|
|
--
|
|
-- Maintainer : none
|
|
-- Stability : unstable
|
|
-- Portability : portable
|
|
--
|
|
-- The "XMonad.Layout.LayoutCombinators" module provides combinators
|
|
-- for easily combining multiple layouts into one composite layout.
|
|
-----------------------------------------------------------------------------
|
|
|
|
module XMonad.Layout.LayoutCombinators
|
|
( -- * Usage
|
|
-- $usage
|
|
|
|
-- * Layout combinators
|
|
-- $combine
|
|
|
|
-- ** Combinators using DragPane vertical
|
|
-- $dpv
|
|
(*||*), (**||*),(***||*),(****||*),(***||**),(****||***)
|
|
, (***||****),(*||****),(**||***),(*||***),(*||**)
|
|
|
|
-- ** Combinators using DragPane horizontal
|
|
-- $dph
|
|
, (*//*), (**//*),(***//*),(****//*),(***//**),(****//***)
|
|
, (***//****),(*//****),(**//***),(*//***),(*//**)
|
|
|
|
-- ** Combinators using Tall (vertical)
|
|
-- $tv
|
|
, (*|*), (**|*),(***|*),(****|*),(***|**),(****|***)
|
|
, (***|****),(*|****),(**|***),(*|***),(*|**)
|
|
|
|
-- ** Combinators using Mirror Tall (horizontal)
|
|
-- $mth
|
|
, (*/*), (**/*),(***/*),(****/*),(***/**),(****/***)
|
|
, (***/****),(*/****),(**/***),(*/***),(*/**)
|
|
|
|
-- * Re-exports for backwards compatibility
|
|
, (|||)
|
|
, JumpToLayout(..)
|
|
, NewSelect
|
|
) where
|
|
|
|
import XMonad
|
|
import XMonad.Layout.Combo
|
|
import XMonad.Layout.DragPane
|
|
|
|
-- $usage
|
|
-- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@:
|
|
--
|
|
-- > import XMonad.Layout.LayoutCombinators
|
|
--
|
|
-- Then edit your @layoutHook@ to use the new layout combinators. For
|
|
-- example:
|
|
--
|
|
-- > myLayout = (Tall 1 (3/100) (1/2) *//* Full) ||| (Tall 1 (3/100) (1/2) ***||** Full) ||| Full ||| etc..
|
|
-- > main = xmonad def { layoutHook = myLayout }
|
|
--
|
|
-- For more detailed instructions on editing the @layoutHook@ see
|
|
-- <https://xmonad.org/TUTORIAL.html#customizing-xmonad the tutorial> and
|
|
-- "XMonad.Doc.Extending#Editing_the_layout_hook".
|
|
--
|
|
|
|
-- $combine
|
|
-- Each of the following combinators combines two layouts into a
|
|
-- single composite layout by splitting the screen into two regions,
|
|
-- one governed by each layout. Asterisks in the combinator names
|
|
-- denote the relative amount of screen space given to the respective
|
|
-- layouts. For example, the '***||*' combinator gives three times as
|
|
-- much space to the left-hand layout as to the right-hand layout.
|
|
|
|
infixr 6 *||*, **||*, ***||*, ****||*, ***||**, ****||***, ***||****, *||****, **||***, *||***, *||**,
|
|
*//*, **//*, ***//*, ****//*, ***//**, ****//***, ***//****, *//****, **//***, *//***, *//**,
|
|
*|* , **|* , ***|* , ****|* , ***|** , ****|*** , ***|**** , *|**** , **|*** , *|*** , *|** ,
|
|
*/* , **/* , ***/* , ****/* , ***/** , ****/*** , ***/**** , */**** , **/*** , */*** , */**
|
|
|
|
-- $dpv
|
|
-- These combinators combine two layouts using "XMonad.Layout.DragPane" in
|
|
-- vertical mode.
|
|
|
|
(*||*),(**||*),(***||*),(****||*), (***||**),(****||***),
|
|
(***||****),(*||****),(**||***),(*||***),(*||**) :: (Read a, Eq a, LayoutClass l1 a, LayoutClass l2 a) =>
|
|
l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
|
|
|
|
(*||*) = combineTwo (dragPane Vertical 0.1 (1/2))
|
|
(**||*) = combineTwo (dragPane Vertical 0.1 (2/3))
|
|
(***||*) = combineTwo (dragPane Vertical 0.1 (3/4))
|
|
(****||*) = combineTwo (dragPane Vertical 0.1 (4/5))
|
|
(***||**) = combineTwo (dragPane Vertical 0.1 (3/5))
|
|
(****||***) = combineTwo (dragPane Vertical 0.1 (4/7))
|
|
(***||****) = combineTwo (dragPane Vertical 0.1 (3/7))
|
|
(*||****) = combineTwo (dragPane Vertical 0.1 (1/5))
|
|
(**||***) = combineTwo (dragPane Vertical 0.1 (2/5))
|
|
(*||***) = combineTwo (dragPane Vertical 0.1 (1/4))
|
|
(*||**) = combineTwo (dragPane Vertical 0.1 (1/3))
|
|
|
|
-- $dph
|
|
-- These combinators combine two layouts using "XMonad.Layout.DragPane" in
|
|
-- horizontal mode.
|
|
|
|
(*//*),(**//*),(***//*),(****//*), (***//**),(****//***),
|
|
(***//****),(*//****),(**//***),(*//***),(*//**) :: (Read a, Eq a, LayoutClass l1 a, LayoutClass l2 a) =>
|
|
l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
|
|
|
|
(*//*) = combineTwo (dragPane Horizontal 0.1 (1/2))
|
|
(**//*) = combineTwo (dragPane Horizontal 0.1 (2/3))
|
|
(***//*) = combineTwo (dragPane Horizontal 0.1 (3/4))
|
|
(****//*) = combineTwo (dragPane Horizontal 0.1 (4/5))
|
|
(***//**) = combineTwo (dragPane Horizontal 0.1 (3/5))
|
|
(****//***) = combineTwo (dragPane Horizontal 0.1 (4/7))
|
|
(***//****) = combineTwo (dragPane Horizontal 0.1 (3/7))
|
|
(*//****) = combineTwo (dragPane Horizontal 0.1 (1/5))
|
|
(**//***) = combineTwo (dragPane Horizontal 0.1 (2/5))
|
|
(*//***) = combineTwo (dragPane Horizontal 0.1 (1/4))
|
|
(*//**) = combineTwo (dragPane Horizontal 0.1 (1/3))
|
|
|
|
-- $tv
|
|
-- These combinators combine two layouts vertically using @Tall@.
|
|
|
|
(*|*),(**|*),(***|*),(****|*), (***|**),(****|***),
|
|
(***|****),(*|****),(**|***),(*|***),(*|**) :: (Read a, Eq a, LayoutClass l1 a, LayoutClass l2 a)
|
|
=> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
|
|
(*|*) = combineTwo (Tall 1 0.1 (1/2))
|
|
(**|*) = combineTwo (Tall 1 0.1 (2/3))
|
|
(***|*) = combineTwo (Tall 1 0.1 (3/4))
|
|
(****|*) = combineTwo (Tall 1 0.1 (4/5))
|
|
(***|**) = combineTwo (Tall 1 0.1 (3/5))
|
|
(****|***) = combineTwo (Tall 1 0.1 (4/7))
|
|
(***|****) = combineTwo (Tall 1 0.1 (3/7))
|
|
(*|****) = combineTwo (Tall 1 0.1 (1/5))
|
|
(**|***) = combineTwo (Tall 1 0.1 (2/5))
|
|
(*|***) = combineTwo (Tall 1 0.1 (1/4))
|
|
(*|**) = combineTwo (Tall 1 0.1 (1/3))
|
|
|
|
|
|
-- $mth
|
|
-- These combinators combine two layouts horizontally using @Mirror
|
|
-- Tall@.
|
|
|
|
(*/*),(**/*),(***/*),(****/*), (***/**),(****/***),
|
|
(***/****),(*/****),(**/***),(*/***),(*/**) :: (Read a, Eq a, LayoutClass l1 a, LayoutClass l2 a)
|
|
=> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
|
|
(*/*) = combineTwo (Mirror $ Tall 1 0.1 (1/2))
|
|
(**/*) = combineTwo (Mirror $ Tall 1 0.1 (2/3))
|
|
(***/*) = combineTwo (Mirror $ Tall 1 0.1 (3/4))
|
|
(****/*) = combineTwo (Mirror $ Tall 1 0.1 (4/5))
|
|
(***/**) = combineTwo (Mirror $ Tall 1 0.1 (3/5))
|
|
(****/***) = combineTwo (Mirror $ Tall 1 0.1 (4/7))
|
|
(***/****) = combineTwo (Mirror $ Tall 1 0.1 (3/7))
|
|
(*/****) = combineTwo (Mirror $ Tall 1 0.1 (1/5))
|
|
(**/***) = combineTwo (Mirror $ Tall 1 0.1 (2/5))
|
|
(*/***) = combineTwo (Mirror $ Tall 1 0.1 (1/4))
|
|
(*/**) = combineTwo (Mirror $ Tall 1 0.1 (1/3))
|
|
|
|
type NewSelect = Choose
|
|
{-# DEPRECATED NewSelect "Use 'Choose' instead." #-}
|