diff options
| author | Josh Rahm <rahm@google.com> | 2022-04-12 13:07:17 -0600 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2022-04-12 13:07:17 -0600 |
| commit | e5bee7f2f095bffdef1c31e27f4b036780b01654 (patch) | |
| tree | 0a097be91bee15a334dbd830685a9485a8e26abf /src/Rahm/Desktop/Layout.hs | |
| parent | c0e224d7fabcf0d274419a5f3ae79bc4fea637f2 (diff) | |
| download | rde-e5bee7f2f095bffdef1c31e27f4b036780b01654.tar.gz rde-e5bee7f2f095bffdef1c31e27f4b036780b01654.tar.bz2 rde-e5bee7f2f095bffdef1c31e27f4b036780b01654.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. |