mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
WindowGo: fmt & sp
This commit is contained in:
parent
129af43738
commit
9f6bb1a26e
@ -160,11 +160,11 @@ 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
|
otherwise, the first argument is called
|
||||||
See 'raiseMaster' for an example. -}
|
See 'raiseMaster' for an example. -}
|
||||||
raiseAndDo :: X () -> Query Bool -> (Window -> X ())-> X ()
|
raiseAndDo :: X () -> Query Bool -> (Window -> X ()) -> X ()
|
||||||
raiseAndDo f qry after = ifWindow qry (afterRaise `mappend` raiseHook) f
|
raiseAndDo f qry after = ifWindow qry (afterRaise `mappend` raiseHook) f
|
||||||
where afterRaise = ask >>= (>> idHook) . liftX . after
|
where afterRaise = ask >>= (>> idHook) . liftX . after
|
||||||
|
|
||||||
{- | If a window matching the second arugment is found, the window is focused and the third argument is called;
|
{- | If a window matching the second argument is found, the window is focused and the third argument is called;
|
||||||
otherwise, the first argument is called. -}
|
otherwise, the first argument is called. -}
|
||||||
runOrRaiseAndDo :: String -> Query Bool -> (Window -> X ()) -> X ()
|
runOrRaiseAndDo :: String -> Query Bool -> (Window -> X ()) -> X ()
|
||||||
runOrRaiseAndDo = raiseAndDo . safeSpawnProg
|
runOrRaiseAndDo = raiseAndDo . safeSpawnProg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user