XMonad:如何使用manageHook?

XMonad: How to use manageHook?

我正在按照说明 Here 制作程序 (wicd-gtk) 始终 运行 浮动 window。

以下是我 xmonad.hs 的相关部分:

myManageHook = composeAll
    [ className =? "wicd-gtk"       --> doFloat
    , className =? "stalonetray"    --> doIgnore
    , manageDocks  
    ]

main = do
    xmproc <- spawnPipe "~/.local/bin/xmobar ~/.xmobarrc"
    xmonad $ dynamicProjects projects $ docks def
        { layoutHook            = avoidStruts $ myLayoutHook
        , manageHook            = myManageHook <+> manageHook def
        , logHook               = dynamicLogWithPP xmobarPP
            { ppOutput  = hPutStrLn xmproc
            , ppLayout  = (\x -> drop 10 x)
            , ppTitle   = xmobarColor "green" "" . shorten 150
            }
        , modMask               = mod4Mask
        , keys                  = myKeys
        , workspaces            = myWorkspaces
        , normalBorderColor     = myNormalBorderColor
        , focusedBorderColor    = myFocusedBorderColor
        }

我重新编译时没有收到任何错误,但 wicd-gtk 没有加载为浮动 window。我之前也尝试过使用 doShift 强制 firefox 进入特定的 window,但效果不佳。

知道我做错了什么吗?

如果其他人坚持这一点,结果是 manageHooks 采用 xprop 类名而不是程序名。您可以在这里阅读所有相关信息:https://wiki.haskell.org/Xmonad/Frequently_asked_questions#I_need_to_find_the_class_title_or_some_other_X_property_of_my_program