Remove trailing spaces, no content changed

This commit is contained in:
Alec Berryman 2007-04-01 14:45:39 +00:00
parent b3fc66b15b
commit df4bda60ff
5 changed files with 15 additions and 15 deletions

View File

@ -3,7 +3,7 @@
-- Module : Main.hs -- Module : Main.hs
-- Copyright : (c) Spencer Janssen 2007 -- Copyright : (c) Spencer Janssen 2007
-- License : BSD3-style (see LICENSE) -- License : BSD3-style (see LICENSE)
-- --
-- Maintainer : sjanssen@cse.unl.edu -- Maintainer : sjanssen@cse.unl.edu
-- Stability : unstable -- Stability : unstable
-- Portability : not portable, uses mtl, X11, posix -- Portability : not portable, uses mtl, X11, posix
@ -30,7 +30,7 @@ import Config
-- --
-- The main entry point -- The main entry point
-- --
main :: IO () main :: IO ()
main = do main = do
dpy <- openDisplay "" dpy <- openDisplay ""
@ -121,7 +121,7 @@ grabKeys dpy rootw = do
-- XCreateWindowEvent(3X11) -- XCreateWindowEvent(3X11)
-- Window manager clients normally should ignore this window if the -- Window manager clients normally should ignore this window if the
-- override_redirect member is True. -- override_redirect member is True.
-- --
handle :: Event -> X () handle :: Event -> X ()
@ -172,7 +172,7 @@ handle e@(ConfigureRequestEvent {window = w}) = do
dpy <- gets display dpy <- gets display
ws <- gets workspace ws <- gets workspace
when (W.member w ws) $ -- already managed, reconfigure (see client:configure() when (W.member w ws) $ -- already managed, reconfigure (see client:configure()
trace ("Reconfigure already managed window: " ++ show w) trace ("Reconfigure already managed window: " ++ show w)
io $ configureWindow dpy (window e) (value_mask e) $ WindowChanges io $ configureWindow dpy (window e) (value_mask e) $ WindowChanges

View File

@ -40,7 +40,7 @@ refresh = do
fullWindow w = move w sc >> io (raiseWindow d w) fullWindow w = move w sc >> io (raiseWindow d w)
-- runRects draws the windows, figuring out their rectangles. -- runRects draws the windows, figuring out their rectangles.
-- The code here is for a horizontal split, and tr is possibly -- The code here is for a horizontal split, and tr is possibly
-- used to convert to the vertical case. The comments -- used to convert to the vertical case. The comments
-- speak in terms of the horizontal case. -- speak in terms of the horizontal case.
runRects :: Rectangle -> (Rectangle -> Rectangle) runRects :: Rectangle -> (Rectangle -> Rectangle)
@ -58,7 +58,7 @@ refresh = do
ns = map (/ sum ds) ds -- normalized ratios for rhs. ns = map (/ sum ds) ds -- normalized ratios for rhs.
-- Normalize dispositions while we have the opportunity. -- Normalize dispositions while we have the opportunity.
-- This is bad. Rational numbers might space leak each -- This is bad. Rational numbers might space leak each
-- time we make an adjustment. Floating point numbers are -- time we make an adjustment. Floating point numbers are
-- better here. I am being paranoid. -- better here. I am being paranoid.
zipWithM_ (\ratio a -> disposeW a (dfix ratio)) ns s zipWithM_ (\ratio a -> disposeW a (dfix ratio)) ns s
@ -103,7 +103,7 @@ refresh = do
whenJust (W.peek ws) setFocus whenJust (W.peek ws) setFocus
-- | switchLayout. Switch to another layout scheme. Switches the -- | switchLayout. Switch to another layout scheme. Switches the
-- current workspace. -- current workspace.
switchLayout :: X () switchLayout :: X ()
switchLayout = layout $ \fl -> fl { layoutType = rot (layoutType fl) } switchLayout = layout $ \fl -> fl { layoutType = rot (layoutType fl) }
@ -111,7 +111,7 @@ switchLayout = layout $ \fl -> fl { layoutType = rot (layoutType fl) }
changeVert :: Rational -> X () changeVert :: Rational -> X ()
changeVert delta = do changeVert delta = do
l <- gets (layoutType . currentDesc) l <- gets (layoutType . currentDesc)
case l of case l of
Vert -> layout $ \d -> d {vertTileFrac = min 1 $ Vert -> layout $ \d -> d {vertTileFrac = min 1 $
max 0 $ max 0 $
vertTileFrac d + delta} vertTileFrac d + delta}
@ -127,7 +127,7 @@ changeHorz delta = do
horzTileFrac d + delta} horzTileFrac d + delta}
_ -> return () _ -> return ()
-- | changeSize. Changes the size of the window, except in Full mode, with the -- | changeSize. Changes the size of the window, except in Full mode, with the
-- size remaining above the given mini-mum. -- size remaining above the given mini-mum.
changeSize :: Rational -> Rational -> X () changeSize :: Rational -> Rational -> X ()
changeSize delta mini = do changeSize delta mini = do
@ -143,7 +143,7 @@ changeSize delta mini = do
refresh refresh
-- | layout. Modify the current workspace's layout with a pure -- | layout. Modify the current workspace's layout with a pure
-- function and refresh. -- function and refresh.
layout :: (LayoutDesc -> LayoutDesc) -> X () layout :: (LayoutDesc -> LayoutDesc) -> X ()
layout f = do layout f = do
modify $ \s -> modify $ \s ->

