aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Actions/WindowGo.hs
diff options
context:
space:
mode:
authorgwern0 <gwern0@gmail.com>2009-06-22 21:28:31 +0200
committergwern0 <gwern0@gmail.com>2009-06-22 21:28:31 +0200
commit8e6012c832ccdb5750d92eaf77a6edb00d65d38c (patch)
tree56a8f0e68ae06705ba1a42dbeede8539651dbce7 /XMonad/Actions/WindowGo.hs
parentf2eaf0f2690093d1e105a779a746cdc7b36047f5 (diff)
downloadXMonadContrib-8e6012c832ccdb5750d92eaf77a6edb00d65d38c.tar.gz
XMonadContrib-8e6012c832ccdb5750d92eaf77a6edb00d65d38c.tar.xz
XMonadContrib-8e6012c832ccdb5750d92eaf77a6edb00d65d38c.zip
XMonad.Actions.WindowGo: improve haddocks
Ignore-this: 28dc1d5b094d50eaf6148fa9cc2d3755 darcs-hash:20090622192831-f7719-555de2effd946e19072719c94163f1fc9da2d59e.gz
Diffstat (limited to 'XMonad/Actions/WindowGo.hs')
-rw-r--r--XMonad/Actions/WindowGo.hs26
1 files changed, 13 insertions, 13 deletions
diff --git a/XMonad/Actions/WindowGo.hs b/XMonad/Actions/WindowGo.hs
index e33f25a..ae60891 100644
--- a/XMonad/Actions/WindowGo.hs
+++ b/XMonad/Actions/WindowGo.hs
@@ -69,10 +69,10 @@ raise :: Query Bool -> X ()
raise = raiseMaybe $ return ()
{- | 'raiseMaybe' queries all Windows based on a boolean provided by the
- user. Currently, there are three such useful booleans defined in
- "XMonad.ManageHook": title, resource, className. Each one tests based pretty
+ user. Currently, there are 3 such useful booleans defined in
+ "XMonad.ManageHook": 'title', 'resource', 'className'. Each one tests based pretty
much as you would think. ManageHook also defines several operators, the most
- useful of which is (=?). So a useful test might be finding a Window whose
+ useful of which is (=?). So a useful test might be finding a @Window@ whose
class is Firefox. Firefox 3 declares the class \"Firefox\", so you'd want to
pass in a boolean like @(className =? \"Firefox\")@.
@@ -135,14 +135,14 @@ raiseVar getvar = liftIO getvar >>= \var -> runOrRaise var (fmap (map toLower) c
{- | 'raiseBrowser' and 'raiseEditor' grab $BROWSER and $EDITOR respectively and they either
take you to the specified program's window, or they try to run it. This is most useful
- if your variables are simple and look like 'firefox' or 'emacs'. -}
+ if your variables are simple and look like \"firefox\" or \"emacs\". -}
raiseBrowser, raiseEditor :: X ()
raiseBrowser = raiseVar getBrowser
raiseEditor = raiseVar getEditor
-{- | if the window is found the window is focused and the third argument is called
+{- | If the window is found the window is focused and the third argument is called
otherwise, the first argument is called
- See 'raiseMaster' for an example -}
+ See 'raiseMaster' for an example. -}
raiseAndDo :: X () -> Query Bool -> (Window -> X ())-> X ()
raiseAndDo raisef thatUserQuery afterRaise = withWindowSet $ \s -> do
maybeResult <- filterM (runQuery thatUserQuery) (W.allWindows s)
@@ -151,22 +151,22 @@ raiseAndDo raisef thatUserQuery afterRaise = withWindowSet $ \s -> do
(x:_) -> do windows $ W.focusWindow x
afterRaise x
-{- | if the window is found the window is focused and the third argument is called
- otherwise, raisef is called -}
+{- | If a window matching the second arugment is found, the window is focused and the third argument is called;
+ otherwise, the first argument is called. -}
runOrRaiseAndDo :: String -> Query Bool -> (Window -> X ()) -> X ()
runOrRaiseAndDo = raiseAndDo . spawn
{- | if the window is found the window is focused and set to master
- otherwise, the first argument is called
+ otherwise, the first argument is called.
- raiseMaster (runInTerm \"-title ghci\" \"zsh -c \'ghci\'\") (title =? \"ghci\") -}
+ > raiseMaster (runInTerm \"-title ghci\" \"zsh -c \'ghci\'\") (title =? \"ghci\") -}
raiseMaster :: X () -> Query Bool -> X ()
raiseMaster raisef thatUserQuery = raiseAndDo raisef thatUserQuery (\_ -> windows W.swapMaster)
-{- | if the window is found the window is focused and set to master
- otherwise, action is run
+{- | If the window is found the window is focused and set to master
+ otherwise, action is run.
- runOrRaiseMaster \"firefox\" (className =? \"Firefox\"))
+ > runOrRaiseMaster \"firefox\" (className =? \"Firefox\"))
-}
runOrRaiseMaster :: String -> Query Bool -> X ()
runOrRaiseMaster run query = runOrRaiseAndDo run query (\_ -> windows W.swapMaster)