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

Copyright | (c) 2009 Adam Vogt (c) 2009 Max Rabkin -- wrote limitSelect
License | BSD-style (see xmonad/LICENSE)
Maintainer | vogt.adam@gmail.com
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Layout.LimitWindows

Contents

- Usage
- Layout Modifiers
- Change the number of windows
- Types

Description

A layout modifier that limits the number of windows that can be shown. See XMonad.Layout.Minimize for manually setting hidden windows.

Synopsis

- limitWindows :: Int -> l a -> ModifiedLayout LimitWindows l a
- limitSlice :: Int -> l a -> ModifiedLayout LimitWindows l a
- limitSelect :: Int -> Int -> l a -> ModifiedLayout Selection l a
- increaseLimit :: X ()
- decreaseLimit :: X ()
- setLimit :: Int -> X ()
- data LimitWindows a
- data Selection a

# Usage

To use this module, add the following import to `~/.xmonad/xmonad.hs`:

    import XMonad.Layout.LimitWindows

    myLayout = limitWindows 6 $ Tall 1 0.03 0.5 ||| Full ||| RandomOtherLayout...
    main = xmonad def { layoutHook = myLayout }

You may also be interested in dynamically changing the number dynamically, by binding keys to the `increaseLimit`, `decreaseLimit`, or `setLimit` actions.

For detailed instructions on editing your key bindings, see XMonad.Doc.Extending.

See also `boringAuto` for keybindings that skip the hidden windows.

# Layout Modifiers

limitWindows :: Int -> l a -> ModifiedLayout LimitWindows l a Source #

Only display the first `n` windows.

limitSlice :: Int -> l a -> ModifiedLayout LimitWindows l a Source #

Only display `n` windows around the focused window. This makes sense with layouts that arrange windows linearily, like `Accordion`.

limitSelect :: Int -> Int -> l a -> ModifiedLayout Selection l a Source #

Only display the first `m` windows and `r` others. The `IncMasterN` message will change `m`, as well as passing it onto the underlying layout.

# Change the number of windows

increaseLimit :: X () Source #

decreaseLimit :: X () Source #

setLimit :: Int -> X () Source #

# Types

data LimitWindows a Source #

#### Instances

Instances details

LayoutModifier LimitWindows a Source # |

Instance details

Defined in XMonad.Layout.LimitWindows

Methods

modifyLayout :: LayoutClass l a => LimitWindows a -> Workspace WorkspaceId (l a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (l a)) Source #

modifyLayoutWithUpdate :: LayoutClass l a => LimitWindows a -> Workspace WorkspaceId (l a) a -> Rectangle -> X (([(a, Rectangle)], Maybe (l a)), Maybe (LimitWindows a)) Source #

handleMess :: LimitWindows a -> SomeMessage -> X (Maybe (LimitWindows a)) Source #

handleMessOrMaybeModifyIt :: LimitWindows a -> SomeMessage -> X (Maybe (Either (LimitWindows a) SomeMessage)) Source #

pureMess :: LimitWindows a -> SomeMessage -> Maybe (LimitWindows a) Source #

redoLayout :: LimitWindows a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (LimitWindows a)) Source #

pureModifier :: LimitWindows a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> ([(a, Rectangle)], Maybe (LimitWindows a)) Source #

hook :: LimitWindows a -> X () Source #

unhook :: LimitWindows a -> X () Source #

modifierDescription :: LimitWindows a -> String Source #

modifyDescription :: LayoutClass l a => LimitWindows a -> l a -> String Source #

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

data Selection a Source #

#### Instances

Instances details

LayoutModifier Selection a Source # |

Instance details

Defined in XMonad.Layout.LimitWindows

Methods

modifyLayout :: LayoutClass l a => Selection a -> Workspace WorkspaceId (l a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (l a)) Source #

modifyLayoutWithUpdate :: LayoutClass l a => Selection a -> Workspace WorkspaceId (l a) a -> Rectangle -> X (([(a, Rectangle)], Maybe (l a)), Maybe (Selection a)) Source #

handleMess :: Selection a -> SomeMessage -> X (Maybe (Selection a)) Source #

handleMessOrMaybeModifyIt :: Selection a -> SomeMessage -> X (Maybe (Either (Selection a) SomeMessage)) Source #

pureMess :: Selection a -> SomeMessage -> Maybe (Selection a) Source #

redoLayout :: Selection a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (Selection a)) Source #

pureModifier :: Selection a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> ([(a, Rectangle)], Maybe (Selection a)) Source #

hook :: Selection a -> X () Source #

unhook :: Selection a -> X () Source #

modifierDescription :: Selection a -> String Source #

modifyDescription :: LayoutClass l a => Selection a -> l a -> String Source #

Read (Selection a) Source # |
Instance details Defined in XMonad.Layout.LimitWindows Methods readsPrec :: Int -> ReadS (Selection a) Source # readList :: ReadS [Selection a] Source # readPrec :: ReadPrec (Selection a) Source # readListPrec :: ReadPrec [Selection a] Source #
Show (Selection a) Source # |
Instance details Defined in XMonad.Layout.LimitWindows Methods showsPrec :: Int -> Selection a -> ShowS Source # show :: Selection a -> String Source # showList :: [Selection a] -> ShowS Source #
Eq (Selection a) Source # |
Instance details Defined in XMonad.Layout.LimitWindows Methods (==) :: Selection a -> Selection a -> Bool Source # (/=) :: Selection a -> Selection a -> Bool Source #