在我的xmonad配置中,我有以下内容:
main = do
xmproc <- spawnPipe "xmobar -x 0 ~.config/xmobar/xmobar.config"
xmonad $ docks defaults但是在使用chrome时遇到了问题,我需要添加以下内容:
import XMonad
import XMonad.Hooks.EwmhDesktops
main = xmonad $ ewmh def{ handleEventHook =
handleEventHook def <+> fullscreenEventHook }我不确定如何将这两者结合起来。因此,为了保持xmobar配置,docks默认设置和ewmh
我试过了
main = do
xmproc <- spawnPipe "xmobar -x 0 ~.config/xmobar/xmobar.config"
xmonad $ ewmh def{ handleEventHook =
handleEventHook def <+> fullscreenEventHook }但我也需要添加码头。
更新:
谢谢你的建议,李-姚夏。我试过这个:
xmproc <- spawnPipe "xmobar -x 0 ~/.config/xmobar/xmobar.config"
xmonad $ docks defaults $ ewmh def{ handleEventHook =
handleEventHook def <+> fullscreenEventHook }但这给出了错误
XMonad will use ghc to recompile, because "/home/adam/.xmonad/build" does not exist.
Error detected while loading xmonad configuration file: /home/adam/.xmonad/xmonad.hs
xmonad.hs:273:12: error:
• Couldn't match expected type ‘XConfig
(Choose Tall (Choose (Mirror Tall) Full))
-> XConfig l0’
with actual type ‘XConfig
(XMonad.Layout.LayoutModifier.ModifiedLayout
AvoidStruts (Choose Tall (Choose (Mirror Tall) Full)))’
• The first argument of ($) takes one argument,
but its type ‘XConfig
(XMonad.Layout.LayoutModifier.ModifiedLayout
AvoidStruts (Choose Tall (Choose (Mirror Tall) Full)))’
has none
In the second argument of ‘($)’, namely
‘docks defaults
$ ewmh
def
{handleEventHook = handleEventHook def <+> fullscreenEventHook}’
In a stmt of a 'do' block:
xmonad
$ docks defaults
$ ewmh
def {handleEventHook = handleEventHook def <+> fullscreenEventHook}
|
273 | xmonad $ docks defaults $ ewmh def{ handleEventHook =
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
Please check the file for errors.
xmonad: xmessage: executeFile: does not exist (No such file or directory)发布于 2020-06-05 23:03:35
请注意,docks和ewmh都接受配置
docks :: XConfig a -> XConfig a
ewmh :: XConfig a -> XConfig a它们是可以组合的函数
xmonad $ docks $ ewmh def{ handleEventHook =
handleEventHook def <+> fullscreenEventHook }您似乎还拥有一个自定义的配置defaults :: XConfig a,您可以使用它来代替def (这是XMonad本身提供的默认配置)
xmonad $ docks $ ewmh defaults{ handleEventHook =
handleEventHook defaults <+> fullscreenEventHook }
-- note there are two occurrences of "defaults" here (you definitely want the first one, and the second one matters if defaults and def have different definitions of handleEventHook)https://stackoverflow.com/questions/62218285
复制相似问题