Copyright | (c) Peter De Wachter Ilya V. Portnov |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Ilya V. Portnov <portnov84@rambler.ru> |
Stability | unstable |
Portability | unportable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Circle is an elliptical, overlapping layout. Original code by Peter De Wachter, extended by Ilya Porntov.
Synopsis
- data CircleEx a = CircleEx {
- cNMaster :: !Int
- cMasterRatio :: !Rational
- cStackRatio :: !Rational
- cMultiplier :: !Rational
- cDelta :: !Double
- circle :: CircleEx a
- circleEx :: CircleEx a
- data CircleExMsg
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
andExpand
: 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
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
.
CircleEx | |
|
Instances
LayoutClass CircleEx Window Source # | |
Defined in XMonad.Layout.CircleEx runLayout :: Workspace WorkspaceId (CircleEx Window) Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (CircleEx Window)) # doLayout :: CircleEx Window -> Rectangle -> Stack Window -> X ([(Window, Rectangle)], Maybe (CircleEx Window)) # pureLayout :: CircleEx Window -> Rectangle -> Stack Window -> [(Window, Rectangle)] # emptyLayout :: CircleEx Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (CircleEx Window)) # handleMessage :: CircleEx Window -> SomeMessage -> X (Maybe (CircleEx Window)) # pureMessage :: CircleEx Window -> SomeMessage -> Maybe (CircleEx Window) # description :: CircleEx Window -> String # | |
Read (CircleEx a) Source # | |
Show (CircleEx a) Source # | |
Eq (CircleEx a) Source # | |
Circle layout with default settings:
- Number of master windows is set to 1
cMasterRatio
is set to70/99
, which is nearly1/sqrt(2)
cStackRatio
is set to2/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 to4/5
cStackRatio
is set to3/5
cMultiplier
is set to5/6
data CircleExMsg Source #
Specific messages understood by CircleEx layout.
Rotate !Double | Rotate secondary windows by specific angle |
IncStackRatio !Rational | Increase (or decrease, with negative value) sizes of secondary windows |
IncMultiplier !Rational | Increase |
Instances
Show CircleExMsg Source # | |
Defined in XMonad.Layout.CircleEx showsPrec :: Int -> CircleExMsg -> ShowS # show :: CircleExMsg -> String # showList :: [CircleExMsg] -> ShowS # | |
Eq CircleExMsg Source # | |
Defined in XMonad.Layout.CircleEx (==) :: CircleExMsg -> CircleExMsg -> Bool # (/=) :: CircleExMsg -> CircleExMsg -> Bool # | |
Message CircleExMsg Source # | |
Defined in XMonad.Layout.CircleEx |