0

I'm trying to divide the number of workspaces for each monitor. On monitor one I have assigned 5 workspaces (from 1 to 5) and on the other monitor I have another 5 workspaces assigned (from 6 to 0...(6,7,8,9,0)). The problem is that I want these workspaces to be only accessible by their corresponding monitor, which is not the case right now. Right now, being from monitor 1, if I press [CTRL + 6], it brings me to monitor 1 the content of workspace 6. Is it possible to make certain workspaces only accessible from a particular monitor? The expected behavior is that if I press [CTRL + 6] from monitor 1, focus will be placed on workspace 6 but on monitor 2, which corresponds to workspace 6.

1 Answer 1

0

Okay. I was able to manage to fix the problem. I came across this link from the Qtile documentation that claimed to have the solution to my problem, however, it didn't work for me. What I did to get to the solution was to implement the following code in the group section.

groups = [Group(i) for i in "1234567890"]


if len(screens) == 2:
    for i in groups:
        keys.extend([
            # Switch to group N
            Key(
                [ctrl], 
                i.name, 
                lazy.to_screen(0) if i.name in '12345' else lazy.to_screen(1),
                lazy.group[i.name].toscreen()
            ),

            # Move window to group N
            Key([ctrl, "shift"], i.name, lazy.window.togroup(i.name, switch_group=True),),
        ])

else:
    for i in groups:
        keys.extend([
            # Switch to group N
            Key([ctrl], i.name, lazy.group[i.name].toscreen()),

            # Move window to group N
            Key([ctrl, "shift"], i.name, lazy.window.togroup(i.name, switch_group=True),),
        ])

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .