Allow regrouping processes
This commit is contained in:
parent
4f4f864fd3
commit
064352bdda
2 changed files with 12 additions and 0 deletions
|
@ -4,6 +4,8 @@ module ProcessWorkspaces ( setProcessWorkspace
|
||||||
, getProcessWorkspace
|
, getProcessWorkspace
|
||||||
, doAutoShift
|
, doAutoShift
|
||||||
, doIgnoreProcessWorkspace
|
, doIgnoreProcessWorkspace
|
||||||
|
, regroupProcess
|
||||||
|
, regroupWinProcess
|
||||||
, shiftIgnoreGroup
|
, shiftIgnoreGroup
|
||||||
, shiftWinIgnoreGroup
|
, shiftWinIgnoreGroup
|
||||||
, shiftGroup
|
, shiftGroup
|
||||||
|
@ -51,6 +53,15 @@ doIgnoreProcessWorkspace = do
|
||||||
liftX $ setProcessWorkspace (fromJust mp) Nothing
|
liftX $ setProcessWorkspace (fromJust mp) Nothing
|
||||||
idHook
|
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 :: WorkspaceId -> X ()
|
||||||
shiftIgnoreGroup ws = withFocused $ shiftWinIgnoreGroup ws
|
shiftIgnoreGroup ws = withFocused $ shiftWinIgnoreGroup ws
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ main = xmonad $ gnomeConfig
|
||||||
, ("M-<F3>", viewOrWarp 2)
|
, ("M-<F3>", viewOrWarp 2)
|
||||||
, ("M-b", banishScreen LowerRight)
|
, ("M-b", banishScreen LowerRight)
|
||||||
, ("M-p", spawnOnCurrent "exe=`dmenu_path | /home/neoraider/bin/dmemu -b` && eval \"exec $exe\"")
|
, ("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-" ++ 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])]
|
++ [ (("M-S-" ++ show n, shiftGroup ws)) | (ws, n) <- zip myWorkspaces ([1..9]++[0])]
|
||||||
|
|
Reference in a new issue