diff options
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/ManageHook.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/XMonad/ManageHook.hs b/XMonad/ManageHook.hs index d74f667..485c245 100644 --- a/XMonad/ManageHook.hs +++ b/XMonad/ManageHook.hs @@ -75,12 +75,16 @@ title = ask >>= \w -> liftX $ do io $ bracket getProp (xFree . tp_value) extract `catch` \_ -> return "" -- | Return the application name. +appName :: Query String +appName = ask >>= (\w -> liftX $ withDisplay $ \d -> fmap resName $ io $ getClassHint d w) + +-- | Backwards compatible alias for 'appName'. resource :: Query String -resource = ask >>= (\w -> liftX $ withDisplay $ \d -> fmap resName $ io $ getClassHint d w) +resource = appName -- | Return the resource class. className :: Query String -className = ask >>= (\w -> liftX $ withDisplay $ \d -> fmap resClass $ io $ getClassHint d w) +className = ask >>= (\w -> liftX $ withDisplay $ \d -> fmap resClass $ io $ getClassHint d w) -- | A query that can return an arbitrary X property of type String, -- identified by name. |