<div dir="ltr">In place of `<font face="monospace">W.greedyView</font>` or `<font face="monospace">W.view</font>` you would use<div><br></div><div>`<font face="monospace">\t ss -> if (W.tag . W.workspace . W.current) ss == t then W.focusUp ss else W.greedyView t ss</font>`</div><div><br></div><div>or define that as a function. Swap `<font face="monospace">W.greedyView</font>` for `<font face="monospace">W.view</font>` and/or `<font face="monospace">W.focusDown</font>` for `<font face="monospace">W.focusUp</font>` if you wish.</div><div><br></div><div>If you define this as a function (let's say `tagOrFocus`), then the key definition becomes (assuming `<font face="monospace">EZConfig</font>`):</div><div><br></div><div><font face="monospace"> ++<br> [ (otherModMasks ++ "M-" ++ key, action tag)<br> | (tag, key) <- zip workspacen (words "1 2 3 4 5 6 7 8 9 0 - = <F1> <F2> <F3> <F4>")<br> , (otherModMasks, action) <- [("", windows . tagOrFocus)<br> ,("S-", windows . W.shift)<br> ]<br> ]<br></font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">(This is lifted from my own config, adjust as appropriate.)</font></div><div><br></div></div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 2, 2023 at 8:08 AM Jean-Baptiste Mestelan <<a href="mailto:mestelan@gmail.com">mestelan@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello XMonad,</div><div><br></div><div>How could one extend the behaviour of Mod - [1..9], so that an initial keypress switches to workspace n, but further keypresses toggle between windows in that workspace?</div><div>(It is the default behaviour of groups in AutoHotKey, and I must admit it has grown on me: it saves one move reaching for Mod-K).</div><div><br></div><div>Thanks for any Haskell hints.<br></div><div><br></div></div>
_______________________________________________<br>
xmonad mailing list<br>
<a href="mailto:xmonad@haskell.org" target="_blank">xmonad@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>brandon s allbery kf8nh</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a></div></div></div></div></div>