Send future clients to right monitor in awesome?

74 views Asked by At

I'm trying to implement a very customized implementation of awesome.

I have two monitors. I'd like to have my first client always open on the left monitor (a Chrome window in kiosk mode), then all clients after open up on the right monitor.

Are there any custom layouts that accomodate this?

I'd be willing to program it myself, but I'm not sure how to bind a script to some kind of "new client" event.

1

There are 1 answers

2
Uli Schlachter On BEST ANSWER

The new client event is the manage event. It is emitted whenever, well, a new client gets managed by awesome.

To send the first client that ever appears to screen 1 and all following ones to screen 2, you could do something like this:

local first = true
client.connect_signal("manage", function(c)
    if first then
        c.screen = 1
    else
        c.screen = 2
    end
    first = false
end)