Currently i move to Screens with Super+alt+h (previous) and Super+alt+l 
(next).

Key([mod, "mod1"], "h", lazy.to_screen(0)), 
Key([mod, "mod1"], "l", lazy.to_screen(1)), 

it works ok, but i want to do it dinamically, but i dont know how to call a 
lazy spawn from qtile arg and how to call lazy.to_screen(current_screen), 
or i can pass a lazy object on the primary function?

something like this
def switch_screen(index):
@lazy.function 
def __inner(qtile):
    global current_screen, max_screens
    current_screen += index
    if current_screen > 0 and current_screen < monitors: 
        qtile.to_screen(current_screen)
        qtile.spawn(f'notify-send "Move to Screen {current_screen}"')
    else: 
        current_screen -= index
        qtile.spawn(f'notify-send "Move to Screen {current_screen}"')
return __inner 

Key([mod, "mod1"], "h", lazy.function(-1)), 
Key([mod, "mod1"], "l", lazy.function(1)), 

-- 
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/1547d562-66f4-4b89-a915-830086f22bbfn%40googlegroups.com.

Reply via email to