
Quoting Gwern Branwen
On Tue, Aug 25, 2009 at 7:09 PM, Jan Vornberger
wrote: - XMonad.Hooks.WorkspaceByPos No idea. What I did notice is that it looks like it could use the Maybe monad!
WorkspaceByPos is only useful in dual-head setups. If you open a new window it looks at the position where it wants to go and moves it to the correct workspace - as opposed to just assigning it to the active workspace. That's also very helpful when starting up in a dual-head setup. If you already have windows open and then start Bluetile, they are correctly assigned to the two visible workspaces, instead of all being moved onto one workspace.
Hm. The one it 'wants to go' to? You mean some apps detect that there are multiple physical screens and choose to go to #2 instead of #1, or something? (What apps do this, and why?)
When an X window appears, it has a chance to request a particular geometry (size and shape on the screen). There are lots of good reasons for this to happen. Some apps have a "-geometry" argument on the command line, some detect the shape of the screen and try to show up in the center of the screen (or the center of one of the screens, if their developers are Xinerama-savvy), some request the same geometry as when they were closed the last time, and so on. I assume WorkspaceByPos detects which screen an app "wants to go to" by where the requested geometry would put it. With these use cases in mind, it seems useful, and perhaps even a nice feature. ~d