[xmonad] Errors building Xmonad using Stack

Alain Bertrand alainbe at free.fr
Thu Jul 21 08:58:39 UTC 2022


On 20/07/2022 22:45, Brandon Allbery wrote:
> You ran it in ~/.cabal so that (or ~/.ghc/<version>/environments) is
> where the environment file will have been written. Rerun it from your
> xmonad directory.

Figured it out.

`cabal install --lib X11` should be run at the same time as you build 
xmonad and xmonad-contrib.

`cabal install --package-env=$HOME/.config/xmonad --lib xmonad 
xmonad-contrib  X11`


I have still errors during the compilation:


xmonad.hs:52:46: error:
    • Variable not in scope: defaultXPConfig :: XPConfig
    • Perhaps you meant ‘defaultConfig’ (imported from XMonad)
   |
52 |              [ ((modm, xK_F12), xmonadPrompt defaultXPConfig)
   |                                              ^^^^^^^^^^^^^^^

xmonad.hs:53:46: error:
    • Variable not in scope: defaultXPConfig :: XPConfig
    • Perhaps you meant ‘defaultConfig’ (imported from XMonad)
   |
53 |              , ((modm, xK_F3 ), shellPrompt  defaultXPConfig)
   |                                              ^^^^^^^^^^^^^^^

I have tried to replace defaultXPConfig by defaultConfig but it didn't work.

xmonad.hs is below


Best regards,


Alain


import XMonad
import XMonad.Hooks.SetWMName
import XMonad.Hooks.ManageDocks
import qualified Data.Map as M
import Graphics.X11.Xlib
import XMonad.Config.Azerty
import XMonad.Prompt
import XMonad.Prompt.Shell
import XMonad.Prompt.XMonad
import XMonad.Actions.SpawnOn
import XMonad.Layout.Spiral

myStartUpHook :: X ()
myStartUpHook = do
        spawnOn "panel" "xfce4-panel"
        spawnOn "bg" "feh --bg-tile 
/usr/share/WindowMaker/Backgrounds/BlueImage.jpeg"

--        spawnOn "clavier" "/home/alain/bin/clavier_conf"
--        spawnOn "1" "/usr/bin/firefox"
        spawnOn "1" "/usr/bin/thunderbird"
--        spawnOn "workspace7" "/usr/bin/transmission-gtk"
--      spawnOn "akonadi" "akonadictl start"
        setWMName "LG3D"


myLayoutHook = avoidStruts  ( Full ||| spiral (6/7)  ||| Tall 1 0.03 0.5)

     -- sets default tile as: Tall nmaster (delta) (golden ratio)
    --
    --
main=do
   xmonad  $ docks def
     {
     layoutHook = avoidStruts $ (spiral (6/7) ||| layoutHook defaultConfig)
     , manageHook=manageHook defaultConfig <+> manageDocks
     , modMask = mod4Mask
     , keys = myKeys <+> keys azertyConfig
     , startupHook = myStartUpHook
     }


-- main=do
-- xmonad { keys = myKeys <+> keys azertyConfig }
--     {
--     layoutHook=avoidStruts $ layoutHook defaultConfig
--     , manageHook=manageHook defaultConfig <+> manageDocks
--     , startupHook = setWMName "LG3D"
--     }
-- 
-- 
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList
             [ ((modm, xK_F12), xmonadPrompt defaultXPConfig)
             , ((modm, xK_F3 ), shellPrompt  defaultXPConfig)
             ]





More information about the xmonad mailing list