diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-02-27 21:20:00 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-02-27 21:20:00 +0100 |
commit | ef2d12e398b9bb46b2e6fa7e98c9e4488ca3b94b (patch) | |
tree | 62559ef9ef3e8ae2c3f6e0d47093c64c239af333 | |
parent | 016dc1e4b7e90c3e83f29a3575aa800f193cc8be (diff) | |
download | xmonad-conf-ef2d12e398b9bb46b2e6fa7e98c9e4488ca3b94b.tar xmonad-conf-ef2d12e398b9bb46b2e6fa7e98c9e4488ca3b94b.zip |
Don't autoshift utility windows
-rw-r--r-- | xmonad.hs | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -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 ] |