This extension enables mouse-follows-focus on GNOME Shell 45+.
The user experience is meant to be as similar as possible to i3/sway.
- Automatic Mouse Positioning: Automatically repositions the mouse pointer to the center of the window that gains focus.
- Multi-Monitor Support: Seamlessly operates across multiple monitors, ensuring consistent behavior in multi-display setups.
- Compatibility: Designed for GNOME Shell version 45 and above.
The extension is available on Gnome Extensions.
Install the extension code
git clone https://github.com/crisidev/mouse-follows-focus
npm install
npm run build
cp -r dist ~/.local/share/gnome-shell/extensions/[email protected]
glib-compile-schemas ~/.local/share/gnome-shell/extensions/[email protected]/schemas/
Restart GNOME Shell and enable the extension
gnome-extensions enable [email protected]
The extension can be configured with dconf
/ gsettings
under the namespace org.gnome.shell.extensions.mouse-follows-focus
and with a dynamic UI built in the extension. Settings changed with the UI will be synced with gsettings
and vice versa.
enable-debugging
: Set totrue
to enable debugging. It's very verbose :Dminimum-size-trigger
: minimum window size (NxN) triggering mouse-follows-focus eventsmotion-event-timeout
: How long before resetting the mouse motion event detection timeout
Contributions are welcome! Feel free to open issues or submit pull requests to improve the extension.
This extension is based on the amazing GNOME Shell Extensions typescript template made by swsnr.