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.