diff options
-rw-r--r-- | lib/ProcessWorkspaces.hs | 11 | ||||
-rw-r--r-- | xmonad.hs | 1 |
2 files changed, 12 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 @@ -48,6 +48,7 @@ main = xmonad $ gnomeConfig , ("M-<F3>", viewOrWarp 2) , ("M-b", banishScreen LowerRight) , ("M-p", spawnOnCurrent "exe=`dmenu_path | /home/neoraider/bin/dmemu -b` && eval \"exec $exe\"") + , ("M-g", gets (W.currentTag . windowset) >>= regroupProcess) ] ++ [ (("M-" ++ show n, windows $ W.greedyView ws)) | (ws, n) <- zip myWorkspaces ([1..9]++[0])] ++ [ (("M-S-" ++ show n, shiftGroup ws)) | (ws, n) <- zip myWorkspaces ([1..9]++[0])] |