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()

But that doesn't work. There's a few other things I've tried too but to no 
avail. Does anyone have any ideas?

Thanks for your help!

-- 
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/f596fc2a-711d-43f3-a8b6-9cb8ef2efbd2n%40googlegroups.com.

Reply via email to