Don't autoshift utility windows
This commit is contained in:
parent
016dc1e4b7
commit
ef2d12e398
1 changed files with 20 additions and 3 deletions
23
xmonad.hs
23
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
|
||||
]
|
||||
|
||||
|
|
Reference in a new issue