LayoutScreens and Square: haddock updates

This commit is contained in:
Brent Yorgey 2007-12-04 20:40:39 +00:00
parent 258ccb3468
commit 7296b99306
2 changed files with 11 additions and 9 deletions

View File

@ -35,10 +35,12 @@ import Graphics.X11.Xlib.Extras
-- screen and long for greater flexibility (e.g. being able to see your -- screen and long for greater flexibility (e.g. being able to see your
-- email window at all times, a crude mimic of sticky windows). -- email window at all times, a crude mimic of sticky windows).
-- --
-- You can use this module with the following in your Config.hs file: -- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@ file:
-- --
-- > import XMonad.Layout.LayoutScreens -- > import XMonad.Layout.LayoutScreens
-- --
-- Then add some keybindings; for example:
--
-- > , ((modMask .|. shiftMask, xK_space), layoutScreens 2 (TwoPane 0.5 0.5)) -- > , ((modMask .|. shiftMask, xK_space), layoutScreens 2 (TwoPane 0.5 0.5))
-- > , ((controlMask .|. modMask .|. shiftMask, xK_space), rescreen) -- > , ((controlMask .|. modMask .|. shiftMask, xK_space), rescreen)
-- --
@ -51,10 +53,9 @@ import Graphics.X11.Xlib.Extras
-- > , ((modMask .|. shiftMask, xK_space), -- > , ((modMask .|. shiftMask, xK_space),
-- > layoutScreens 1 (fixedLayout [Rectangle 0 0 1024 768])) -- > layoutScreens 1 (fixedLayout [Rectangle 0 0 1024 768]))
-- > , ((controlMask .|. modMask .|. shiftMask, xK_space), rescreen) -- > , ((controlMask .|. modMask .|. shiftMask, xK_space), rescreen)
--
-- %import XMonad.Layout.LayoutScreens -- For detailed instructions on editing your key bindings, see
-- %keybind , ((modMask .|. shiftMask, xK_space), layoutScreens 2 (twoPane 0.5 0.5)) -- "XMonad.Doc.Extending#Editing_key_bindings".
-- %keybind , ((controlMask .|. modMask .|. shiftMask, xK_space), rescreen)
layoutScreens :: LayoutClass l Int => Int -> l Int -> X () layoutScreens :: LayoutClass l Int => Int -> l Int -> X ()
layoutScreens nscr _ | nscr < 1 = trace $ "Can't layoutScreens with only " ++ show nscr ++ " screens." layoutScreens nscr _ | nscr < 1 = trace $ "Can't layoutScreens with only " ++ show nscr ++ " screens."

View File

@ -5,14 +5,14 @@
-- Module : XMonad.Layout.Square -- Module : XMonad.Layout.Square
-- Copyright : (c) David Roundy <droundy@darcs.net> -- Copyright : (c) David Roundy <droundy@darcs.net>
-- License : BSD3-style (see LICENSE) -- License : BSD3-style (see LICENSE)
-- --
-- Maintainer : David Roundy <droundy@darcs.net> -- Maintainer : David Roundy <droundy@darcs.net>
-- Stability : unstable -- Stability : unstable
-- Portability : unportable -- Portability : unportable
-- --
-- A layout that splits the screen into a square area and the rest of the -- A layout that splits the screen into a square area and the rest of the
-- screen. -- screen.
-- This is probably only ever useful in combination with -- This is probably only ever useful in combination with
-- "XMonad.Layout.Combo". -- "XMonad.Layout.Combo".
-- It sticks one window in a square region, and makes the rest -- It sticks one window in a square region, and makes the rest
-- of the windows live with what's left (in a full-screen sense). -- of the windows live with what's left (in a full-screen sense).
@ -29,7 +29,7 @@ import Graphics.X11.Xlib
import XMonad.StackSet ( integrate ) import XMonad.StackSet ( integrate )
-- $usage -- $usage
-- You can use this module with the following in your Config.hs file: -- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@ file:
-- --
-- > import XMonad.Layout.Square -- > import XMonad.Layout.Square
-- --
@ -40,7 +40,8 @@ import XMonad.StackSet ( integrate )
-- > [(twoPane 0.03 0.2,1),(combo [(twoPane 0.03 0.8,1),(square,1)] -- > [(twoPane 0.03 0.2,1),(combo [(twoPane 0.03 0.8,1),(square,1)]
-- > [(tabbed,3),(tabbed,30),(tabbed,1),(tabbed,1)] -- > [(tabbed,3),(tabbed,30),(tabbed,1),(tabbed,1)]
-- %import XMonad.Layout.Square -- For detailed instructions on editing your key bindings, see
-- "XMonad.Doc.Extending#Editing_key_bindings".
data Square a = Square deriving ( Read, Show ) data Square a = Square deriving ( Read, Show )