aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/Layout.hs
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-04-12 13:07:17 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-10-09 12:19:46 -0600
commitf8c8240793a9992db68f07e75281e7f549406648 (patch)
tree0a097be91bee15a334dbd830685a9485a8e26abf /src/Rahm/Desktop/Layout.hs
parenta8f8c03a10ecc593ae216bb995e0c317a69b31a8 (diff)
downloadrde-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.hs17
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.