contribs review: SpawnOn

04Feb09

One issue that was irritating xmonad users for a while is that if you launch an application which takes some time to load (say, firefox or eclipse) and go to another workspace, program’s windows appears on the workspace you currently are on, not on the workspace the application was launched on.

Eventually, solution is found and implemented in XMonad.Actions.SpawnOn by Spencer Janssen (a similar solution was independently implemented by Daniel Schoepe). To get it working you need to add one action to your main function, add a ManageHook and replace all spawn functions you use in the keybindings with spawnHere. (See module documentation for details.)

The new module also contains replacement for Shell prompt with the same semantics. As another bonus, you can launch an application on some predefined (rather than current) workspace.