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
|
, startupHook = myStartupHook
|
||||||
, handleEventHook = myEventHook
|
, handleEventHook = myEventHook
|
||||||
}
|
}
|
||||||
`additionalKeysP`
|
`additionalKeysP` (
|
||||||
[ ("M-a", sendMessage MirrorShrink)
|
[ ("M-a", sendMessage MirrorShrink)
|
||||||
, ("M-y", sendMessage MirrorExpand)
|
, ("M-y", sendMessage MirrorExpand)
|
||||||
, ("M-<Left>", prevWS)
|
, ("M-<Left>", prevWS)
|
||||||
|
@ -47,7 +47,9 @@ 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-S-" ++ show n, shiftGroup ws)) | (ws, n) <- zip (workspaces gnomeConfig) ([1..9]++[0])]
|
||||||
|
)
|
||||||
`additionalMouseBindings`
|
`additionalMouseBindings`
|
||||||
[ ((modm, button4), \_ -> sendMessage Shrink)
|
[ ((modm, button4), \_ -> sendMessage Shrink)
|
||||||
, ((modm, button5), \_ -> sendMessage Expand)
|
, ((modm, button5), \_ -> sendMessage Expand)
|
||||||
|
@ -77,6 +79,21 @@ myStartupHook = do
|
||||||
setWMName "LG3D"
|
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 :: ManageHook
|
||||||
myManageHook = composeAll
|
myManageHook = composeAll
|
||||||
[ composeOne
|
[ composeOne
|
||||||
|
@ -93,7 +110,7 @@ myManageHook = composeAll
|
||||||
, stringProperty "WM_ICON_NAME" =? "ZeroGS" -?> doFloat
|
, stringProperty "WM_ICON_NAME" =? "ZeroGS" -?> doFloat
|
||||||
, isFullscreen -?> doFullscreen
|
, isFullscreen -?> doFullscreen
|
||||||
]
|
]
|
||||||
--, doAutoShift
|
, isUtility =? False --> doAutoShift
|
||||||
, manageHook gnomeConfig
|
, manageHook gnomeConfig
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Reference in a new issue