Groups across multiple screens

34 views
Skip to first unread message

Tom Hunt

unread,
Nov 22, 2021, 5:28:37 PM11/22/21
to qtile-dev
I've just recently started using qtile, and quite enjoy it. However, the handling of groups in qtile is fairly different from most other WMs, and hinders my productivity.

Rather than the default arrangement where one group is always on one screen, I'm looking for a system more like stumpwm or MATE, in which a group controls all screens while it's active. Ideally, a group's windows could be arranged across active screens as desired while remaining in the same group, and when external displays are detached all those windows would still appear in the single remaining screen.

It looks like I could somewhat emulate this behavior by creating sets of multiple groups with a screen apiece, and setting the keybindings to switch between sets of groups instead of single groups. But this wouldn't play well when only a single screen is active, since only one group can be on that screen.

Is there any easy way to approach this?

James Wright

unread,
Nov 27, 2021, 11:46:33 AM11/27/21
to qtile-dev
It looks like I could somewhat emulate this behavior by creating sets of multiple groups with a screen apiece, and setting the keybindings to switch between sets of groups instead of single groups. But this wouldn't play well when only a single screen is active, since only one group can be on that screen.
It looks like I could somewhat emulate this behavior by creating sets of multiple groups with a screen apiece, and setting the keybindings to switch between sets of groups instead of single groups. But this wouldn't play well when only a single screen is active, since only one group can be on that screen.

Yeah, that's what I was thinking. So breaking it down you'd need two things:
  1. A way to designate a group as apart of a "set"
  2. A way to simultaneously groups on multiple screens
For the first, you could just have that kind of grouping hardcoded into a dictionary. Something like `sets = {'set1': ['groupa', 'groupb'], 'set2': ['groupc', 'groupd']}`. The order of the groups list could serve as an implicit way to ensure that each group stays with it's respective screen.

For the second, you could just create a lazy function that takes the setkey (ie. 'set1', or 'set2') as an argument and then switches all the groups to their specific screen. 

Is there any easy way to approach this?
You'd have to do some custom Python scripting to get something like that. Whether or not it's "easy" is mostly up to how familiar you are with Python. I would probably find the task pretty straight forward, but I'm also quite familiar with Python and also working with Qtile.
 

Reply all
Reply to author
Forward
0 new messages