xmonad-contrib-0.17.1.9: Community-maintained extensions for xmonad
Copyright(c) Peter De Wachter Ilya V. Portnov
LicenseBSD-style (see LICENSE)
MaintainerIlya V. Portnov <portnov84@rambler.ru>
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Layout.CircleEx

Contents

Description

Circle is an elliptical, overlapping layout. Original code by Peter De Wachter, extended by Ilya Porntov.

Synopsis

Usage

The layout puts the first N windows (called master) into the center of screen. All others (called secondary, or stack) are organized in a circle (well, ellipse). When opening a new secondary window, its size will be slightly smaller than that of its predecessor (this is configurable). If the number of master windows is set to zero, all windows will be arranged in a circle. If there is more than one master window, they will be stacked in the center on top of each other. The size of each additional master window will again be slightly smaller than that of the former.

Since a picture says more than a thousand words, you see one here.

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

import XMonad.Layout.CircleEx

Then edit your layoutHook by adding the CircleEx layout:

myCircle = circleEx {cDelta = -3*pi/4}
myLayout = myCircle ||| Full ||| etc..
main = xmonad def { layoutHook = myLayout }

This layout understands standard messages:

  • IncMasterN: increase or decrease the number of master windows.
  • Shrink and Expand: change the size of master windows.

More layout-specific messages are also supported, see CircleExMsg below.

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

data CircleEx a Source #

The layout data type. It is recommended to not use the CircleEx data constructor directly, and instead rely on record update syntax; for example: circleEx {cMasterRatio = 4%5}. In this way you can avoid nasty surprises if one day additional fields are added to CircleEx.

Constructors

CircleEx 

Fields

  • cNMaster :: !Int

    Number of master windows. Default value is 1.

  • cMasterRatio :: !Rational

    Size of master window in relation to screen size. Default value is 4%5.

  • cStackRatio :: !Rational

    Size of first secondary window in relation to screen size. Default value is 3%5.

  • cMultiplier :: !Rational

    Coefficient used to calculate the sizes of subsequent secondary windows. The size of the next window is calculated as the size of the previous one multiplied by this value. This value is also used to scale master windows, in case there is more than one. Default value is 5%6. Set this to 1 if you want all secondary windows to have the same size.

  • cDelta :: !Double

    Angle of rotation of the whole circle layout. Usual values are from 0 to 2π, although it will work outside this range as well. Default value of 0 means that the first secondary window will be placed at the right side of screen.

circle :: CircleEx a Source #

Circle layout with default settings:

  • Number of master windows is set to 1
  • cMasterRatio is set to 70/99, which is nearly 1/sqrt(2)
  • cStackRatio is set to 2/5
  • cMultiplier is set to 1, which means all secondary windows will have the same size

This can be used as a drop-in replacement for XMonad.Layout.Circle.

circleEx :: CircleEx a Source #

Another variant of default settings for circle layout:

  • Number of master windows is set to 1
  • cMasterRatio is set to 4/5
  • cStackRatio is set to 3/5
  • cMultiplier is set to 5/6

data CircleExMsg Source #

Specific messages understood by CircleEx layout.

Constructors

Rotate !Double

Rotate secondary windows by specific angle

IncStackRatio !Rational

Increase (or decrease, with negative value) sizes of secondary windows

IncMultiplier !Rational

Increase cMultiplier.

Instances

Instances details
Show CircleExMsg Source # 
Instance details

Defined in XMonad.Layout.CircleEx

Eq CircleExMsg Source # 
Instance details

Defined in XMonad.Layout.CircleEx

Message CircleExMsg Source # 
Instance details

Defined in XMonad.Layout.CircleEx