Well, that certainly explained a lot :)
I cannot get the following code to work though:
layout_options = {
'master_match': Match(role=['roster']),
'ratio': 5,
}
groups.append(
Group('demo', layout_opts=layout_options)
)
Adding the layout_opts parameter does nothing (thats why I have the ratio 5
setting, I want to see if something happens).
I do not understand why. Nothing changes, If I add a window to the group,
the new window becomes the master.
Passing a dictionary as an argument makes it very possible to pass values
that becomes ignored due to typos, but I don't think I did something wrong.
On Thursday, June 18, 2015 at 12:29:27 PM UTC-4, Roger wrote:
>
> On Thu, Jun 18, 2015 at 1:20 PM, Martin <[email protected]
> <javascript:>> wrote:
> > Im confused, how do you do that? The Group object (
> > https://github.com/qtile/qtile/blob/develop/libqtile/group.py#L39 )
> does not
> > appear to have a layout_opts argument you can pass to it, neither does
> it
> > have exclusive or matches.
> >
> > Group appear to pass its arguments to the command.CommandObject object,
> > which in turn passes it to the 'object' root type?
> > https://github.com/qtile/qtile/blob/develop/libqtile/command.py#L306
> >
> > I have a hard time figuring out how this argument reaches the layout. It
> > would be interesting if anyone could clarify this :)
> You are looking at the wrong Group class, the one you want is on the
> config module,
> https://github.com/qtile/qtile/blob/develop/libqtile/config.py#L422
>
> >
> > Anyway, can you tell me what the Match command is in "master_match":
> > Match(role=['roster'])}? Which module do I need to load to include to
> load
> > it?
> Match also comes from config module,
> https://github.com/qtile/qtile/blob/develop/libqtile/config.py#L465
>
> >
> >
> >
> > On Wednesday, May 20, 2015 at 12:49:30 PM UTC-4, Roger wrote:
> >>
> >> 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] <javascript:>.
> > 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.