This works. Thank you.
On Wednesday, August 19, 2020 at 1:51:36 PM UTC-5, Marco Obaid wrote:
>
> I use the lines below in my custom function and it does the trick. If I
> recall, the issue you're experiencing is fixed by "toggle=False", as shown
> below.
>
> client.togroup(group)
> client.group.cmd_toscreen(toggle=False)
>
>
> On 8/19/20 1:37 PM, Anthony Vo wrote:
>
> From the doc, if we want to do something like that, we can define a
> function with the decorator @hook.subscribe.client_new and do something
> like
>
> >>>> @hook.subscribe.client_new
> >>>> def move_spawned_apps(client):
> >>>> client.togroup("a", switch_group=True)
>
> The switch_group=True argument is for switching to that group. This works
> for whenever we're in a different group. For example, say I'm currently in
> group "b" and want to spawn every applications in group "a". Then the piece
> of code above does that. However, if I was in group "b", and switch to
> group "a" using `lazy.group["a"].toscreen(toggle=False)`, and then try to
> spawn applications, then the application is still spawned in group "a", but
> now my focus is switched back to group "b". In summary, it works whenever
> I'm in a different group from "a", but when I'm already in the same group,
> then the code opens the application in "a" but switches my focus to
> whatever group I was in before this. How do I fix 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] <javascript:>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/qtile-dev/2c140a75-642e-4f3d-8a20-74a0b3ab0c94o%40googlegroups.com
>
> <https://groups.google.com/d/msgid/qtile-dev/2c140a75-642e-4f3d-8a20-74a0b3ab0c94o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/qtile-dev/9c4e636e-9d1d-49b9-b46a-3e81c28179d4o%40googlegroups.com.