diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-02-28 22:56:39 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-02-28 22:56:39 +0100 |
commit | 064352bdda2ce311772516fcd0c3394c33aa674d (patch) | |
tree | 476d8153d842047a34251209ef0043e02865f260 | |
parent | 4f4f864fd37dcad02f526045eb4a061fbdaa177e (diff) | |
download | xmonad-conf-064352bdda2ce311772516fcd0c3394c33aa674d.tar xmonad-conf-064352bdda2ce311772516fcd0c3394c33aa674d.zip |
Allow regrouping processes
-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])] |