On Thu, 21 Mar 2013 05:22:20 +0100
Ole Johan Væringstad <[email protected]> wrote:

> Greetings
> 
> I have posted this question on #awesome, but got no answer.
> My question is "How do I launch/spawn a program on a given display on
> xinerama"
> 
> I put in my rc.lua:
> for s = 1, screen.count() do
>   awful.util.spawn("urxvt", false, s)
> end
> 
> Whereupon three urxvt instances are launched on my *left* display.
> I changed it to:
> 
> for s = 1, screen.count() do
>   awful.screen.focus(s)
>   awful.util.spawn("urxvt", false, s)
> end
> 
> Whereupon three urxvt instances are lanched on my *right* display.
> Now I'm confused.
> 
> If I try 'awful.util.spawn("urxvt", false, n)' in the lua prompt, the
> window is launched on my *currently focused* display, as long as n is
> within range
> of my screen count. If it is outside, awesome complains to stderr, as
> expected.
> 
> Awesome is fully able to launch a tagbar, or whatever it is called,
> on all three displays on startup.
> 
> System info:
> Gentoo GNU/Linux @ 3.6.11
> Nvidia prop drivers @ 313.26
> 3 Monitors
> No display manager, launching startx directly from init/openrc
> Xinerama

Hi Ole,

I can't speak to the 'screen' argument of awful.util.spawn not working
(I don't have nVidia nor do I have a second screen handy), but
assuming programs launched by awful.util.spawn() always open on the
active screen -- one workaround would be to add a slight delay after
spawning in your second for loop.  awful.util.spawn() forks, so I'm
guessing that your for loop has already finished executing
awful.screen.focus(screen.count()) by the time your urxvts get around
to opening windows.

(You didn't mention which version of awesome you're on? :)

- Bryan

--
To unsubscribe, send mail to [email protected].

Reply via email to