diff options
author | Lukas Mai <l.mai@web.de> | 2008-04-06 03:20:06 +0200 |
---|---|---|
committer | Lukas Mai <l.mai@web.de> | 2008-04-06 03:20:06 +0200 |
commit | 1eedc6595237f534b2c64e39abd2298a0dd2bddc (patch) | |
tree | 8e234a0687105946fcd83fe0d4ec6c58524865cc /XMonad | |
parent | 8354a950c0ad4726a39d3ce0e365b32f040b6a0b (diff) | |
download | metatile-1eedc6595237f534b2c64e39abd2298a0dd2bddc.tar metatile-1eedc6595237f534b2c64e39abd2298a0dd2bddc.zip |
XMonad.ManageHook: add 'appName', another name for 'resource'
darcs-hash:20080406012006-462cf-4a10582299442b6e035a62f43d13a72666d892a1
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. |