[xmonad] startup programs

Daniel Schoepe daniel.schoepe at googlemail.com
Sun Aug 16 11:08:30 EDT 2009


On Sat, Aug 15, 2009 at 11:28:31PM +0000, Bozelos Dimitris wrote:
> 2) Is there a way to run a terminal and a program from a specified
> directory? Like if I would do in a terminal : 1) cd "path" 2) emacs
> - so that emacs starts with "path" as its default directory

spawn "cd foo; some_application" should work. If it doesn't,
runProcess from System.Process lets you specify a working directory:
http://hackage.haskell.org/packages/archive/process/1.0.1.1/doc/html/System-Process.html#v%3ArunProcess

> 4) I couldn't really find out how to move a program or terminal to a
> desktop, can you please make your example more precise? Let's say I
> want to run 2 instances of emacs and move the first to desktop 1 and
> the second to desktop 2. How would I do this?

If you are using the darcs version of xmonad, you can use
XMonad.Actions.SpawnOn.
Another way would be to have the application
set a custom resource string(E.g. urxvt's -name option) or such which
you could use in a manage hook to distinguish between the instances,
but not every application lets you do that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20090816/1854790b/attachment.bin


More information about the xmonad mailing list