Focus Follows Workspace
March 29, 2023 ยท View on GitHub
A Gnome Shell Extension that focuses (and moves the cursor to) the primary monitor after the workspace was switched with a keyboard shortcut.
https://extensions.gnome.org/extension/4688/focus-follows-workspace/
This extension is meant to be used with a multi-monitor setup with the setting "Workspaces on primary display only". It enables quick switching to an application on a given workspace via keyboard by preventing the focus from being restored to a window on a secondary monitor.

It is compatible with the extension Switch Workspace.
Assigning Keyboard Shortcuts
Go to "Settings" > "Keyboard" > "View and Customize Shortcuts" > "Navigation" and assign keybindings for "Switch to workspace x".

Install
The following command will build the extension and install it locally.
./bundle.sh -i
License
GPLv3 or later.