Issue 546 in xmonad: Suggested improvement to CycleRecentWS for multiple screens

Status: New Owner: ---- New issue 546 by ch...@cmears.id.au: Suggested improvement to CycleRecentWS for multiple screens http://code.google.com/p/xmonad/issues/detail?id=546 XMonad.Action.CycleRecentWS defines a function to cycle through workspaces according to how recently they were shown. The code specifically puts the current workspace at the end (although it is technically the most recent), which is a good idea. With multiple screens, the visible workspace on the other screen is then considered to be the most recent visible workspace, so it switches there first. I reckon it should not do this, and instead that workspace should be demoted to the end of the list, just like the current one. Here is my suggested change to cycleRecentWS. I can't be really confident that I fixed it the right way, but it does seem to work for me. cycleRecentWS = cycleWindowSets options where options w = map (view `flip` w) (recentTags w) nscreens w = length (screens w) recentTags w = map tag $ drop (nscreens w) (workspaces w) ++ reverse (take (nscreens w) (workspaces w)) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

Comment #1 on issue 546 by byor...@gmail.com: Suggested improvement to CycleRecentWS for multiple screens http://code.google.com/p/xmonad/issues/detail?id=546 I actually already have something similar to this in my xmonad.hs, defined like this: cycleRecentWS' = cycleWindowSets options where options w = map (W.view `flip` w) (recentTags w) recentTags w = map W.tag $ W.hidden w ++ [W.workspace (W.current w)] Mine actually *excludes* the visible but non-focused workspaces from the cycle. I guess my worry is that there are quite a few different ways to do this sort of thing, and if we change cycleRecentWS it will be what some people want but not others. However, I would be OK with including some variants like the ones above, with names like cycleRecentHiddenWS and so on. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

Comment #2 on issue 546 by hanswc...@gmail.com: Suggested improvement to CycleRecentWS for multiple screens http://code.google.com/p/xmonad/issues/detail?id=546 What happens if you swap the workspaces (with greedyView), e.g. [1*][2] -> [2*][1] Will the new cycleRecentWS switch back to [1*][2], or ignore workspace 1 because it is shown on another screen? Personally I like to think of my monitors as independent. That means that the functionality of CycleRecentWS (and also ToggleWS from X.A.CycleWS) should not change because of workspaces on other screens, so in my example it should switch back to [1*][2]. I would love to see this implemented in xmonad. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

Comment #3 on issue 546 by byor...@gmail.com: Suggested improvement to CycleRecentWS for multiple screens http://code.google.com/p/xmonad/issues/detail?id=546 With my version, it will ignore workspace 1 because it is shown on another screen. And this is exactly the way *I* want it. I have a different keybinding to swap the two visible workspaces. But wanting it to switch back is entirely reasonable, too. This is my point -- there are lots of reasonable choices that could be made, and no one choice is best for everyone. So I think that changing the definition of cycleRecentWS will not really accomplish anything. But I'd certainly be OK with sticking in a couple alternate versions, with some clear documentation explaining what the different versions do. If someone wanted to code up a patch I would review and apply it, or I will probably get around to this eventually if no one else does. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

Comment #4 on issue 546 by hanswc...@gmail.com: Suggested improvement to CycleRecentWS for multiple screens http://code.google.com/p/xmonad/issues/detail?id=546 Thanks for the answer. My question should have been directed at the original poster since I tested out your modification already, sorry for not making it clearer. (I don't know much Haskell so I don't know how to adapt OP's code to my xmonad.hs.) I agree with your point and, as said, would be happy to see some alternative versions. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

Comment #5 on issue 546 by ch...@cmears.id.au: Suggested improvement to CycleRecentWS for multiple screens http://code.google.com/p/xmonad/issues/detail?id=546 My version acts like the existing version with regard to the other screen; it won't ever swap the workspaces like greedyView, it just moves the focus to the other screen. I agree that people will want different behaviour, and it might be best to have a couple of versions. (In fact, I think I like byorgey's version better than mine.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings
participants (1)
-
codesite-noreply@google.com