mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 20:21:51 -07:00
Correct many typos in the documentation, consistent US spellingg
This commit is contained in:
@@ -53,7 +53,7 @@ import qualified XMonad.StackSet as W
|
||||
-- the property will go into the first part, all others will go into the second
|
||||
-- part. It supports @Move@ messages as 'combineTwo' does, but it also introduces
|
||||
-- 'SwapWindow' message which sends focused window to the other part. It is
|
||||
-- required becase @Move@ commands don't work when one of the parts is empty.
|
||||
-- required because @Move@ commands don't work when one of the parts is empty.
|
||||
-- To use it, import \"XMonad.Layout.WindowNavigation\", and add the following key
|
||||
-- bindings (or something similar):
|
||||
--
|
||||
|
@@ -127,8 +127,8 @@ import XMonad.Layout.SimpleFloat
|
||||
-- up the key bindings, please read the documentation of
|
||||
-- "XMonad.Layout.WindowArranger"
|
||||
--
|
||||
-- The deafult theme can be dynamically change with the xmonad theme
|
||||
-- selector. See "XMonad.Prompt.Theme". For more themse, look at
|
||||
-- The default theme can be dynamically change with the xmonad theme
|
||||
-- selector. See "XMonad.Prompt.Theme". For more themes, look at
|
||||
-- "XMonad.Util.Themes"
|
||||
|
||||
-- $circle
|
||||
|
@@ -10,7 +10,7 @@
|
||||
-- Stability : unstable
|
||||
-- Portability : unportable
|
||||
--
|
||||
-- Layout modfier suitable for workspace with multi-windowed instant messanger
|
||||
-- Layout modfier suitable for workspace with multi-windowed instant messenger
|
||||
-- (like Psi or Tkabber).
|
||||
--
|
||||
-----------------------------------------------------------------------------
|
||||
|
@@ -18,7 +18,7 @@ module XMonad.Layout.LayoutHints
|
||||
-- $usage
|
||||
layoutHints
|
||||
, layoutHintsWithPlacement
|
||||
, layoutHintsToCentre
|
||||
, layoutHintsToCenter
|
||||
, LayoutHints
|
||||
) where
|
||||
|
||||
@@ -57,7 +57,7 @@ import qualified Data.Set as Set
|
||||
--
|
||||
-- Or, to make a reasonable attempt to eliminate gaps between windows:
|
||||
--
|
||||
-- > myLayouts = layoutHintsToCentre (Tall 1 (3/100) (1/2))
|
||||
-- > myLayouts = layoutHintsToCenter (Tall 1 (3/100) (1/2))
|
||||
--
|
||||
-- For more detailed instructions on editing the layoutHook see:
|
||||
--
|
||||
@@ -75,16 +75,16 @@ layoutHintsWithPlacement :: (LayoutClass l a) => (Double, Double)
|
||||
-> l a -> ModifiedLayout LayoutHints l a
|
||||
layoutHintsWithPlacement rs = ModifiedLayout (LayoutHints rs)
|
||||
|
||||
-- | @layoutHintsToCentre layout@ applies hints, sliding the window to the
|
||||
-- centre of the screen and expanding its neighbours to fill the gaps. Windows
|
||||
-- | @layoutHintsToCenter layout@ applies hints, sliding the window to the
|
||||
-- center of the screen and expanding its neighbors to fill the gaps. Windows
|
||||
-- are never expanded in a way that increases overlap.
|
||||
--
|
||||
-- @layoutHintsToCentre@ only makes one pass at resizing the neighbours of
|
||||
-- hinted windows, so with some layouts (ex. the arrangment with two 'Mirror'
|
||||
-- 'Tall' stacked vertically), @layoutHintsToCentre@ may leave some gaps.
|
||||
-- @layoutHintsToCenter@ only makes one pass at resizing the neighbors of
|
||||
-- hinted windows, so with some layouts (ex. the arrangement with two 'Mirror'
|
||||
-- 'Tall' stacked vertically), @layoutHintsToCenter@ may leave some gaps.
|
||||
-- Simple layouts like 'Tall' are unaffected.
|
||||
layoutHintsToCentre :: (LayoutClass l a) => l a -> ModifiedLayout LayoutHintsToCentre l a
|
||||
layoutHintsToCentre = ModifiedLayout LayoutHintsToCentre
|
||||
layoutHintsToCenter :: (LayoutClass l a) => l a -> ModifiedLayout LayoutHintsToCenter l a
|
||||
layoutHintsToCenter = ModifiedLayout LayoutHintsToCenter
|
||||
|
||||
data LayoutHints a = LayoutHints (Double, Double)
|
||||
deriving (Read, Show)
|
||||
@@ -121,14 +121,14 @@ applyOrder root wrs = do
|
||||
-- resizing multiple times
|
||||
f <- [maximum, minimum, sum, sum . map sq]
|
||||
return $ sortBy (compare `on` (f . distance)) wrs
|
||||
where distFC = uncurry ((+) `on` sq) . pairWise (-) (centre root)
|
||||
where distFC = uncurry ((+) `on` sq) . pairWise (-) (center root)
|
||||
distance = map distFC . corners . snd
|
||||
pairWise f (a,b) (c,d) = (f a c, f b d)
|
||||
sq = join (*)
|
||||
|
||||
data LayoutHintsToCentre a = LayoutHintsToCentre deriving (Read, Show)
|
||||
data LayoutHintsToCenter a = LayoutHintsToCenter deriving (Read, Show)
|
||||
|
||||
instance LayoutModifier LayoutHintsToCentre Window where
|
||||
instance LayoutModifier LayoutHintsToCenter Window where
|
||||
modifyLayout _ ws@(W.Workspace _ _ Nothing) r = runLayout ws r
|
||||
modifyLayout _ ws@(W.Workspace _ _ (Just st)) r = do
|
||||
(arrs,ol) <- runLayout ws r
|
||||
@@ -142,7 +142,7 @@ applyHints _ _ [] = return []
|
||||
applyHints s root ((w,lrect@(Rectangle a b c d)):xs) = do
|
||||
adj <- mkAdjust w
|
||||
let (c',d') = adj (c,d)
|
||||
redr = placeRectangle (centrePlacement root lrect :: (Double,Double)) lrect
|
||||
redr = placeRectangle (centerPlacement root lrect :: (Double,Double)) lrect
|
||||
$ if isInStack s w then Rectangle a b c' d' else lrect
|
||||
|
||||
ds = (fromIntegral c - fromIntegral c',fromIntegral d - fromIntegral d')
|
||||
@@ -208,12 +208,12 @@ corners (Rectangle x y w h) = [(x,y)
|
||||
,(x+fromIntegral w, y+fromIntegral h)
|
||||
,(x, y+fromIntegral h)]
|
||||
|
||||
centre :: Rectangle -> (Position, Position)
|
||||
centre (Rectangle x y w h) = (avg x w, avg y h)
|
||||
center :: Rectangle -> (Position, Position)
|
||||
center (Rectangle x y w h) = (avg x w, avg y h)
|
||||
where avg a b = a + fromIntegral b `div` 2
|
||||
|
||||
centrePlacement :: RealFrac r => Rectangle -> Rectangle -> (r, r)
|
||||
centrePlacement = centrePlacement' clamp
|
||||
centerPlacement :: RealFrac r => Rectangle -> Rectangle -> (r, r)
|
||||
centerPlacement = centerPlacement' clamp
|
||||
where clamp n = case signum n of
|
||||
0 -> 0.5
|
||||
1 -> 1
|
||||
@@ -221,7 +221,7 @@ centrePlacement = centrePlacement' clamp
|
||||
|
||||
freeDirs :: Rectangle -> Rectangle -> Set Direction
|
||||
freeDirs root = Set.fromList . uncurry (++) . (lr *** ud)
|
||||
. centrePlacement' signum root
|
||||
. centerPlacement' signum root
|
||||
where
|
||||
lr 1 = [L]
|
||||
lr (-1) = [R]
|
||||
@@ -230,8 +230,8 @@ freeDirs root = Set.fromList . uncurry (++) . (lr *** ud)
|
||||
ud (-1) = [D]
|
||||
ud _ = [U,D]
|
||||
|
||||
centrePlacement' :: (Position -> r) -> Rectangle -> Rectangle -> (r, r)
|
||||
centrePlacement' cf root assigned
|
||||
centerPlacement' :: (Position -> r) -> Rectangle -> Rectangle -> (r, r)
|
||||
centerPlacement' cf root assigned
|
||||
= (cf $ cx - cwx, cf $ cy - cwy)
|
||||
where (cx,cy) = centre root
|
||||
(cwx,cwy) = centre assigned
|
||||
where (cx,cy) = center root
|
||||
(cwx,cwy) = center assigned
|
||||
|
@@ -47,7 +47,7 @@ import XMonad.Layout.LayoutModifier
|
||||
-- layout
|
||||
data AddMaster a = AddMaster Rational Rational deriving (Show, Read)
|
||||
|
||||
-- | Modifier wich converts given layout to a mastered one
|
||||
-- | Modifier which converts given layout to a mastered one
|
||||
mastered :: (LayoutClass l a) =>
|
||||
Rational -- ^ @delta@, the ratio of the screen to resize by
|
||||
-> Rational -- ^ @frac@, what portion of the screen to use for the master window
|
||||
|
@@ -27,7 +27,7 @@ import qualified XMonad.StackSet as W
|
||||
-- bottom of master. It tries to give equal space for each slave
|
||||
-- window.
|
||||
--
|
||||
-- You can use this module by adding folowing in your @xmonad.hs@:
|
||||
-- You can use this module by adding following in your @xmonad.hs@:
|
||||
--
|
||||
-- > import XMonad.Layout.OneBig
|
||||
--
|
||||
|
@@ -45,7 +45,7 @@ showWName :: l a -> ModifiedLayout ShowWName l a
|
||||
showWName = ModifiedLayout (SWN True defaultSWNConfig Nothing)
|
||||
|
||||
-- | A layout modifier to show the workspace name when switching. It
|
||||
-- is possible to provide a costum configuration.
|
||||
-- is possible to provide a custom configuration.
|
||||
showWName' :: SWNConfig -> l a -> ModifiedLayout ShowWName l a
|
||||
showWName' c = ModifiedLayout (SWN True c Nothing)
|
||||
|
||||
|
@@ -12,7 +12,7 @@
|
||||
-- Portability : unportable
|
||||
--
|
||||
-- A stacking layout, like dishes but with the ability to resize master pane.
|
||||
-- Mostly usefull on small screens.
|
||||
-- Mostly useful on small screens.
|
||||
--
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
|
@@ -67,7 +67,7 @@ import Data.Map(Map)
|
||||
-- styles. Better compatibility with some other layouts of which I am not
|
||||
-- aware could be another benefit.
|
||||
--
|
||||
-- 'simpleTabbed' (and other decorated layouts) fail horibly when used as
|
||||
-- 'simpleTabbed' (and other decorated layouts) fail horribly when used as
|
||||
-- subLayouts:
|
||||
--
|
||||
-- * decorations stick around: layout is run after being told to Hide
|
||||
|
@@ -41,7 +41,7 @@ import Control.Monad
|
||||
-- > myLayouts = ThreeCol 1 (3/100) (1/2) ||| ThreeColMid 1 (3/100) (1/2) ||| etc..
|
||||
-- > main = xmonad defaultConfig { layoutHook = myLayouts }
|
||||
--
|
||||
-- The first argument specifies hom many windows initially appear in the main
|
||||
-- The first argument specifies how many windows initially appear in the main
|
||||
-- window. The second argument argument specifies the amount to resize while
|
||||
-- resizing and the third argument specifies the initial size of the columns.
|
||||
-- A positive size designates the fraction of the screen that the main window
|
||||
|
@@ -203,7 +203,7 @@ memberFromList :: (b -> c) -> (c -> a -> Bool) -> a -> [b] -> [b]
|
||||
memberFromList f g l = foldr (h l) []
|
||||
where h x y ys = if g (f y) x then [y] else ys
|
||||
|
||||
-- | Get the list of elements to be deleted and the list ef elements to
|
||||
-- | Get the list of elements to be deleted and the list of elements to
|
||||
-- be added to the first list in order to get the second list.
|
||||
diff :: Eq a => ([a],[a]) -> ([a],[a])
|
||||
diff (x,y) = (x \\ y, y \\ x)
|
||||
|
@@ -90,9 +90,7 @@ navigateColor c =
|
||||
WNC Nothing c c c c
|
||||
|
||||
navigateBrightness :: Double -> WNConfig
|
||||
navigateBrightness f | f > 1 = navigateBrightness 1
|
||||
| f < 0 = navigateBrightness 0
|
||||
navigateBrightness f = defaultWNConfig { brightness = Just f }
|
||||
navigateBrightness f = defaultWNConfig { brightness = Just $ max 0 $ min 1 f }
|
||||
|
||||
defaultWNConfig :: WNConfig
|
||||
defaultWNConfig = WNC (Just 0.4) "#0000FF" "#00FFFF" "#FF0000" "#FF00FF"
|
||||
@@ -129,7 +127,7 @@ instance LayoutModifier WindowNavigation Window where
|
||||
wrs = filter ((`elem` existing_wins) . fst) $ filter ((/=r) . snd) $
|
||||
filter ((/=w) . fst) origwrs
|
||||
wnavigable = nub $ concatMap
|
||||
(\d -> truncHead $ navigable d pt wrs) [U,D,R,L]
|
||||
(\d -> take 1 $ navigable d pt wrs) [U,D,R,L]
|
||||
wnavigablec = nub $ concatMap
|
||||
(\d -> map (\(win,_) -> (win,dirc d)) $
|
||||
truncHead $ navigable d pt wrs) [U,D,R,L]
|
||||
|
Reference in New Issue
Block a user