aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Actions/GridSelect.hs
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2009-11-12 22:14:35 +0100
committerAdam Vogt <vogt.adam@gmail.com>2009-11-12 22:14:35 +0100
commitb174fb528b0e2a04f3e1acb2c819d65bc83700ce (patch)
tree6b28c93998aeb49f96f922b0b612eeba2e3e8a4a /XMonad/Actions/GridSelect.hs
parented8463fe4365c16003901e0930c3594c4896f4b5 (diff)
downloadXMonadContrib-b174fb528b0e2a04f3e1acb2c819d65bc83700ce.tar.gz
XMonadContrib-b174fb528b0e2a04f3e1acb2c819d65bc83700ce.tar.xz
XMonadContrib-b174fb528b0e2a04f3e1acb2c819d65bc83700ce.zip
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
Diffstat (limited to 'XMonad/Actions/GridSelect.hs')
-rw-r--r--XMonad/Actions/GridSelect.hs10
1 files 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