summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ProcessWorkspaces.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/ProcessWorkspaces.hs b/lib/ProcessWorkspaces.hs
index 06818b0..8789c51 100644
--- a/lib/ProcessWorkspaces.hs
+++ b/lib/ProcessWorkspaces.hs
@@ -4,6 +4,8 @@ module ProcessWorkspaces ( setProcessWorkspace
, getProcessWorkspace
, doAutoShift
, doIgnoreProcessWorkspace
+ , regroupProcess
+ , regroupWinProcess
, shiftIgnoreGroup
, shiftWinIgnoreGroup
, shiftGroup
@@ -51,6 +53,15 @@ doIgnoreProcessWorkspace = do
liftX $ setProcessWorkspace (fromJust mp) Nothing
idHook
+regroupProcess :: WorkspaceId -> X ()
+regroupProcess ws = withFocused $ regroupWinProcess ws
+
+regroupWinProcess :: WorkspaceId -> Window -> X ()
+regroupWinProcess ws w = do
+ mp <- runQuery pid w
+ when (isJust mp) $ setProcessWorkspace (fromJust mp) (Just ws)
+ shiftWinGroup ws w
+
shiftIgnoreGroup :: WorkspaceId -> X ()
shiftIgnoreGroup ws = withFocused $ shiftWinIgnoreGroup ws