summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-04-03 07:06:10 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-04-03 07:06:10 +0200
commit95d72415b86cd4d3b8797c764f8075b4af505fea (patch)
tree13cd2c07bad1c23c5b3bbce19f2e89d9098196b5
parentf863b8dfeb79d9dc6d4d77b72a5fa5506d086644 (diff)
downloadmetatile-95d72415b86cd4d3b8797c764f8075b4af505fea.tar
metatile-95d72415b86cd4d3b8797c764f8075b4af505fea.zip
Use Tall and Wide for split screen layouts. This should be less confusing.
darcs-hash:20070403050610-a5988-34a441f8eb299905ed28d415a9524121585d06d0
-rw-r--r--Config.hs7
-rw-r--r--Operations.hs10
-rw-r--r--XMonad.hs2
3 files changed, 8 insertions, 11 deletions
diff --git a/Config.hs b/Config.hs
index 09149ee..5916636 100644
--- a/Config.hs
+++ b/Config.hs
@@ -84,11 +84,8 @@ keys = M.fromList $
, ((modMask, xK_j ), raise GT)
, ((modMask, xK_k ), raise LT)
- , ((modMask, xK_h ), changeHorz (negate defaultDelta))
- , ((modMask, xK_l ), changeHorz defaultDelta)
- -- Not implemented yet:
- -- , ((modMask .|. shiftMask, xK_j ), changeVert defaultDelta)
- -- , ((modMask .|. shiftMask, xK_k ), changeVert (negate defaultDelta))
+ , ((modMask, xK_h ), changeSplit (negate defaultDelta))
+ , ((modMask, xK_l ), changeSplit defaultDelta)
, ((modMask .|. shiftMask, xK_c ), kill)
diff --git a/Operations.hs b/Operations.hs
index 046c75b..e2c2128 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -37,8 +37,8 @@ refresh = do
mapM_ (\(w, Rectangle a b c e) -> io $ moveResizeWindow d w a b c e) $
case layoutType fl of
Full -> fmap (flip (,) sc) $ maybeToList $ W.peekStack n ws
- Horz -> tile (tileFraction fl) sc $ W.index n ws
- Vert -> vtile (tileFraction fl) sc $ W.index n ws
+ Tall -> tile (tileFraction fl) sc $ W.index n ws
+ Wide -> vtile (tileFraction fl) sc $ W.index n ws
whenJust (W.peekStack n ws) (io . raiseWindow d)
whenJust (W.peek ws) setFocus
@@ -68,9 +68,9 @@ flipRect (Rectangle { rect_x = x, rect_y = y, rect_width = w, rect_height = h })
switchLayout :: X ()
switchLayout = layout $ \fl -> fl { layoutType = rot (layoutType fl) }
--- | changeHorz. Changes the horizontal split.
-changeHorz :: Rational -> X ()
-changeHorz delta = layout $ \fl ->
+-- | changeSplit. Changes the window split.
+changeSplit :: Rational -> X ()
+changeSplit delta = layout $ \fl ->
fl { tileFraction = min 1 (max 0 (tileFraction fl + delta)) }
-- | layout. Modify the current workspace's layout with a pure
diff --git a/XMonad.hs b/XMonad.hs
index 94b0ed1..afe2512 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -51,7 +51,7 @@ data XState = XState
type WorkSpace = StackSet Window
-- | The different layout modes
-data Layout = Full | Horz | Vert deriving (Enum, Bounded)
+data Layout = Full | Tall | Wide deriving (Enum, Bounded)
-- | 'rot' for Layout.
rot :: Layout -> Layout