Sample Header Ad - 728x90

Error compiling xmonad.hs

0 votes
1 answer
478 views
I was trying to make different workspace have different layout, I found this module - https://hackage.haskell.org/package/xmonad-contrib-0.15/docs/XMonad-Layout-PerWorkspace.html I imported XMonad.Layout.PerWorkspace in my xmonad.hs and added these lines -
onWorkspace ["2"] noBorders monocle $  -- layout l1 will be used on workspace "2".
onWorkspace ["9"] smartBorders Full $  -- layout l2 will be used on workspace "6".
in myLayoutHook
-- The layout hook
myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts floats $
               mkToggle (NBFULL ?? NOBORDERS ?? EOT) myDefaultLayout

               onWorkspace ["2"] noBorders monocle $  -- layout l1 will be used on workspace "2".
               onWorkspace ["9"] smartBorders Full $  -- layout l2 will be used on workspace "6".

             where
               -- I've commented out the layouts I don't use.
               myDefaultLayout =     tall
                                 ||| noBorders monocle
                                 ||| floats
                                 ||| grid
                                 ||| smartBorders Full
but I'm getting an error while recompiling xmonad
> xmonad --recompile                                                                                                                         
XMonad will use ghc to recompile, because "/home/apoorv/.xmonad/build" does not exist.
Error detected while loading xmonad configuration file: /home/apoorv/.xmonad/xmonad.hs
xmonad.hs:620:14: error: parse error on input ‘where’
    |
620 |              where
    |              ^^^^^
Please check the file for errors.
Warning: Missing charsets in String to FontSet conversion
Asked by apoorv569 (51 rep)
Jul 4, 2020, 09:04 PM
Last activity: Jul 8, 2020, 11:24 AM