4
README
View File

@ -6,7 +6,7 @@ Motivation:
more correct window manager in fewer lines of code, using strong more correct window manager in fewer lines of code, using strong
static typing. Enter Haskell. static typing. Enter Haskell.
If the aim of dwm is to fit in under 2000 lines of C, the aim of If the aim of dwm is to fit in under 2000 lines of C, the aim of
xmonad is to fit in under 400 lines of Haskell with similar functionality. xmonad is to fit in under 400 lines of Haskell with similar functionality.
Building: Building:
@ -30,7 +30,7 @@ And then build with Cabal:
runhaskell Setup.lhs build runhaskell Setup.lhs build
runhaskell Setup.lhs install runhaskell Setup.lhs install
Then add: Then add:
exec /home/dons/bin/xmonad exec /home/dons/bin/xmonad

View File

@ -3,7 +3,7 @@
-- Module : StackSet -- Module : StackSet
-- Copyright : (c) Don Stewart 2007 -- Copyright : (c) Don Stewart 2007
-- License : BSD3-style (see LICENSE) -- License : BSD3-style (see LICENSE)
-- --
-- Maintainer : dons@cse.unsw.edu.au -- Maintainer : dons@cse.unsw.edu.au
-- Stability : stable -- Stability : stable
-- Portability : portable, needs GHC 6.6 -- Portability : portable, needs GHC 6.6
@ -89,7 +89,7 @@ fromList (o,xs) = view o $ foldr (\(i,ys) s ->
toList :: StackSet a -> (Int,[[a]]) toList :: StackSet a -> (Int,[[a]])
toList x = (current x, map snd $ M.toList (stacks x)) toList x = (current x, map snd $ M.toList (stacks x))
-- | Push. Insert an element onto the top of the current stack. -- | Push. Insert an element onto the top of the current stack.
-- If the element is already in the current stack, it is moved to the top. -- If the element is already in the current stack, it is moved to the top.
-- If the element is managed on another stack, it is removed from that -- If the element is managed on another stack, it is removed from that
-- stack first. -- stack first.

View File

@ -3,7 +3,7 @@
-- Module : XMonad.hs -- Module : XMonad.hs
-- Copyright : (c) Spencer Janssen 2007 -- Copyright : (c) Spencer Janssen 2007
-- License : BSD3-style (see LICENSE) -- License : BSD3-style (see LICENSE)
-- --
-- Maintainer : sjanssen@cse.unl.edu -- Maintainer : sjanssen@cse.unl.edu
-- Stability : unstable -- Stability : unstable
-- Portability : not portable, uses cunning newtype deriving -- Portability : not portable, uses cunning newtype deriving