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

Copyright | (c) 2021 Leon Kowarschick
License | BSD-style (see xmonad/LICENSE)
Maintainer | Leon Kowarschick. <TheElkOfWar@gmail.com>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

XMonad.Layout.CenteredIfSingle

Contents

- Usage

Description

A layout modifier that, if there is only a single window on screen, places that window in the center of the screen. This is especially useful on wide screen setups, where the window would otherwise be unnecessarily far away from the center of your field of vision.

Synopsis

- centeredIfSingle :: Double -> Double -> l a -> ModifiedLayout CenteredIfSingle l a
- data CenteredIfSingle a

# Usage

You can use this module by including the following in your `xmonad.hs`:

    import XMonad.Layout.CenteredIfSingle

and adding the `centeredIfSingle` layoutmodifier to your layouts.

    myLayoutHook = centeredIfSingle 0.7 0.8 Grid ||| ...

For more information on configuring your layouts see the tutorial and XMonad.Doc.Extending.

centeredIfSingle Source #

Arguments

:: Double | Horizontal ratio of the screen the centered window should take up; should be a value between 0.0 and 1.0
-> Double | Vertical ratio; should also be a value between 0.0 and 1.0
-> l a | The layout that will be used if more than one window is open
-> ModifiedLayout CenteredIfSingle l a |

Layout Modifier that places a window in the center of the screen, leaving room on all sides if there is only a single window

data CenteredIfSingle a Source #

Layout Modifier that places a window in the center of the screen, leaving room on the left and right if there is only a single window. The first argument is the horizontal and the second one the vertical ratio of the screen the centered window should take up. Both numbers should be between 0.0 and 1.0.

#### Instances

Instances details

LayoutModifier CenteredIfSingle Window Source # |

Instance details

Defined in XMonad.Layout.CenteredIfSingle

Methods

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

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

handleMess :: CenteredIfSingle Window -> SomeMessage -> X (Maybe (CenteredIfSingle Window)) Source #

handleMessOrMaybeModifyIt :: CenteredIfSingle Window -> SomeMessage -> X (Maybe (Either (CenteredIfSingle Window) SomeMessage)) Source #

pureMess :: CenteredIfSingle Window -> SomeMessage -> Maybe (CenteredIfSingle Window) Source #

redoLayout :: CenteredIfSingle Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> X ([(Window, Rectangle)], Maybe (CenteredIfSingle Window)) Source #

pureModifier :: CenteredIfSingle Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> ([(Window, Rectangle)], Maybe (CenteredIfSingle Window)) Source #

hook :: CenteredIfSingle Window -> X () Source #

unhook :: CenteredIfSingle Window -> X () Source #

modifierDescription :: CenteredIfSingle Window -> String Source #

modifyDescription :: LayoutClass l Window => CenteredIfSingle Window -> l Window -> String Source #

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