summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xmonad.hs23
1 files changed, 20 insertions, 3 deletions
diff --git a/xmonad.hs b/xmonad.hs
index 62f8d9c..2eddfe5 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -33,7 +33,7 @@ main = xmonad $ gnomeConfig
, startupHook = myStartupHook
, handleEventHook = myEventHook
}
- `additionalKeysP`
+ `additionalKeysP` (
[ ("M-a", sendMessage MirrorShrink)
, ("M-y", sendMessage MirrorExpand)
, ("M-<Left>", prevWS)
@@ -47,7 +47,9 @@ 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])]
+ )
`additionalMouseBindings`
[ ((modm, button4), \_ -> sendMessage Shrink)
, ((modm, button5), \_ -> sendMessage Expand)
@@ -77,6 +79,21 @@ myStartupHook = do
setWMName "LG3D"
+atomProperty :: String -> Query Atom
+atomProperty p = ask >>= (\w -> liftX $ withDisplay $ \d -> fmap (fromMaybe 0) $ getAtomProperty d w p)
+
+getAtomProperty :: Display -> Window -> String -> X (Maybe Atom)
+getAtomProperty d w p = do
+ a <- getAtom p
+ md <- io $ getWindowProperty32 d a w
+ return $ fmap fromIntegral $ listToMaybe $ fromMaybe [] md
+
+isUtility :: Query Bool
+isUtility = do
+ atom__NET_WM_WINDOW_TYPE_UTILITY <- liftX $ getAtom "_NET_WM_WINDOW_TYPE_UTILITY"
+ atomProperty "_NET_WM_WINDOW_TYPE" =? atom__NET_WM_WINDOW_TYPE_UTILITY
+
+
myManageHook :: ManageHook
myManageHook = composeAll
[ composeOne
@@ -93,7 +110,7 @@ myManageHook = composeAll
, stringProperty "WM_ICON_NAME" =? "ZeroGS" -?> doFloat
, isFullscreen -?> doFullscreen
]
- --, doAutoShift
+ , isUtility =? False --> doAutoShift
, manageHook gnomeConfig
]