WindowGo: bulk up 'runOrRaise' doc to point to 'raiseMaybe' for shell scripting

This commit is contained in:
gwern0 2010-07-12 04:56:32 +00:00
parent 9f6bb1a26e
commit bac3e0d658

View File

@ -80,8 +80,11 @@ ifWindows qry f el = withWindowSet $ \wins -> do
ifWindow :: Query Bool -> ManageHook -> X () -> X () ifWindow :: Query Bool -> ManageHook -> X () -> X ()
ifWindow qry mh = ifWindows qry (windows . appEndo <=< runQuery mh . head) ifWindow qry mh = ifWindows qry (windows . appEndo <=< runQuery mh . head)
-- | 'action' is an executable to be run via 'safeSpawnProg' (of "XMonad.Util.Run") if the Window cannot be found. {- | 'action' is an executable to be run via 'safeSpawnProg' (of "XMonad.Util.Run") if the Window cannot be found.
-- Presumably this executable is the same one that you were looking for. Presumably this executable is the same one that you were looking for.
Note that this does not go through the shell. If you wish to run an arbitrary IO action
(such as 'spawn', which will run its String argument through the shell), then you will want to use
'raiseMaybe' directly. -}
runOrRaise :: String -> Query Bool -> X () runOrRaise :: String -> Query Bool -> X ()
runOrRaise = raiseMaybe . safeSpawnProg runOrRaise = raiseMaybe . safeSpawnProg