[英]XMonad: How to use manageHook?
I'm following the instructions Here to make a program (wicd-gtk) always run in a floating window. 我正在按照此处的说明进行操作,以使程序(wicd-gtk)始终在浮动窗口中运行。
Here are the relevant sections from my xmonad.hs: 这是我的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
}
I don't get any errors when I recompile but wicd-gtk does not load as a floating window. 重新编译时没有出现任何错误,但wicd-gtk不会作为浮动窗口加载。 I also previously tried using
doShift
to force firefox into a specific window but that did not work as well. 我以前也尝试过使用
doShift
将Firefox强制进入特定窗口,但是效果不佳。
Any ideas what I am doing wrong? 有什么想法我做错了吗?
If anyone else was stuck on this, it turns out manageHooks takes the xprop classname not the program name. 如果其他人对此感到困惑,结果证明manageHooks采用xprop类名而不是程序名。 You can read all about it here: https://wiki.haskell.org/Xmonad/Frequently_asked_questions#I_need_to_find_the_class_title_or_some_other_X_property_of_my_program
您可以在此处阅读所有内容: https : //wiki.haskell.org/Xmonad/Frequently_asked_questions#I_need_to_find_the_class_title_or_some_other_X_property_of_my_program
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.