diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-02-28 23:51:55 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-02-28 23:51:55 +0100 |
commit | 5af4daccc8db2f097d612360292c274f3cad7f33 (patch) | |
tree | b6b3d2653837f78f6beedade0f68c06b822b1d76 | |
parent | 064352bdda2ce311772516fcd0c3394c33aa674d (diff) | |
download | xmonad-conf-5af4daccc8db2f097d612360292c274f3cad7f33.tar xmonad-conf-5af4daccc8db2f097d612360292c274f3cad7f33.zip |
Simplify utility window query
-rw-r--r-- | xmonad.hs | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -86,20 +86,8 @@ 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 - +isUtility = isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_UTILITY" myManageHook :: ManageHook myManageHook = composeAll |