You can set the master on the group configuration, ie:
Group('im', init=False, persist=False, layout='tile',
matches=[Match(wm_class=['Gajim.py'])],
# set the roster as master window and ratio 0.20
layout_opts={"ratio": 0.20, "master_match": Match(role=['roster'])},
exclusive=True
),
On Wed, May 20, 2015 at 1:00 PM, Martin <[email protected]> wrote:
> I am trying to make a hook that will cause every new client to be spawned as
> a 'slave' in the tile layout.
> To do this, the first client should always be 'master' and any client
> created from then should be set to 'slave' (or whatever it actually is
> called)
> Therefore, I wish to count the numbers of windows in the current
> group/screen/layout. It looks like this
>
> @hook.subscribe.client_new
> def set_to_slave(client):
> numberOfWindows = len(client.group.info()['windows'])
>
> This works fine when Qtile restarts and recreates its windows, but not when
> I try to create windows myself. When I try to do it, the client.group
> doesn't have a member function info(),
> which makes me think that the object passed to the set_to_slave function is
> not what I think or may differ depending on context. I have called it
> client, because I thought that the object passed to the hook is always the
> instance object of qtile.
>
> What is going on here and what is passed to a function with a hook
> declaration and how do you control this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "qtile-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.