xmonad-contrib-0.17.0.9: Community-maintained extensions extensions for xmonad
Copyright(c) 2021 Leon Kowarschick
LicenseBSD-style (see xmonad/LICENSE)
MaintainerLeon Kowarschick. <TheElkOfWar@gmail.com>
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

XMonad.Layout.CenteredIfSingle

Contents

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

Usage

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

import XMonad.Layout.CenteredIfSingle

and adding the centeredIfSingle layoutmodifier to your layouts.

myLayoutHook = centeredIfSingle 0.7 Grid ||| ...  

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

centeredIfSingle Source #

Arguments

:: Double

Ratio of the screen the centered window should take up. Should 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 the left and right 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

Instances

Instances details
LayoutModifier CenteredIfSingle Window Source # 
Instance details

Defined in XMonad.Layout.CenteredIfSingle

Read (CenteredIfSingle a) Source # 
Instance details

Defined in XMonad.Layout.CenteredIfSingle

Show (CenteredIfSingle a) Source # 
Instance details

Defined in XMonad.Layout.CenteredIfSingle