On Mon, Aug 26, 2013 at 5:29 PM, Brandon Allbery <allbery.b@gmail.com> wrote:
As with most things in xmonad, use <+> to combine them. (In this case, >> will also work, as will the equivalent do notation.)
    windows (W.view "1") <+> spawn "/usr/local/bin/xscreensaver-command -lock"
(The above assumes: import qualified XMonad.StackSet as W)

 Thank you. That works perfectly.

Alex