-- Produces the action to perform depending on whether there's a
-- matching window
focusNextMatchOrDo :: Query Bool -> X () -> Seq Window -> X ()
focusNextMatchOrDo qry act = findM (runQuery qry) 
                             >=> maybe act (windows . SS.focusWindow)
focusNextMatchOrDo :: Query Bool -> X () -> Seq Window -> X ()
focusNextMatchOrDo qry act = findM (runQuery qry) 
                             >=> maybe act (windows . SS.focusWindow)
focusNextMatchOrDo qry act = findM (runQuery qry) 
                             >=> maybe act (windows . SS.focusWindow)