Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interaction with Horizontal Workspaces extension #77

Open
ptomato opened this issue Feb 23, 2020 · 1 comment
Open

Interaction with Horizontal Workspaces extension #77

ptomato opened this issue Feb 23, 2020 · 1 comment

Comments

@ptomato
Copy link

ptomato commented Feb 23, 2020

Having Horizontal Workspaces enabled seems to make the switch workspace gestures do nothing. It would be nice if these two extensions could interact and have "switch workspace", "previous workspace", and "next workspace" be able to be bound to horizontal 3-finger swipe and move the workspace when both extensions are active.

@marmitar
Copy link

Looking at how Horizontal Workspace sets the layout on workspace_manager, this could be worked around using a special dirNextWorkspace() as below instead of just Meta.MotionDirection.UP on actions 3 (switch workspace) and 6 (next workspace), with a similar function for previous workspace (actions 3 and 7).

function dirNextWorkspace() {
    // Vertical layout
    if (global.workspace_manager.layout_columns == 1) {
        return Meta.MotionDirection.UP;
    // Horizontal
    } else if (global.workspace_manager.layout_rows == 1) {
        return Meta.MotionDirection.RIGHT;
    // Unknown
    } else { 
        // ...
    }
}

The above implementation works on my machine (Gnome shell 3.38.3 on Arch), but I don't know how to treat another layouts. Besides, that extension is being removed and horizontal will be the default layout. Maybe there is or will be a better way to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants