From eb50a1aa4de7d81c8b0b474d86fc960bc4c151d9 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 13 Jun 2011 16:31:24 +0200 Subject: [PATCH] xmonad.hs: Add limit layout. --- xmonad.hs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xmonad.hs b/xmonad.hs index 0a898a2..eba0cfc 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -25,6 +25,8 @@ import XMonad.Actions.CycleWS import XMonad.Layout.Named -- Necessary for JumpToLayout. import XMonad.Layout.LayoutCombinators +-- Necessary for Limit layout. +import XMonad.Layout.TwoPane -- Prevent new windows from spawning in the master pane. Taken from @@ -54,9 +56,13 @@ avoidMaster = W.modify' $ \c -> case c of -- -- named is used to name layouts which allows switching to a specific layout -- (see below), thanks to vav in #xmonad on Freenode (2011-06-12 22:28 CEST). +-- +-- The limit layout displays only one window in the lower pane, thanks to to +-- Qantourisc (2010-06-12 15:15 CEST) for the hint to use TwoPane. myLayoutHook = named "Default" (smartBorders $ Mirror tiled) ||| named "Full" (smartBorders Full) ||| named "Vertical" (smartBorders tiled) + ||| named "Limit" (smartBorders $ Mirror $ TwoPane delta ratio) where -- Default tiling algorithm partitions the screen into two panes. tiled = Tall nmaster delta ratio @@ -120,6 +126,9 @@ myKeys = [ ((mod4Mask, xK_space), nextLayoutIncluding ["Default", "Full"]) -- Switch to vertical tiled layout. , ((mod4Mask, xK_v), sendMessage $ JumpToLayout "Vertical") + -- Switch to limit layout which displays only one window in the lower + -- pane. + , ((mod4Mask, xK_b), sendMessage $ JumpToLayout "Limit") -- Switch to last active workspace, thanks to moljac024 in #xmonad on -- Freenode (2010-12-18 14:45 CET). -- 2.45.2