From f8c8240793a9992db68f07e75281e7f549406648 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Tue, 12 Apr 2022 13:07:17 -0600 Subject: Add type-static way to get the length of a LayoutList --- src/Rahm/Desktop/Layout.hs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/Rahm/Desktop/Layout.hs') 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. -- cgit