I’ve exhausted the help I can get from chatGPT and I while I am also trying hard, I am far from a developer so I was wondering if anyone can help. I’m trying to write a function that will, when bound to a hotkey, simultaneously move groups 4, 5, and 6 to screens 1, 2, and 3. And also the same thing to move groups 1, 2, and 3 in the same fashion.

The use case is: I keep personal apps on 1, 2, and 3, and my work apps on 4, 5, and 6. It would be super helpful to have a fast way to just get one set of groups on all three screens then switch to the other set. Any help or even pointers in the right direction would be highly appreciated. I’ve been playing with groups and toscreen, to_screen, etc. but just can’t seem to bring it all together.

A group is just the term Qtile uses for a “workspace”. So the above is moving workspaces to the monitors collectively.

Again, as a non-developer here, the function’s if statement as written starts by evaluating if is_toggled is true, thus why it’s set ahead of time. As usual in programming there are probably 12 ways to do it. I’m just happy having one that works