Сборка Xmonad 0.9.1
Наткнулся на такую проблему. Хотел прикрутить к xmonad панель от xfce, стал читать документацию на сайте http://www.haskell.org/haskellwiki/Xmonad/...Xfce.27s_Panels, для начало решил попробовать конфиг-пример из документации, но получаю ошибку:
xmonad.hs:17:29: Not in scope: `ewmhDesktopsLayout'
Конфиг:
import XMonad
import qualified Data.Map as M
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops
myTerminal = "Terminal"
myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
[
((modMask, xK_b), sendMessage ToggleStruts)
, ((modMask .|. shiftMask, xK_q), spawn "xfce4-session-logout")
]
main = xmonad defaultConfig
{ manageHook = manageDocks <+> manageHook defaultConfig
, logHook = ewmhDesktopsLogHook
, layoutHook = ewmhDesktopsLayout $ avoidStruts $ layoutHook defaultConfig
, modMask = mod4Mask
, keys = myKeys
}
Окружение: Gentoo, ghc-6.12.3,xmonad-0.9.1(оверлай Darcs), xmonad-contrib-0.9.1(оверлай Darcs)
А теперь то, что я смог накопать пытаясь решить эту проблему. При сборки xmoand или xmonad-contrib(сборка производиться до конца, без критических ошибок), получаю множество варнингов, привожу код:
[1 of 8] Compiling XMonad.StackSet ( XMonad/StackSet.hs, dist/build/XMonad/StackSet.o )
XMonad/StackSet.hs:54:0:
Warning: Module `Prelude' is deprecated:
You are using the old package `base' version 3.x.
Future GHC versions will not support base version 3.x. You
should update your code to use the new base version 4.x.
[2 of 8] Compiling XMonad.Core ( XMonad/Core.hs, dist/build/XMonad/Core.o )
XMonad/Core.hs:35:0:
Warning: Module `Prelude' is deprecated:
You are using the old package `base' version 3.x.
Future GHC versions will not support base version 3.x. You
should update your code to use the new base version 4.x.
XMonad/Core.hs:36:26:
Warning: In the use of `catch'
(imported from Control.Exception, but defined in base:Control.OldException):
Deprecated: "Future versions of base will not support the old exceptions style. Please switch to extensible exceptions."
XMonad/Core.hs:36:33:
Warning: In the use of `try'
(imported from Control.Exception, but defined in base:Control.OldException):
Deprecated: "Future versions of base will not support the old exceptions style. Please switch to extensible exceptions."
XMonad/Core.hs:36:38:
Warning: In the use of `bracket'
(imported from Control.Exception, but defined in base:Control.OldException):
Deprecated: "Future versions of base will not support the old exceptions style. Please switch to extensible exceptions."
XMonad/Core.hs:36:54:
Warning: In the use of `finally'
(imported from Control.Exception, but defined in base:Control.OldException):
Deprecated: "Future versions of base will not support the old exceptions style. Please switch to extensible exceptions."
XMonad/Core.hs:36:63:
Warning: In the use of data constructor `ExitException'
(imported from Control.Exception, but defined in base:Control.OldException):
Deprecated: "Future versions of base will not support the old exceptions style. Please switch to extensible exceptions."
XMonad/Core.hs:367:16:
Warning: A do-notation statement discarded a result of type base:System.Posix.Types.ProcessGroupID.
Suppress this warning by saying "_ <- createSession",
or by using the flag -fno-warn-unused-do-bind
XMonad/Core.hs:372:8:
Warning: A do-notation statement discarded a result of type base:System.Posix.Types.Fd.
Suppress this warning by saying "_ <- dupTo fd stdInput",
or by using the flag -fno-warn-unused-do-bind
XMonad/Core.hs:438:12:
Warning: A do-notation statement discarded a result of type ProcessID.
Suppress this warning by saying "_ <- ($)
forkProcess
executeFile
"xmessage"
ghc-prim:GHC.Bool.True
["-default", "okay", msg]
(base:Data.Maybe.Nothing)",
or by using the flag -fno-warn-unused-do-bind
XMonad/Core.hs:467:4:
Warning: A do-notation statement discarded a result of type Handler.
Suppress this warning by saying "_ <- installHandler
openEndedPipe
System.Posix.Signals.Ignore
(base:Data.Maybe.Nothing)",
or by using the flag -fno-warn-unused-do-bind
XMonad/Core.hs:468:4:
Warning: A do-notation statement discarded a result of type Handler.
Suppress this warning by saying "_ <- installHandler
sigCHLD
System.Posix.Signals.Ignore
(base:Data.Maybe.Nothing)",
or by using the flag -fno-warn-unused-do-bind
XMonad/Core.hs:469:4:
Warning: A do-notation statement discarded a result of type Either
Exception ().
Suppress this warning by saying "_ <- ($)
try
($)
fix
\ more
-> do { x <- getAnyProcessStatus
ghc-prim:GHC.Bool.False
ghc-prim:GHC.Bool.False;
when (isJust x) more }",
or by using the flag -fno-warn-unused-do-bind
XMonad/Core.hs:476:4:
Warning: A do-notation statement discarded a result of type Handler.
Suppress this warning by saying "_ <- installHandler
openEndedPipe
System.Posix.Signals.Default
(base:Data.Maybe.Nothing)",
or by using the flag -fno-warn-unused-do-bind
XMonad/Core.hs:477:4:
Warning: A do-notation statement discarded a result of type Handler.
Suppress this warning by saying "_ <- installHandler
sigCHLD
System.Posix.Signals.Default
(base:Data.Maybe.Nothing)",
or by using the flag -fno-warn-unused-do-bind
[3 of 8] Compiling XMonad.Layout ( XMonad/Layout.hs, dist/build/XMonad/Layout.o )
XMonad/Layout.hs:1:0:
Warning: Module `Prelude' is deprecated:
You are using the old package `base' version 3.x.
Future GHC versions will not support base version 3.x. You
should update your code to use the new base version 4.x.
[4 of 8] Compiling XMonad.Operations ( XMonad/Operations.hs, dist/build/XMonad/Operations.o )
XMonad/Operations.hs:1:0:
Warning: Module `Prelude' is deprecated:
You are using the old package `base' version 3.x.
Future GHC versions will not support base version 3.x. You
should update your code to use the new base version 4.x.
XMonad/Operations.hs:36:0:
Warning: In the use of `C.handle'
(imported from Control.Exception, but defined in base:Control.OldException):
Deprecated: "Future versions of base will not support the old exceptions style. Please switch to extensible exceptions."
XMonad/Operations.hs:38:0:
Warning: The import of `System.IO' is redundant
except perhaps to import instances from `System.IO'
To import instances alone, use: import System.IO()
XMonad/Operations.hs:370:4:
Warning: A do-notation statement discarded a result of type Maybe
(Layout Window).
Suppress this warning by saying "_ <- handleMessage
(W.layout ws)
(SomeMessage XMonad.Core.ReleaseResources)",
or by using the flag -fno-warn-unused-do-bind
XMonad/Operations.hs:477:12:
Warning: A do-notation statement discarded a result of type GrabStatus.
Suppress this warning by saying "_ <- ($)
io
grabPointer
d
root
ghc-prim:GHC.Bool.False
(buttonReleaseMask .|. pointerMotionMask)
grabModeAsync
grabModeAsync
none
none
currentTime",
or by using the flag -fno-warn-unused-do-bind
[5 of 8] Compiling XMonad.ManageHook ( XMonad/ManageHook.hs, dist/build/XMonad/ManageHook.o )
XMonad/ManageHook.hs:21:0:
Warning: Module `Prelude' is deprecated:
You are using the old package `base' version 3.x.
Future GHC versions will not support base version 3.x. You
should update your code to use the new base version 4.x.
XMonad/ManageHook.hs:25:26:
Warning: In the use of `bracket'
(imported from Control.Exception, but defined in base:Control.OldException):
Deprecated: "Future versions of base will not support the old exceptions style. Please switch to extensible exceptions."
XMonad/ManageHook.hs:25:35:
Warning: In the use of `catch'
(imported from Control.Exception, but defined in base:Control.OldException):
Deprecated: "Future versions of base will not support the old exceptions style. Please switch to extensible exceptions."
[6 of 8] Compiling XMonad.Config ( XMonad/Config.hs, dist/build/XMonad/Config.o )
XMonad/Config.hs:1:0:
Warning: Module `Prelude' is deprecated:
You are using the old package `base' version 3.x.
Future GHC versions will not support base version 3.x. You
should update your code to use the new base version 4.x.
[7 of 8] Compiling XMonad.Main ( dist/build/XMonad/Main.hs, dist/build/XMonad/Main.o )
XMonad/Main.hsc:1:0:
Warning: Module `Prelude' is deprecated:
You are using the old package `base' version 3.x.
Future GHC versions will not support base version 3.x. You
should update your code to use the new base version 4.x.
XMonad/Main.hsc:59:4:
Warning: A do-notation statement discarded a result of type Ptr
CChar.
Suppress this warning by saying "_ <- ($)
withCString "" c_setlocale (6)",
or by using the flag -fno-warn-unused-do-bind
XMonad/Main.hsc:123:4:
Warning: A do-notation statement discarded a result of type (ghc-prim:GHC.Prim.Any,
XState).
Suppress this warning by saying "_ <- ($)
allocaXEvent
\ e -> ($)
runX cf st
do { grabKeys;
grabButtons;
.... }",
or by using the flag -fno-warn-unused-do-bind
XMonad/Main.hsc:143:12:
Warning: A do-notation statement discarded a result of type Maybe
().
Suppress this warning by saying "_ <- ($)
userCode startupHook initxmc",
or by using the flag -fno-warn-unused-do-bind
[8 of 8] Compiling XMonad ( XMonad.hs, dist/build/XMonad.o )
XMonad.hs:1:0:
Warning: Module `Prelude' is deprecated:
You are using the old package `base' version 3.x.
Future GHC versions will not support base version 3.x. You
should update your code to use the new base version 4.x.
Registering xmonad-0.9.1...
Понятно, что трабл c пакетом base, который входит в ghc, используется 3 версия а нужна 4, но при конфигурировании xmonad:
Dependency base ==3.*: using base-3.0.3.2
Почему ?? Подскажите что делаю не так. Куда копать дальше.
И еще:
>>> Install xmonad-0.9.1 into /var/tmp/portage/x11-wm/xmonad-0.9.1/image/ category x11-wm Installing library in /var/tmp/portage/x11-wm/xmonad-0.9.1/image/usr/lib64/xmonad-0.9.1/ghc-6.12.3 Installing executable(s) in /var/tmp/portage/x11-wm/xmonad-0.9.1/image/usr/bin Creating package registration file: /var/tmp/portage/x11-wm/xmonad-0.9.1/temp/xmonad-0.9.1.conf Reading package info from stdin ... done. xmonad-0.9.1: dependency "X11-1.5.0.0-7b516147b5fc52e2efe78cdf1358f527" doesn't exist (ignoring) xmonad-0.9.1: dependency "base-3.0.3.2-33c49b5f57a891ca80151e2f4f33f82c" doesn't exist (ignoring) xmonad-0.9.1: dependency "containers-0.3.0.0-7be04792060ce1514c52e2cb13a5c18a" doesn't exist (ignoring) xmonad-0.9.1: dependency "directory-1.0.1.1-fcaf1f7664193e0ad39e183ab8696baa" doesn't exist (ignoring) xmonad-0.9.1: dependency "filepath-1.1.0.4-1425f312faf5b8e9f4babf887e252326" doesn't exist (ignoring) xmonad-0.9.1: dependency "mtl-1.1.0.2-336254fecf8a77054f76cb33671a5177" doesn't exist (ignoring) xmonad-0.9.1: dependency "process-1.0.1.3-b553ffb533a7014d695ce14e638736d9" doesn't exist (ignoring) xmonad-0.9.1: dependency "unix-2.4.0.2-2bb6246580a1d8f21582c4265d987876" doesn't exist (ignoring) Writing new package config file... done.
Заранее всем спасибо за помощь ))
- Для комментирования войдите или зарегистрируйтесь

Позвольте уточнить -- Вы таки
Позвольте уточнить -- Вы таки собирали из Darcs, или из оверлея gentoo-haskell? Ваша версия ghc, наверно, сыровата -- могут не собраться зависимости иксмонада -- попробуйте поставить 6.10-r1 и сделать haskell-updater --upgrade. По коду -- вроде всё верно, хотя я этот лайаут не юзаю. Вообще, позвольте рекомендацию: закинуть дефолтный конфиг из поставки, потом -- в сорцах xmonad-contrib читать исходники нужных модулей -- и просто делать, как там написано. По-одному, пока не заработает. Впрочем, знание синтаксиса Haskell не помешает, но и не обязательно.
Per aspera ad astra
Kami31 написал(а): Позвольте
из Darcs у меня только xmonad-0.9.1 собран, все остальное из основной ветки (stable) ghc-6.12.3
Откатился назад на ghc-6.10.4, пере собрал все зависимости, xmonad собрался без предыдущих ошибок,но вернулся к тому с чего начал:
http://www.haskell.org/haskellwiki/Xmonad/Using_xmonad_in_XFCE
Беру конфиг из примера:
import XMonad import qualified Data.Map as M import XMonad.Hooks.ManageDocks import XMonad.Hooks.EwmhDesktops myTerminal = "Terminal" myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ [ ((modMask, xK_b), sendMessage ToggleStruts) , ((modMask .|. shiftMask, xK_q), spawn "xfce4-session-logout") ] main = xmonad defaultConfig { manageHook = manageDocks <+> manageHook defaultConfig , logHook = ewmhDesktopsLogHook , layoutHook = ewmhDesktopsLayout $ avoidStruts $ layoutHook defaultConfig , modMask = mod4Mask , keys = myKeys }И получаем:
Можно начать с
Можно начать с xmonad-contrib-0.9.1/XMonad/Config/Xfce.hs
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Config.Xfce -- Copyright : (c) Ivan Miljenovic <Ivan.Miljenovic@gmail.com> -- License : BSD -- -- Maintainer : none -- Stability : unstable -- Portability : unportable -- -- This module provides a config suitable for use with the Xfce desktop -- environment. module XMonad.Config.Xfce ( -- * Usage -- $usage xfceConfig ) where import XMonad import XMonad.Config.Desktop import qualified Data.Map as M -- $usage -- To use this module, start with the following @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad -- > import XMonad.Config.Xfce -- > -- > main = xmonad xfceConfig -- -- For examples of how to further customize @xfceConfig@ see "XMonad.Config.Desktop". xfceConfig = desktopConfig { terminal = "Terminal" , keys = \c -> xfceKeys c `M.union` keys desktopConfig c } xfceKeys (XConfig {modMask = modm}) = M.fromList $ [ ((modm, xK_p), spawn "xfrun4") , ((modm .|. shiftMask, xK_p), spawn "xfce4-appfinder") , ((modm .|. shiftMask, xK_q), spawn "xfce4-session-logout") ]И заглянуть в xmonad-contrib-0.9.1/XMonad/Config/Desktop.hs
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Config.Desktop -- Copyright : (c) Spencer Janssen <spencerjanssen@gmail.com> -- License : BSD -- -- Maintainer : Spencer Janssen <spencerjanssen@gmail.com> -- Stability : unstable -- Portability : unportable -- -- This module provides a config suitable for use with a desktop -- environment such as KDE or GNOME. ----------------------------------------------------------------------------- module XMonad.Config.Desktop ( -- | Several basic integration settings are common to all of xmonad's -- desktop integration configurations. The specific desktop environment -- (DE) modules like "XMonad.Config.Gnome" use this module's -- @desktopConfig@ to set up basic communication between xmonad and -- the DE via a subset of the Extended Window Manager Hints (EWMH) -- specification. Extra xmonad settings unique to specific DE's are -- added by overriding or modifying @desktopConfig@ fields in the -- same way that @defaultConfig@ is customized in @~\/.xmonad/xmonad.hs@. -- -- For more information about EWMH see: -- -- <http://standards.freedesktop.org/wm-spec/wm-spec-latest.html> -- -- See also: "XMonad.Hooks.EwmhDesktops", "XMonad.Hooks.ManageDocks", -- "XMonad.Util.EZConfig". -- * Usage -- $usage desktopConfig, -- * Customizing a desktop config -- $customizing -- ** Modifying layouts, manageHook, or key bindings -- $layouts desktopLayoutModifiers -- ** Modifying the logHook -- $logHook -- ** Modifying the handleEventHook -- $eventHook -- ** Modifying the startupHook -- $startupHook ) where import XMonad import XMonad.Config (defaultConfig) import XMonad.Hooks.ManageDocks import XMonad.Hooks.EwmhDesktops import XMonad.Util.Cursor import qualified Data.Map as M -- $usage -- While this document describes how to configure xmonad, you also need -- to set up your Desktop Environment (DE) and display manager to use -- xmonad as its window manager. For DE and distro specific tips on -- how to do so, see the xmonad wiki: -- -- <http://haskell.org/haskellwiki/Xmonad> -- -- To configure xmonad for use with a DE or with DE tools like panels -- and pagers, in place of @defaultConfig@ in your @~\/.xmonad/xmonad.hs@, -- use @desktopConfig@ or one of the other desktop configs from the -- @XMonad.Config@ namespace. The following setup and customization examples -- work the same way for the other desktop configs as for @desktopConfig@. -- If you are using a specific DE config, import its module instead, and -- use its config in place of @desktopConfig@ in the following examples. -- -- > import XMonad -- > import XMonad.Config.Desktop -- > -- > main = xmonad desktopConfig -- -- @desktopConfig@ is an 'XConfig' that configures xmonad to -- ignore and leave room for dock type windows like panels and trays, adds -- the default key binding to toggle panel visibility, and activates basic -- EWMH support. It also sets a prettier root window mouse pointer. -- $customizing -- To customize a desktop config, modify its fields as is illustrated with -- @defaultConfig@ in "XMonad.Doc.Extending#Extending xmonad". -- $layouts -- See also "XMonad.Util.EZConfig" for more options for modifying key bindings. -- To add to layouts, manageHook or key bindings use something like the following -- to combine your modifications with the desktop config settings: -- -- > import XMonad -- > import XMonad.Config.Desktop -- > import XMonad.Layout.Tabbed -- > import XMonad.Util.EZConfig (additionalKeys) -- > -- > main = -- > xmonad $ desktopConfig { -- > -- add manage hooks while still ignoring panels and using default manageHooks -- > manageHook = myManageHook <+> manageHook desktopConfig -- > -- > -- add a fullscreen tabbed layout that does not avoid covering -- > -- up desktop panels before the desktop layouts -- > , layoutHook = simpleTabbed ||| layoutHook desktopConfig -- > } -- > -- add a screenshot key to the default desktop bindings -- > `additionalKeys` [ ((mod4Mask, xK_F8), spawn "scrot") ] -- -- To replace the desktop layouts with your own choices, but still -- allow toggling panel visibility, use 'desktopLayoutModifiers' to -- modify your layouts: -- -- > , layoutHook = desktopLayoutModifiers $ simpleTabbed ||| Tall 1 0.03 0.5 -- -- @desktopLayoutModifiers@ modifies a layout to avoid covering docks, panels, -- etc. that set the @_NET_WM_STRUT_PARTIAL@ property. -- See also "XMonad.Hooks.ManageDocks". -- $logHook -- To add to the logHook while still sending workspace and window information -- to DE apps use something like: -- -- > , logHook = myLogHook >> logHook desktopConfig -- -- Or for more elaborate logHooks you can use @do@: -- -- > , logHook = do -- > dynamicLogWithPP xmobarPP -- > updatePointer (Relative 0.9 0.9) -- > logHook desktopConfig -- -- $eventHook -- To customize xmonad's event handling while still having it respond -- to EWMH events from pagers, task bars, etc. add to your imports: -- -- > import Data.Monoid -- -- and use 'Data.Monoid.mappend' to combine event hooks (right to left application like @\<+\>@) -- -- > , handleEventHook = mappend myEventHooks (handleEventHook desktopConfig) -- -- or 'Data.Monoid.mconcat' (like @composeAll@) -- -- > , handleEventHook = mconcat -- > [ myMouseHandler -- > , myMessageHandler -- > , handleEventHook desktopConfig ] -- -- $startupHook -- To run the desktop startupHook, plus add further actions to be run each -- time xmonad starts or restarts, use '>>' to combine actions as in the -- logHook example, or something like: -- -- > , startupHook = do -- > startupHook desktopConfig -- > spawn "xmonad-restart.sh" -- > adjustEventInput -- desktopConfig = ewmh defaultConfig { startupHook = setDefaultCursor xC_left_ptr , layoutHook = desktopLayoutModifiers $ layoutHook defaultConfig , manageHook = manageHook defaultConfig <+> manageDocks , keys = \c -> desktopKeys c `M.union` keys defaultConfig c } desktopKeys (XConfig {modMask = modm}) = M.fromList $ [ ((modm, xK_b), sendMessage ToggleStruts) ] desktopLayoutModifiers layout = avoidStruts layoutВ последнем обратите внимание на использование ewmh и layoutHook (с двух дефисоминусов начинаются комментарии, если что)
Per aspera ad astra
соберите 9999 с ghc 6.12. Со
соберите 9999 с ghc 6.12. Со времен 0.9.1 уже год прошел, он работает только с ghc 6.10