diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-10-02 19:40:24 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-10-02 19:40:24 +0200 |
commit | 0ddd66e3e0778c1af438e6519888c77aa3935756 (patch) | |
tree | a7a844d755c86d1dda0480ca84c1420e9465a134 | |
parent | 5589ff7b642c0bfb204c0fa0d6a3fcb2f3b7d777 (diff) | |
download | xmonad-0ddd66e3e0778c1af438e6519888c77aa3935756.tar.gz xmonad-0ddd66e3e0778c1af438e6519888c77aa3935756.tar.xz xmonad-0ddd66e3e0778c1af438e6519888c77aa3935756.zip |
Pass window name and class info to manageHook
darcs-hash:20071002174024-a5988-0402595a0c982bc7890a7054b2ca3ff5bcaf94fc.gz
-rw-r--r-- | Config.hs | 4 | ||||
-rw-r--r-- | Config.hs-boot | 2 | ||||
-rw-r--r-- | Operations.hs | 5 |
3 files changed, 8 insertions, 3 deletions
@@ -63,7 +63,9 @@ modMask = mod1Mask defaultGaps :: [(Int,Int,Int,Int)] defaultGaps = [(0,0,0,0)] -- 15 for default dzen -manageHook :: Window -> ClassHint -> X (WindowSet -> WindowSet) +-- | manageHook. Execute arbitrary actions and WindowSet manipulations when +-- managing a new window. +manageHook :: Window -> (String, String, String) -> X (WindowSet -> WindowSet) manageHook _ _ = return id -- | diff --git a/Config.hs-boot b/Config.hs-boot index 7c364c2..f9d8ecd 100644 --- a/Config.hs-boot +++ b/Config.hs-boot @@ -8,4 +8,4 @@ logHook :: X () numlockMask :: KeyMask workspaces :: [WorkspaceId] possibleLayouts :: [SomeLayout Window] -manageHook :: Window -> ClassHint -> X (WindowSet -> WindowSet) +manageHook :: Window -> (String, String, String) -> X (WindowSet -> WindowSet) diff --git a/Operations.hs b/Operations.hs index 41ee9c2..69a28a6 100644 --- a/Operations.hs +++ b/Operations.hs @@ -63,7 +63,10 @@ manage w = whenX (fmap not $ isClient w) $ withDisplay $ \d -> do f ws | isFixedSize || isTransient = W.float w (adjust rr) . W.insertUp w . W.view i $ ws | otherwise = W.insertUp w ws where i = fromMaybe (W.tag . W.workspace . W.current $ ws) $ W.lookupWorkspace sc ws - g <- manageHook w =<< io (getClassHint d w) + + n <- fmap (fromMaybe "") $ io $ fetchName d w + (ClassHint rn rc) <- io $ getClassHint d w + g <- manageHook w (n, rn, rc) windows (g . f) -- | unmanage. A window no longer exists, remove it from the window |