xmonad-contrib-0.17.0.9: Community-maintained extensions for xmonad
Copyright(c) Norbert Zeh <norbert.zeh@gmail.com>
LicenseBSD3
MaintainerNorbert Zeh <norbert.zeh@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Layout.Dwindle

Contents

Description

Three layouts: The first, Spiral, is a reimplementation of spiral with, at least to me, more intuitive semantics. The second, Dwindle, is inspired by a similar layout in awesome and produces the same sequence of decreasing window sizes as Spiral but pushes the smallest windows into a screen corner rather than the centre. The third, Squeeze arranges all windows in one row or in one column, with geometrically decreasing sizes.

Synopsis

Usage

This module can be used as follows:

import XMonad.Layout.Dwindle

Then add something like this to your layouts:

Dwindle R CW 1.5 1.1

or

Spiral L CW 1.5 1.1

or

^ Squeeze D 1.5 1.1

The first produces a layout that places the second window to the right of the first, the third below the second, the fourth to the right of the third, and so on. The first window is 1.5 times as wide as the second one, the second is 1.5 times as tall as the third one, and so on. Thus, the further down the window stack a window is, the smaller it is and the more it is pushed into the bottom-right corner.

The second produces a layout with the same window sizes but places the second window to the left of the first one, the third above the second one, the fourth to the right of the third one, and so on.

The third produces a layout that stacks windows vertically top-down with each window being 1.5 times as tall as the next.

In all three cases, the fourth (third, in the case of Squeeze) parameter, 1.1, is the factor by which the third parameter increases or decreases in response to Expand or Shrink messages.

For more detailed instructions on editing the layoutHook see:

XMonad.Doc.Extending

data Dwindle a Source #

Layouts with geometrically decreasing window sizes. Spiral and Dwindle split the screen into a rectangle for the first window and a rectangle for the remaining windows, which is split recursively to lay out these windows. Both layouts alternate between horizontal and vertical splits.

In each recursive step, the split Direction2D determines the placement of the remaining windows relative to the current window: to the left, to the right, above or below. The split direction of the first split is determined by the first layout parameter. The split direction of the second step is rotated 90 degrees relative to the first split direction according to the second layout parameter of type Chirality. So, if the first split is R and the second layout parameter is CW, then the second split is D.

For the Spiral layout, the same Chirality is used for computing the split direction of each step from the split direction of the previous step. For example, parameters R and CW produces the direction sequence R, D, L, U, R, D, L, U, ...

For the Dwindle layout, the Chirality alternates between CW and CCW in each step. For example, parameters U and CCW produce the direction sequence U, L, U, L, ... because L is the CCW rotation of U and U is the CW rotation of L.

In each split, the current rectangle is split so that the ratio between the size of the rectangle allocated to the current window and the size of the rectangle allocated to the remaining windows is the third layout parameter. This ratio can be altered using Expand and Shrink messages. The former multiplies the ratio by the fourth layout parameter. The latter divides the ratio by this parameter.

Squeeze does not alternate between horizontal and vertical splits and simply splits in the direction given as its first argument.

Parameters for both Dwindle and Spiral:

  • First split direction
  • First split chirality
  • Size ratio between rectangle allocated to current window and rectangle allocated to remaining windows
  • Factor by which the size ratio is changed in response to Expand or Shrink messages

The parameters for Squeeze are the same, except that there is no Chirality parameter.

Instances

Instances details
LayoutClass Dwindle a Source # 
Instance details

Defined in XMonad.Layout.Dwindle

Read (Dwindle a) Source # 
Instance details

Defined in XMonad.Layout.Dwindle

Show (Dwindle a) Source # 
Instance details

Defined in XMonad.Layout.Dwindle

Methods

showsPrec :: Int -> Dwindle a -> ShowS #

show :: Dwindle a -> String #

showList :: [Dwindle a] -> ShowS #

data Direction2D Source #

Two-dimensional directions:

Constructors

U

Up

D

Down

R

Right

L

Left

Instances

Instances details
Bounded Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

Enum Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

Read Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

Show Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

Eq Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

Ord Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

data Chirality Source #

Rotation between consecutive split directions

Constructors

CW 
CCW 

Instances

Instances details
Read Chirality Source # 
Instance details

Defined in XMonad.Layout.Dwindle

Show Chirality Source # 
Instance details

Defined in XMonad.Layout.Dwindle