<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I'm sorry if this is a stupid question, but the xmonad.hs doesn't
    compile saying that "when" is out of scope. It seems to not
    recognize the keyword "when." I tried "if" as well but then it tells
    me there's a parse error. Are you sure that what you have compiles
    for you?<br>
    <br>
    <div class="moz-cite-prefix">On 08/02/2012 11:03 AM, Brandon Allbery
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAKFCL4XtJCtbX2M3+eL53VYJ7_P3GX3=cRpaK_Nz55oQtO+6dQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">On Thu, Aug 2, 2012 at 1:19 PM, Bryan Huh <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:bhh1988@gmail.com" target="_blank">bhh1988@gmail.com</a>&gt;</span>
        wrote:<br>
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            What I'm trying to do is prevent my focus from switching to
            a different screen if I mistakenly try to switch to an
            already visible workspace. I already am not using greedyView
            so I don't have the problem of the visible workspaces
            swapping on me. But suppose I have two screens and workspace
            1 is on the left, workspace 2 is on the right. If I'm
            focused on the left screen, and I were to press mod-2, the
            focus switches to the screen on the right. If I now press
            mod-3 it will be the right screen which switches to
            workspace 3. This annoys me, because it effectively prevents
            me from cycling through workspaces on one screen. Greedyview
            I think would not have this issue, but the screen swapping
            confuses me. What I want is, when I'm on the left screen and
            I press mod-2, which is an already visible workspace,
            nothing should happen. No swapping of screens, and no moving
            of focus.<br>
          </blockquote>
          <div><br>
          </div>
          <div>
            <div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12px;background-color:rgb(255,255,255)">   
              viewHidden :: WorkspaceId -&gt; X ()</div>
            <div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12px;background-color:rgb(255,255,255)"> 
                viewHidden w = do</div>
            <div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12px;background-color:rgb(255,255,255)"> 
                  ws &lt;- gets windowset</div>
            <div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12px;background-color:rgb(255,255,255)"> 
                  when (w `notElem` (map W.tag $ W.current ws :
              W.visible ws)) (W.view w)</div>
          </div>
          <div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12px;background-color:rgb(255,255,255)"><br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
               [((m .|. modm, k), windows $ f i)<br>
                    | (i, k) &lt;- zip (XMonad.workspaces conf) [xK_1 ..
            xK_9]<br>
                    , (f, m) &lt;- [(viewHidden, 0), (W.shift,
            shiftMask)]<br>
          </blockquote>
        </div>
        <div><br>
        </div>
        <div>It's not quite as simple as you'd hoped, because of the
          whole purity thing; "workspaces conf" doesn't change, but
          whether a workspace is visible or not is dynamic and special
          care needs to be taken with it.</div>
        <div><br>
        </div>
        -- <br>
        brandon s allbery                                      <a
          moz-do-not-send="true" href="mailto:allbery.b@gmail.com"
          target="_blank">allbery.b@gmail.com</a><br>
        wandering unix systems administrator (available)     (412)
        475-9364 vm/sms<br>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>