On Mon, Aug 26, 2013 at 5:21 PM, Aleksandr Miroslav <alexmiroslav@gmail.com> wrote:
`additionalKeys` [ ((mod4Mask, xK_z), spawn "/usr/local/bin/xscreensaver-command -lock") ]

that locks the screen with my meta-z and works fine.
But I now want to switch to workspace 1 before I lock the screen, no matter what workspace I am in.
How can I get additionalKeys to do this compount command?

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)

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net