[xmonad] Errors building Xmonad using Stack

Alain Bertrand alainbe at free.fr
Tue Jul 19 09:14:09 UTC 2022


Hi all,

I am following the instructions https://xmonad.org/INSTALL.html to have 
a working xmonad installation on Debian sid.

I have copied the 
/.stack-work/install/x86_64-linux-tinfo6/f92d4a5154b10803eefe0e58876d72699ac624c9183bbb8880d509b7f819d65f/9.0.2/bin/xmonad

to my ~/bin folder.


The xmonad.hs in my .config is the same as the one I use in my Debian 
stable installation.


~/bin/xmonad --recompile gives me :

--------------------------
XMonad will use stack ghc --stack-yaml 
"/home/alain/.config/xmonad/stack.yaml"
XMonad recompiling (forced).
Errors detected while compiling xmonad config: 
/home/alain/.config/xmonad/xmona
$ stack build --silent --stack-yaml /home/alain/.config/xmonad/stack.yaml
Please check the file for errors.

--------------

which is a little short for me to understand.

I join my xmonad.hs file 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