summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ProcessWorkspaces.hs10
-rw-r--r--xmonad.hs17
2 files changed, 22 insertions, 5 deletions
diff --git a/lib/ProcessWorkspaces.hs b/lib/ProcessWorkspaces.hs
index 0b14bff..06818b0 100644
--- a/lib/ProcessWorkspaces.hs
+++ b/lib/ProcessWorkspaces.hs
@@ -4,6 +4,8 @@ module ProcessWorkspaces ( setProcessWorkspace
, getProcessWorkspace
, doAutoShift
, doIgnoreProcessWorkspace
+ , shiftIgnoreGroup
+ , shiftWinIgnoreGroup
, shiftGroup
, shiftWinGroup
, processWorkspaceStorage
@@ -49,6 +51,14 @@ doIgnoreProcessWorkspace = do
liftX $ setProcessWorkspace (fromJust mp) Nothing
idHook
+shiftIgnoreGroup :: WorkspaceId -> X ()
+shiftIgnoreGroup ws = withFocused $ shiftWinIgnoreGroup ws
+
+shiftWinIgnoreGroup :: WorkspaceId -> Window -> X ()
+shiftWinIgnoreGroup ws w = do
+ runQuery doIgnoreProcessWorkspace w
+ windows $ W.shiftWin ws w
+
shiftGroup :: WorkspaceId -> X ()
shiftGroup ws = withFocused $ shiftWinGroup ws
diff --git a/xmonad.hs b/xmonad.hs
index 2eddfe5..57969b6 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -32,6 +32,7 @@ main = xmonad $ gnomeConfig
, layoutHook = desktopLayoutModifiers myLayoutHook
, startupHook = myStartupHook
, handleEventHook = myEventHook
+ , workspaces = myWorkspaces
}
`additionalKeysP` (
[ ("M-a", sendMessage MirrorShrink)
@@ -47,8 +48,10 @@ 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-S-" ++ show n, shiftGroup ws)) | (ws, n) <- zip (workspaces gnomeConfig) ([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-C-" ++ show n, shiftIgnoreGroup ws)) | (ws, n) <- zip myWorkspaces ([1..9]++[0])]
)
`additionalMouseBindings`
[ ((modm, button4), \_ -> sendMessage Shrink)
@@ -58,6 +61,9 @@ main = xmonad $ gnomeConfig
]
+myWorkspaces = ["Firefox", "Thunderbird", "Emacs", "4", "5", "6", "7", "8", "Chat", "10"]
+
+
viewOrWarp :: Int -> X ()
viewOrWarp n = do
wset <- gets windowset
@@ -96,12 +102,13 @@ isUtility = do
myManageHook :: ManageHook
myManageHook = composeAll
- [ composeOne
- [ isDialog -?> doFloat
- , className =? "Guake.py" -?> (doFloatMaybeFullscreen <+> doIgnoreProcessWorkspace) -- <+> doConfigBorderOff)
+ [ isDialog --> doFloat
+ , composeOne
+ [ className =? "Guake.py" -?> (doFloatMaybeFullscreen <+> doIgnoreProcessWorkspace) -- <+> doConfigBorderOff)
--, className =? "Do" -?> (doFloat <+> doConfigBorderOff)
, className =? "Gmpc" -?> doIgnoreProcessWorkspace
, className =? "Liferea" -?> doIgnoreProcessWorkspace
+ , className =? "Gnome-session" -?> doIgnoreProcessWorkspace
, className =? "MPlayer" -?> doCenterFloat
, className =? "Gimp" -?> doFloat
, className =? "Display" -?> doFloat