我正在使用Fedora派生的发行版,其中XMonad与窗口环境很好地配合。我main
中的~/.xmonad.xmonad.hs
作业类似于
main = do
session <- getEnv "DESKTOP_SESSION"
xmonad $ maybe desktopConfig desktop session
desktop "gnome" = gnomeConfig
desktop "kde" = kde4Config
desktop "xfce" = xfceConfig
desktop "xmonad-gnome" = gnomeConfig
desktop _ = desktopConfig
我看到所有这些光滑的修改,我可以做一个la
xmonad $ desktopConfig {
manageHook = myManageHook <+> manageHook desktopConfig
, layoutHook = simpleTabbed ||| layoutHook desktopConfig
}
在像http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Config-Desktop.html这样的地方。
我是一个完整的Haskell noob。我怎样才能干净地修改 xmonad $ maybe desktopConfig桌面会话 是否允许以不破坏窗口环境调度的方式添加这些好东西?
答案 0 :(得分:2)
main = do
session <- getEnv "DESKTOP_SESSION"
let config = maybe desktopConfig desktop session
xmonad $ config{ manageHook = myManageHook <+> manageHook config, ... }