[xmonad] Having trouble reordering monitor layout

Phil Tooley phil.tooley at gmail.com
Mon Sep 24 23:53:52 CEST 2012


Hello All,

I'm trying to reorder my multimonitor layout and I don't understand
the syntax error I am getting, xmonad,hs follows:

import XMonad
import XMonad.StackSet
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
import XMonad.Util.Scratchpad
import XMonad.Actions.Submap
import XMonad.Hooks.ManageHelpers
import Data.Monoid
import XMonad.Actions.PhysicalScreens


main = do
    xmproc <- spawnPipe "xmobar" -- requires xmobar in path and ~/.xmobarrc
    xmonad $ defaultConfig
        { borderWidth = 1     --some general setup, pick urxvt and get
rid of red bordering
        , terminal = "urxvtc"
        , normalBorderColor = "#000000"
        , focusedBorderColor = "#FFFFFF"

        , manageHook = manageScratchPad <+> manageDocks <+> manageHook
defaultConfig
        , layoutHook = avoidStruts $ layoutHook defaultConfig
        , modMask = mod4Mask  -- rebind mod to windows key

        ,logHook = dynamicLogWithPP xmobarPP -- pipe the data to xmobar
            { ppOutput = hPutStrLn xmproc
            , ppTitle = xmobarColor "green" "" . shorten 50 -- 50 char
window title
            }
        }

        `additionalKeys`--setup printscreen and lock commands
        [ ((mod4Mask, xK_z), spawn "xscreensaver-command -lock")
        , ((mod4Mask .|. shiftMask, xK_z), spawn "sudo pm-suspend-hybrid")
        , ((mod4Mask .|. controlMask, xK_z), spawn "sudo pm-hibernate")
        , ((mod4Mask .|. shiftMask, xK_Print), spawn "sleep 0.2; scrot -s")
        , ((mod4Mask, xK_Print), spawn "scrot")
	, ((mod4Mask, xK_F5), spawn "evince")
        , ((mod4Mask, xK_F6), spawn "emacs")
        , ((mod4Mask, xK_F7), spawn "chromium")
        , ((mod4Mask .|. shiftMask, xK_F7), spawn "firefox")
        , ((mod4Mask, xK_F8), spawn "thunderbird")
        , ((mod4Mask, xK_F9), spawn "clementine")
        , ((mod4Mask, xK_x), scratchpadSpawnActionTerminal "urxvtc")
        , ((mod4Mask, xK_f), fullFloatFocused)
        ] ++

	[((mod4Mask .|. mask, key), f sc)
         | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
        , (f, mask) <- [(viewScreen, 0), (sendToScreen, shiftMask)]
        ]	


manageScratchPad :: ManageHook
manageScratchPad = scratchpadManageHookDefault

fullFloatFocused =
    withFocused $ \f -> windows =<< appEndo `fmap` runQuery doFullFloat f


Any help anyone can give is gratefully recieved.

Thanks in advance

Phil



More information about the xmonad mailing list