diff options
| author | Josh Rahm <rahm@google.com> | 2022-04-12 13:07:17 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:46 -0600 |
| commit | f8c8240793a9992db68f07e75281e7f549406648 (patch) | |
| tree | 0a097be91bee15a334dbd830685a9485a8e26abf /src/Rahm/Desktop/Layout.hs | |
| parent | a8f8c03a10ecc593ae216bb995e0c317a69b31a8 (diff) | |
| download | rde-f8c8240793a9992db68f07e75281e7f549406648.tar.gz rde-f8c8240793a9992db68f07e75281e7f549406648.tar.bz2 rde-f8c8240793a9992db68f07e75281e7f549406648.zip | |
Add type-static way to get the length of a LayoutList
Diffstat (limited to 'src/Rahm/Desktop/Layout.hs')
| -rw-r--r-- | src/Rahm/Desktop/Layout.hs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Rahm/Desktop/Layout.hs b/src/Rahm/Desktop/Layout.hs index b416111..bd875d0 100644 --- a/src/Rahm/Desktop/Layout.hs +++ b/src/Rahm/Desktop/Layout.hs @@ -37,13 +37,17 @@ import Rahm.Desktop.Layout.Hole import qualified Data.Map as M import qualified XMonad.StackSet as W -withSpacing = spacingRaw True (Border 5 5 5 5) True (Border 5 5 5 5) True -mods = - withSpacing . poppable . flippable . rotateable . hole - myLayout = fullscreenFull $ - avoidStruts $ + avoidStruts myLayoutList + +mySpacing = spacingRaw True (Border 5 5 5 5) True (Border 5 5 5 5) True + + +mods = + mySpacing . poppable . flippable . rotateable . hole + +myLayoutList = layoutList $ mods (reinterpretIncMaster $ spiral (6/7)) |: mods (modifyMosaic (MosaicAlt M.empty :: MosaicAlt Window)) |: @@ -55,6 +59,9 @@ myLayout = mods (reinterpretIncMaster $ D.Dwindle D.R D.CW 1.5 1.1) |: nil +nLayouts :: Int +nLayouts = layoutListLength myLayoutList + -- Mosaic doesn't have the concept of a "Master Space", so reinterpret messages -- intended to modify the master space and instead have those messages expand -- and shrink the current window. |