changeset 325:64e73453e43f

xmonad: Pull apart custom layout into something readable This change doesn't affect any behavior, but it does document the custom layout by naming function parameters. Hopefully, this will make things easier to fix the next time the XMonad developers break us.
author Lucas Bergman <lucas@bergmans.us>
date Tue, 11 Mar 2014 12:49:05 -0500
parents 231aef6069cc
children bfb70ab95398
files .xmonad/xmonad.hs
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/.xmonad/xmonad.hs
+++ b/.xmonad/xmonad.hs
@@ -10,12 +10,17 @@ import XMonad.Layout.LayoutBuilder
 import XMonad.Util.EZConfig
 import XMonad.Util.Run(spawnPipe)
 
-myLayout = augie2 ||| augie1 ||| Full
-  where augie2 = ((layoutN 2 (relBox 0 0 1 0.75) (Just $ relBox 0 0 1 1) $ (Tall 1 0.03 0.75))
-                 $ (layoutAll (relBox 0 0.75 1 1) $ (Mirror (Column 1))))
-        augie1 = ((layoutN 1 (relBox 0 0 1 0.75) (Just $ relBox 0 0 1 1) $ (Tall 1 0.03 0.75))
-                 $ (layoutAll (relBox 0 0.75 1 1) $ (Mirror (Column 1))))
+myLayout = (augieLayout 2) ||| (augieLayout 1) ||| Full
 
+augieLayout num = layoutN num mainBox (Just overflowBox) layout overflowLayout
+  where
+    mainBox = relBox 0 0 1 mainHeightFrac
+    overflowBox = relBox 0 0 1 1
+    layout = Tall 1 0.03 mainWidthFrac
+    overflowLayout = layoutAll (relBox 0 mainHeightFrac 1 1) singleRow
+    mainHeightFrac = 0.75  -- main area takes up this much screen height
+    mainWidthFrac = 0.75   -- main window takes up this much screen width
+    singleRow = Mirror $ Column 1
 
 myDmenuTitleBar =
     "exec `dmenu_path | dmenu\