From b174fb528b0e2a04f3e1acb2c819d65bc83700ce Mon Sep 17 00:00:00 2001 From: Adam Vogt Date: Thu, 12 Nov 2009 22:14:35 +0100 Subject: Rename gridselectViewWorkspace to gridselectWorkspace, add another example. Ignore-this: 462cf1c7f66ab97a1ce642977591a910 The name should be more general to suggest uses other than just viewing other workspaces. darcs-hash:20091112211435-1499c-f81d9c42117c42149d6fe9e7b0a87e6f3e19e19b.gz --- XMonad/Actions/GridSelect.hs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/XMonad/Actions/GridSelect.hs b/XMonad/Actions/GridSelect.hs index 2e77193..943c814 100644 --- a/XMonad/Actions/GridSelect.hs +++ b/XMonad/Actions/GridSelect.hs @@ -38,7 +38,7 @@ module XMonad.Actions.GridSelect ( withSelectedWindow, bringSelected, goToSelected, - gridselectViewWorkspace, + gridselectWorkspace, spawnSelected, runSelectedAction, @@ -524,8 +524,12 @@ runSelectedAction conf actions = do -- | Select a workspace and view it using the given function -- (normally 'W.view' or 'W.greedyView') -gridselectViewWorkspace :: GSConfig WorkspaceId -> +-- +-- Another option is to shift the current window to the selected workspace: +-- +-- > gridselectWorkspace (\ws -> W.greedyView ws . W.shift ws) +gridselectWorkspace :: GSConfig WorkspaceId -> (WorkspaceId -> WindowSet -> WindowSet) -> X () -gridselectViewWorkspace conf viewFunc = withWindowSet $ \ws -> do +gridselectWorkspace conf viewFunc = withWindowSet $ \ws -> do let wss = map W.tag $ W.hidden ws ++ map W.workspace (W.current ws : W.visible ws) gridselect conf (zip wss wss) >>= flip whenJust (windows . viewFunc) \ No newline at end of file -- cgit v1.2.3