相同的Xmonad.hs配置在不同计算机上的相同版本下中断

时间:2013-05-29 05:47:53

标签: xmonad xmobar

我在两个不同的Linux安装上有完全相同的Xmonad.hs配置,虽然它在第一次安装它的计算机上工作正常,但它在第二次安装时导致错误。这是the configuration file:

import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import System.IO

main = do
  xmproc <- spawnPipe "~/.cabal/bin/xmobar ~/.xmobarrc"
  xmonad $ defaultConfig
    { manageHook = manageDocks <+> manageHook defaultConfig
      , layoutHook = avoidStruts  $  layoutHook defaultConfig
      , logHook = dynamicLogWithPP xmobarPP
        { ppOutput = hPutStrLn xmproc
        , ppTitle = xmobarColor "green" "" . shorten 80
        }
    , terminal    = "urxvt"
    , modMask     = mod1Mask
    , borderWidth = 1 --was "3"
    , focusedBorderColor = "#4099FF"
    , normalBorderColor = "#474747"
    }

以下是第二台计算机上出现的错误(镜像于nacr.us/media/xmonad.errors):

xmonad.hs:11:20:
    Couldn't match expected type `ManageHook'
                with actual type `xmonad-0.10:XMonad.Core.ManageHook'
    In the first argument of `(<+>)', namely `manageDocks'
    In the `manageHook' field of a record
    In the second argument of `($)', namely
      `defaultConfig
         {manageHook = manageDocks <+> manageHook defaultConfig,
          layoutHook = avoidStruts $ layoutHook defaultConfig,
          logHook = dynamicLogWithPP
                      (xmobarPP
                         {ppOutput = hPutStrLn xmproc,
                          ppTitle = xmobarColor "green" "" . shorten 80}),
          terminal = "urxvt", modMask = mod1Mask, borderWidth = 1,
          focusedBorderColor = "#4099FF", normalBorderColor = "#474747"}'

此外,xmonad的两个安装都在相同版本的Ubuntu 12.04上,并且安装的xmonad版本是相同的(根据apt-cache show xmonad)。

有什么我忘了这件事吗?我不能为我的生活弄清楚是什么问题。

此外,这是我的dotfiles repo及其所有相关文件:https://github.com/lelandbatey/configDebDev

1 个答案:

答案 0 :(得分:1)

我怀疑您安装了两个版本xmonad(xmonad-0.10加上其他版本),并且由于某种原因它们存在冲突。您可以尝试ghc-pkg check来验证您没有任何损坏的软件包。接下来,我将删除xmonad并使用您的包管理器(apt-get?)重新安装它。