Hi Juraj,<br><br>Could you please resend this patch as an attachment rather than pasted into the body of the e-mail?<br><br>Thanks!<br>-Brent<br><br><div class="gmail_quote">2008/1/9 Juraj Hercek &lt;<a href="mailto:juhe_xmonad@hck.sk">juhe_xmonad@hck.sk</a>&gt;:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br><br>Attached is a darcs patch useful mainly for users using xinerama<br>(multiple screens). It adds xinerama sorting algorithm for sorting<br>
workspace identifiers done in dynamicLogWithPP. After applying the<br>patch, you need to modify your PP in xmonad.hs, e.g:<br><br>myPP = defaultPP {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -- your previous PP settings<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , ppSort = getSortByXineramaRule<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br><br>Regards,<br><font color="#888888">Juraj<br></font><br><br>New patches:<br><br>[Extended PP with sorting algorithm specification and added xinerama sorting<br>Juraj Hercek &lt;<a href="mailto:juhe_xmonad@hck.sk">juhe_xmonad@hck.sk</a>&gt;**20080109154923<br>
 &nbsp; algorithm<br> &nbsp; - idea is to specify sorting algorithm from user&#39;s xmonad.hs<br> &nbsp; - xinerama sorting algorithm produces same ordering as<br> &nbsp; &nbsp; pprWindowSetXinerama<br> &nbsp; - default ppSort is set to getSortByTag, so the default functionality<br>
 &nbsp; &nbsp; is the same as it was before<br>] {<br>hunk ./XMonad/Hooks/DynamicLog.hs 111<br>- &nbsp; &nbsp;sort&#39; &lt;- getSortByTag<br>+ &nbsp; &nbsp;sort&#39; &lt;- ppSort pp<br>hunk ./XMonad/Hooks/DynamicLog.hs 203<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , ppSort :: X ([WindowSpace] -&gt; [WindowSpace])<br>
hunk ./XMonad/Hooks/DynamicLog.hs 219<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , ppSort &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= getSortByTag<br>hunk ./XMonad/Util/WorkspaceCompare.hs 12<br>-module XMonad.Util.WorkspaceCompare ( getWsIndex, getWsCompare, getSortByTag ) where<br>
+module XMonad.Util.WorkspaceCompare ( getWsIndex<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, getWsCompare<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, getSortByTag<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, getSortByXineramaRule ) where<br>
hunk ./XMonad/Util/WorkspaceCompare.hs 21<br>+import Data.Ord<br>+import Data.Maybe<br>hunk ./XMonad/Util/WorkspaceCompare.hs 36<br>- where<br>- &nbsp; f Nothing Nothing &nbsp; = EQ<br>- &nbsp; f (Just _) Nothing &nbsp;= LT<br>- &nbsp; f Nothing (Just _) &nbsp;= GT<br>
- &nbsp; f (Just x) (Just y) = compare x y<br>+ &nbsp;where<br>+ &nbsp; &nbsp;f Nothing Nothing &nbsp; = EQ<br>+ &nbsp; &nbsp;f (Just _) Nothing &nbsp;= LT<br>+ &nbsp; &nbsp;f Nothing (Just _) &nbsp;= GT<br>+ &nbsp; &nbsp;f (Just x) (Just y) = compare x y<br>+<br>+-- | A comparison function for Xinerama based on visibility, workspace and<br>
+-- screen id. It produces same ordering as pprWindowSetXinerama does.<br>+getXineramaWsCompare :: X(WorkspaceId -&gt; WorkspaceId -&gt; Ordering)<br>+getXineramaWsCompare = do<br>+ &nbsp; &nbsp;w &lt;- gets windowset<br>+ &nbsp; &nbsp;return $ \ a b -&gt; case (isOnScreen a w, isOnScreen b w) of<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;(True, True) &nbsp; -&gt; comparing (tagToSid (onScreen w)) a b<br>+ &nbsp; &nbsp; &nbsp; &nbsp;(False, False) -&gt; compare a b<br>+ &nbsp; &nbsp; &nbsp; &nbsp;(True, False) &nbsp;-&gt; LT<br>+ &nbsp; &nbsp; &nbsp; &nbsp;(False, True) &nbsp;-&gt; GT<br>+ &nbsp;where<br>+ &nbsp; &nbsp;onScreen w = &nbsp;S.current w : S.visible w<br>
+ &nbsp; &nbsp;isOnScreen a w &nbsp;= a `elem` map (S.tag . S.workspace) (onScreen w)<br>+ &nbsp; &nbsp;tagToSid s x = S.screen $ fromJust $ find ((== x) . S.tag . S.workspace) s<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --S.screen $ head $ filter ((== x) . S.tag . S.workspace) s<br>
hunk ./XMonad/Util/WorkspaceCompare.hs 64<br>+-- | Sort serveral workspaces for xinerama displays<br>+getSortByXineramaRule :: X ([WindowSpace] -&gt; [WindowSpace])<br>+getSortByXineramaRule = do<br>+ &nbsp; &nbsp;cmp &lt;- getXineramaWsCompare<br>
+ &nbsp; &nbsp;return $ sortBy (\a b -&gt; cmp (S.tag a) (S.tag b))<br>+<br>+<br>}<br><br>Context:<br><br>[Correct caps in module header.<br>Joachim Fasting &lt;<a href="mailto:joachim.fasting@gmail.com">joachim.fasting@gmail.com</a>&gt;**20071230061920]<br>
[Use LANGUAGE pragma.<br>Joachim Fasting &lt;<a href="mailto:joachim.fasting@gmail.com">joachim.fasting@gmail.com</a>&gt;**20071230061817]<br>[shiftPrevScreen and shiftNextScreen, to make CycleWS consistent<br>mail@joachim-breitner.de**20071231171609]<br>
[formatting<br>Don Stewart &lt;<a href="mailto:dons@galois.com">dons@galois.com</a>&gt;**20071204174920]<br>[PerWorkspace.hs: add an explanatory note<br>Brent Yorgey &lt;<a href="mailto:byorgey@gmail.com">byorgey@gmail.com</a>&gt;**20071231135806]<br>
[Add ShowWName a layout modifier to show the workspace name<br>Andrea Rossato &lt;<a href="mailto:andrea.rossato@unibz.it">andrea.rossato@unibz.it</a>&gt;**20071231130441<br>&nbsp;This module requires dzen<br>]<br>[ManageDocks: some documentation fixes<br>
Andrea Rossato &lt;<a href="mailto:andrea.rossato@unibz.it">andrea.rossato@unibz.it</a>&gt;**20071231101820]<br>[-Wall police (again)<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071228061841]<br>
[-Wall police<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071228061822]<br>[Fulfill the EWMH specification by listing the supported ATOMs, doesnt really make a differene AFAIK<br>
mail@joachim-breitner.de**20071227215607]<br>[display all visible windows on the current desktop in the pager<br>mail@joachim-breitner.de**20071227204349<br>&nbsp;This is my best shot at modeling xmonad's WM behaviour in a way that<br>
&nbsp;the Extended Window Manager Hints specification allows.<br><br>&nbsp;Unfortunately, we can not tell the panel what size and position it should<br>&nbsp;think the apps are.<br>]<br>[Although I do not need the curr variable after all, this is nicer<br>
mail@joachim-breitner.de**20071227190113]<br>[Add support for cycling through screens to CycleWS<br>mail@joachim-breitner.de**20071227182635]<br>[Clear _NET_ACTIVE_WINDOW when nothing is focused<br>mail@joachim-breitner.de**20071228154222]<br>
[textExtentsXMF doesn&#39;t require the display<br>Andrea Rossato &lt;<a href="mailto:andrea.rossato@unibz.it">andrea.rossato@unibz.it</a>&gt;**20071228125913]<br>[Don&#39;t bother checking executable bits of items in $PATH, yields a significant speed-up<br>
Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071226032412]<br>[ResizableTile.hs: fix resizing to work in the presence of floating windows (resolves issue #100)<br>Brent Yorgey &lt;<a href="mailto:byorgey@gmail.com">byorgey@gmail.com</a>&gt;**20071225135839]<br>
[LayoutScreens: haddock fixes<br>Andrea Rossato &lt;<a href="mailto:andrea.rossato@unibz.it">andrea.rossato@unibz.it</a>&gt;**20071225105316]<br>[XMonad.Actions.Search: haddock fix<br>Andrea Rossato &lt;<a href="mailto:andrea.rossato@unibz.it">andrea.rossato@unibz.it</a>&gt;**20071224171115]<br>
[Fix isssue 105<br>Andrea Rossato &lt;<a href="mailto:andrea.rossato@unibz.it">andrea.rossato@unibz.it</a>&gt;**20071224171020<br>&nbsp;issue 105 was due to the fact that tab windows created when<br>&nbsp;bootstrapping the windowset after a restart where managed. Setting the<br>
&nbsp;override_redirect attributes to True fixes the issue.<br><br>&nbsp;Added the possibility to set the override_redirect attribute with<br>&nbsp;XMonad.Util.XUtils.creationNewWindow<br>]<br>[Prompt.hs: mv .xmonad_history into .xmonad/<br>
gwern0@gmail.com**20071224054610<br>&nbsp;See my email to mailing list. This will slightly break anyone who upgrades while running and expects to see their prompt history, and leave a stray file, I think, but nothing else, and it&#39;ll permanently improve tab-completion, and is tidier.<br>
]<br>[Search.hs: +docs, and export simpleEngine so users can define their own<br>gwern0@gmail.com**20071224043828]<br>[Search.hs: mv into Actions/ per IRC suggestion<br>gwern0@gmail.com**20071224043735]<br>[add XMonad.Actions.NoBorders<br>
Lukas Mai &lt;<a href="mailto:l.mai@web.de">l.mai@web.de</a>&gt;**20071220203953]<br>[AvoidStruts: add support for partial struts<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071222133425]<br>
[Search.hs: add hoogle<br>Brent Yorgey &lt;<a href="mailto:byorgey@gmail.com">byorgey@gmail.com</a>&gt;**20071222184912]<br>[ManageDocks: ignore desktop windows also<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071222113808]<br>
[Wibble<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071222110641]<br>[EwmhDesktops: add _NET_ACTIVE_WINDOW support<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071222110552]<br>
[A few short comments for WorkspaceCompare<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071222105045]<br>[EwmhDesktops: drop &#39;Workspace&#39; from displayed workspace names<br>
Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071222104559]<br>[Factor workspace sorting into a separate module<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071222104114]<br>
[No more tabs<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071222050439]<br>[Refactor Search.hs<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071222044714]<br>
[Generalize XSelection functions to MonadIO<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071222044514]<br>[Search.hs: +imdb &amp; amazon engines for unk_red<br>gwern0@gmail.com**20071222035837]<br>
[Search.hs: cleanup and refactor<br>gwern0@gmail.com**20071220174001]<br>[Update various restart bindings<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071219220634]<br>[Fix typo.<br>
Roman Cheplyaka &lt;<a href="mailto:roma@ro-che.info">roma@ro-che.info</a>&gt;**20071219073857]<br>[Doc/Developing.hs: add some information about Haddock documentation.<br>Brent Yorgey &lt;<a href="mailto:byorgey@gmail.com">byorgey@gmail.com</a>&gt;**20071219215300]<br>
[require haddock documentation to build successfully in order to record a patch.<br>Brent Yorgey &lt;<a href="mailto:byorgey@gmail.com">byorgey@gmail.com</a>&gt;**20071219215217]<br>[Remove inaccurate comment about &#39;banish&#39;<br>
Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071217231540]<br>[Warp.hs: haddock fixes<br>Brent Yorgey &lt;<a href="mailto:byorgey@gmail.com">byorgey@gmail.com</a>&gt;**20071217224712]<br>
[Warp.hs: +doc<br>gwern0@gmail.com**20071216030015<br>&nbsp;Describe how to emulate Ratpoison&#39;s &#39;banish&#39; functionality on one&#39;s config<br>]<br>[Util/Search.hs: a few updates/fixes<br>Brent Yorgey &lt;<a href="mailto:byorgey@gmail.com">byorgey@gmail.com</a>&gt;**20071217222930<br>
 &nbsp; * fix shadowing warning (ghc 6.8.2 complains)<br> &nbsp; * export a few more of the functions<br> &nbsp; * re-de-obfuscate generated URLs by not escaping alphanumerics or punct.<br>]<br>[Util.Search: import escapeURIString, and fall back on the ugly const false hack to avoid copy-pasting even more<br>
gwern0@gmail.com**20071215211638]<br>[update Config.Droundy to use a few nice hooks.<br>David Roundy &lt;<a href="mailto:droundy@darcs.net">droundy@darcs.net</a>&gt;**20071216185653]<br>[Add UrgencyHook support to Tabbed<br>
Shachaf Ben-Kiki &lt;<a href="mailto:shachaf@gmail.com">shachaf@gmail.com</a>&gt;**20071215171617]<br>[DynamicLog.hs: some documentation updates.<br>Brent Yorgey &lt;<a href="mailto:byorgey@gmail.com">byorgey@gmail.com</a>&gt;**20071215143727]<br>
[DynamicLog.hs: fix shadowing warning<br>Brent Yorgey &lt;<a href="mailto:byorgey@gmail.com">byorgey@gmail.com</a>&gt;**20071215143227]<br>[Add UrgencyHook support to DynamicLog<br>Shachaf Ben-Kiki &lt;<a href="mailto:shachaf@gmail.com">shachaf@gmail.com</a>&gt;**20071214043528<br>
&nbsp;Someone with Xinerama should look at this -- I don&#39;t know exactly how that<br>&nbsp;should behave.<br>]<br>[Depend on X11-1.4.1, it has crucial bugfixes<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071215022151]<br>
[Remove network dependency, potentially breaking XMonad.Util.Search<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071214231859]<br>[Search.hs: fix shadowing warning and haddock errors<br>
Brent Yorgey &lt;<a href="mailto:byorgey@gmail.com">byorgey@gmail.com</a>&gt;**20071214163119]<br>[+cabal support for XMonad.Util.Search<br>gwern0@gmail.com**20071213205654]<br>[+XMonad.Util.Search: new module<br>gwern0@gmail.com**20071213205159<br>
&nbsp;This module is intended to provide helpful functions for easily running web searchs; just hit a bound key, enter your query, and up opens a new tab/browser/window with the search results. In theory anyway; the Wikipedia and Google ones work fine for me, but the Internet Archive&#39;s docs on how to do don&#39;t necessarily seem to be correct. If you were, like me, previously running shell commands to call Surfraw or similar shell scripts to do the same thing, you can now scrap them and replace them.<br>
<br>&nbsp;There aren&#39;t too many search engines defined here; new ones would be good, and they&#39;re easy to add!<br>]<br>[Add support for _NET_WM_STRUT_PARTIAL<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071213021704]<br>
[ManageDocks: when there are struts on opposing edges, the right/bottom strut<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071210021030<br>&nbsp;was ignored. &nbsp;TODO: quickchecks<br>
]<br>[Run.hs: fix documentation, cleanup whitespace<br>&quot;Valery V. Vorotyntsev&quot; &lt;<a href="mailto:valery.vv@gmail.com">valery.vv@gmail.com</a>&gt;**20071212091516]<br>[Man.hs: input speedup<br>&quot;Valery V. Vorotyntsev&quot; &lt;<a href="mailto:valery.vv@gmail.com">valery.vv@gmail.com</a>&gt;**20071212090256<br>
<br>&nbsp;Descend manpage directories once -- when `manPrompt&#39; is called.<br>&nbsp;(Previous version used to search directories upon each character<br>&nbsp;arrival.)<br>]<br>[new XMonad.Hooks.ManageHelpers module<br>Lukas Mai &lt;<a href="mailto:l.mai@web.de">l.mai@web.de</a>&gt;**20071211183040]<br>
[Magnifier: custom zoom ratio for magnifier&#39; too<br>intrigeri@boum.org**20071211015554]<br>[Magnifier.hs: minor haddock fixes<br>Brent Yorgey &lt;<a href="mailto:byorgey@gmail.com">byorgey@gmail.com</a>&gt;**20071211011154]<br>
[fix haddock on Magnifier<br>tim.thelion@gmail.com**20071210231942]<br>[Custom zoom levels for magnifier<br>tim.thelion@gmail.com**20071208230844]<br>[TAG 0.5<br>Spencer Janssen &lt;<a href="mailto:sjanssen@cse.unl.edu">sjanssen@cse.unl.edu</a>&gt;**20071209233056]<br>
Patch bundle hash:<br>1a9bcd0514d272b8693904b8072119ce00553c1d<br><br>_______________________________________________<br>xmonad mailing list<br><a href="mailto:xmonad@haskell.org">xmonad@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/xmonad" target="_blank">http://www.haskell.org/mailman/listinfo/xmonad</a><br>
<br></blockquote></div><br>