That doesn't seem to do it. Although you may be right about me confusing
some nomenclature (I do feel a bit confused), I do want to focus the
application window that was moved - not just the monitor. If that window
gets moved to a group with other windows, I want the focus to remain on the
window that was moved.

That said, adding qtile.focus_screen(i) to the end of that function doesn't
seem to do anything. The application moves to the other monitor as
expected, but the focus doesn't change at all. It keeps the focus on
whatever window my cursor is hovering over (so, either a different window
or nothing at all).

On Wed, Dec 9, 2020 at 6:34 AM Tycho Andersen <[email protected]> wrote:

> On Tue, Dec 08, 2020 at 03:43:58PM -0800, Nimble Clint wrote:
> > Hello,
> >
> > In my config.py I have the following function:
> >
> > def window_to_next_screen(qtile):
> >     i = qtile.screens.index(qtile.current_screen)
> >     if i + 1 != len(qtile.screens):
> >         i = i + 1
> >     else:
> >         i = 0
> >     group = qtile.screens[i].group.name
> >     qtile.current_window.togroup(group)
> >
> > Which is a slightly modified function from this config here.
> > <https://github.com/ramnes/qtile-config/blob/master/config.py#L57>
> > Essentially this function moves a window to a different screen. In
> > addition, I would like this function to also move focus to the window
> which
> > was just moved, but I'm a bit stumped on how to do that. One thing I
> tried
> > was this:
> >
> > def window_to_next_screen(qtile):
> >     i = qtile.screens.index(qtile.current_screen)
> >     window = qtile.current_screen
> >     if i + 1 != len(qtile.screens):
> >         i = i + 1
> >     else:
> >         i = 0
> >     group = qtile.screens[i].group.name
> >     qtile.current_window.togroup(group)
> >     window.group.focus()
>
> try qtile.focus_screen(i) here instead, I think that'll do it. You're
> confusing the nomenclature a bit by calling this thing "window"
> instead of "screen".
>
> Tycho
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "qtile-dev" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/qtile-dev/ZzRZICCBQ9I/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/qtile-dev/20201209133357.GA375305%40cisco
> .
>

-- 
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/CAFg9NJkEbcCcfSUF0uvbZpEMrG4ePszB%3DTNpAsqMbsC-ptifZw%40mail.gmail.com.

Reply via email to