The LeftWM window manager has a layout called CenterMainFluid. It's akin to our XMonad.Layout.CenteredIfSingle in that it's best suited for ultrawide montiors, where a single stretched window might be annoying. Quoting from the LeftWM documentation, it works like so:
1st 2nd
stack main stack
+-----+-----------+-----+
| | | |
| | +-----+
| | | |
| | +-----+
| | | |
+-----+-----------+-----+
1st main 2nd
stack stack
+-----+-----------+-----+
| | |.....|
| | |.....| unoccupied
| | |.....| space is
| | |.....| reserved
| | |.....|
+-----+-----------+-----+
1st main
stack
+-----+-----------+-----+
|.....| |.....|
|.....| |.....| unoccupied
|.....| |.....| space is
|.....| |.....| reserved
|.....| |.....|
+-----+-----------+-----+
main
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
module CenterMain ( CenterMain (..) ) where
import XMonad hiding (tile)
import qualified XMonad.StackSet as W
data CenterMain a = CenterMain deriving (Show, Read)
instance LayoutClass CenterMain a where
pureLayout CenterMain r s = layout
where ws = W.integrate s
rs = tile r (length ws)
layout = zip ws rs
tile :: Rectangle -> Int -> [Rectangle]
tile r n = lefts ++ middle ++ rights
where lefts = [middleR]
middle = [leftR]
rights = splitVertically (n - 2) rightR
[leftR,middleR,rightR] = splitHorizontally 3 r
The LeftWM window manager has a layout called CenterMainFluid. It's akin to our XMonad.Layout.CenteredIfSingle in that it's best suited for ultrawide montiors, where a single stretched window might be annoying. Quoting from the LeftWM documentation, it works like so:
User
archie-dev
on Reddit already presents a minimal working example: