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

Copyright | (c) Edward Z. Yang
License | BSD-style (see LICENSE)
Maintainer | <ezyang@cs.stanford.edu>
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Layout.PerScreen

Contents

- Usage

Description

Configure layouts based on the width of your screen; use your favorite multi-column layout for wide screens and a full-screen layout for small ones.

Synopsis

- data PerScreen l1 l2 a
- ifWider :: (LayoutClass l1 a, LayoutClass l2 a) => Dimension -> l1 a -> l2 a -> PerScreen l1 l2 a

# Usage

You can use this module by importing it into your `xmonad.hs` file:

    import XMonad.Layout.PerScreen

and modifying your layoutHook as follows (for example):

    layoutHook = ifWider 1280 (Tall 1 (3/100) (1/2) ||| Full) Full

Replace any of the layouts with any arbitrarily complicated layout. ifWider can also be used inside other layout combinators.

data PerScreen l1 l2 a Source #

#### Instances

Instances details

(LayoutClass l1 a, LayoutClass l2 a, Show a) => LayoutClass (PerScreen l1 l2) a Source # |

Instance details

Defined in XMonad.Layout.PerScreen

Methods

runLayout :: Workspace WorkspaceId (PerScreen l1 l2 a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (PerScreen l1 l2 a)) Source #

doLayout :: PerScreen l1 l2 a -> Rectangle -> Stack a -> X ([(a, Rectangle)], Maybe (PerScreen l1 l2 a)) Source #

pureLayout :: PerScreen l1 l2 a -> Rectangle -> Stack a -> [(a, Rectangle)] Source #

emptyLayout :: PerScreen l1 l2 a -> Rectangle -> X ([(a, Rectangle)], Maybe (PerScreen l1 l2 a)) Source #

handleMessage :: PerScreen l1 l2 a -> SomeMessage -> X (Maybe (PerScreen l1 l2 a)) Source #

pureMessage :: PerScreen l1 l2 a -> SomeMessage -> Maybe (PerScreen l1 l2 a) Source #

description :: PerScreen l1 l2 a -> String Source #

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

ifWider Source #

Arguments

:: (LayoutClass l1 a, LayoutClass l2 a) |
=> Dimension | target screen width
-> l1 a | layout to use when the screen is wide enough
-> l2 a | layout to use otherwise
-> PerScreen l1 l2 a |